Last active
August 29, 2015 13:56
-
-
Save AzimUddin/8981045 to your computer and use it in GitHub Desktop.
Hadoop job configurations via HDInsight .Net SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mapReduceJob = new MapReduceJobCreateParameters() | |
{ | |
ClassName = "wordcount", // required | |
JobName = "MyWordCountJob", //optional | |
JarFile = "/example/jars/hadoop-examples.jar", // Required, alternative syntax: wasb://hdijobs@azimasv2.blob.core.windows.net/example/jar/hadoop-examples.jar | |
StatusFolder = "/AzimMRJobs/WordCountJobStatus" //Optional, but good to use to know where logs are uploaded in Azure Storage | |
}; | |
//WordCount progam needs two arguments | |
mapReduceJob.Arguments.Add("/example/data/gutenberg/davinci.txt"); //input file | |
mapReduceJob.Arguments.Add("/AzimMRJobs/WordCountOutput"); //Job output location | |
//example of hadoop job configurations | |
mapReduceJob.Defines.Add("mapred.reduce.tasks", "2"); | |
mapReduceJob.Defines.Add("mapred.output.compress", "true"); | |
mapReduceJob.Defines.Add("mapred.output.compression.codec", "org.apache.hadoop.io.compress.GzipCodec"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment