Advertisement
Guest User

Untitled

a guest
Jan 8th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. public class Constants
  2. {
  3. public static Uri azureClusterUri = new Uri("https://AutomHDICluster.azurehdinsight.net:563");
  4. public static string thumbprint = "****";
  5. public static Guid subscriptionId = new Guid("***");
  6. public static string clusterName = "AutomHDICluster";
  7. public static string clusterUser = "***";
  8. public static string hadoopUser = "hdp";
  9. public static string clusterPassword = "***";
  10. public static string storageAccount = "resforhadoop.blob.core.windows.net";
  11. public static string storageAccountKey = "***";
  12. public static string container = "hadoopclientres";
  13. public static string wasbPath = "wasb://hadoopclientres@resforhadoop.blob.core.windows.net";
  14. }
  15.  
  16. class RootJob : HadoopJob<RootMapper>
  17. {
  18. public override HadoopJobConfiguration Configure(ExecutorContext context)
  19. {
  20. var config = new HadoopJobConfiguration
  21. {
  22. InputPath = Constants.wasbPath + "/example/data/test.txt",
  23. OutputFolder = Constants.wasbPath + "/example/data/output"
  24. };
  25.  
  26. return config;
  27.  
  28. }
  29.  
  30. public static void DoCustomMapReduce()
  31. {
  32. Console.WriteLine("Starting MapReduce job. Log in remotely to your Name Node and check progress from JobTracker portal with the returned JobID...");
  33. IHadoop hadoop = Hadoop.Connect(Constants.azureClusterUri, Constants.clusterUser, Constants.hadoopUser, Constants.clusterPassword, Constants.storageAccount, Constants.storageAccountKey, Constants.container, true);
  34.  
  35. var output = hadoop.MapReduceJob.ExecuteJob<RootJob>(); (здесь кидает исключение)
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement