Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Constants
- {
- public static Uri azureClusterUri = new Uri("https://AutomHDICluster.azurehdinsight.net:563");
- public static string thumbprint = "****";
- public static Guid subscriptionId = new Guid("***");
- public static string clusterName = "AutomHDICluster";
- public static string clusterUser = "***";
- public static string hadoopUser = "hdp";
- public static string clusterPassword = "***";
- public static string storageAccount = "resforhadoop.blob.core.windows.net";
- public static string storageAccountKey = "***";
- public static string container = "hadoopclientres";
- public static string wasbPath = "wasb://hadoopclientres@resforhadoop.blob.core.windows.net";
- }
- class RootJob : HadoopJob<RootMapper>
- {
- public override HadoopJobConfiguration Configure(ExecutorContext context)
- {
- var config = new HadoopJobConfiguration
- {
- InputPath = Constants.wasbPath + "/example/data/test.txt",
- OutputFolder = Constants.wasbPath + "/example/data/output"
- };
- return config;
- }
- public static void DoCustomMapReduce()
- {
- Console.WriteLine("Starting MapReduce job. Log in remotely to your Name Node and check progress from JobTracker portal with the returned JobID...");
- IHadoop hadoop = Hadoop.Connect(Constants.azureClusterUri, Constants.clusterUser, Constants.hadoopUser, Constants.clusterPassword, Constants.storageAccount, Constants.storageAccountKey, Constants.container, true);
- var output = hadoop.MapReduceJob.ExecuteJob<RootJob>(); (здесь кидает исключение)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement