public HadoopJarStepConfig toHadoopJarStepConfig() {List<String> args = new ArrayList<String>();if (reducer == null) {hadoopConfig.put("mapred.reduce.tasks", "0");}for (Map.Entry<String, String> entry : hadoopConfig.entrySet()) {args.add("-D");args.add(entry.getKey() + "=" + entry.getValue());}for (String input : inputs) {args.add("-input");args.add(input);}if (output != null) {args.add("-output");args.add(output);}if (mapper != null) {args.add("-mapper");args.add(mapper);}if (reducer != null) {args.add("-reducer");args.add(reducer);}return new HadoopJarStepConfig().withJar("/home/hadoop/contrib/streaming/hadoop-streaming.jar").withArgs(args);}

public HadoopJarStepConfig toHadoopJarStepConfig ( ) { List < String > args = new ArrayList < String > ( ) ; if ( reducer == null ) { hadoopConfig . put ( "mapred.reduce.tasks" , "0" ) ; } for ( Map . Entry < String , String > entry : hadoopConfig . entrySet ( ) ) { args . add ( "-D" ) ; args . add ( entry . getKey ( ) + "=" + entry . getValue ( ) ) ; } for ( String input : inputs ) { args . add ( "-input" ) ; args . add ( input ) ; } if ( output != null ) { args . add ( "-output" ) ; args . add ( output ) ; } if ( mapper != null ) { args . add ( "-mapper" ) ; args . add ( mapper ) ; } if ( reducer != null ) { args . add ( "-reducer" ) ; args . add ( reducer ) ; } return new HadoopJarStepConfig ( ) . withJar ( "/home/hadoop/contrib/streaming/hadoop-streaming.jar" ) . withArgs ( args ) ; }
public HadoopJarStepConfig ToHadoopJarStepConfig() {List<string> args = new List<string>();if (reducer == null) {hadoopConfig.Add("mapred.reduce.tasks", "0");}foreach (KeyValuePair<string, string> entry in hadoopConfig){args.Add("-D");args.Add(string.Format(CultureInfo.InvariantCulture, "{0} = {1}", entry.Key, entry.Value));}foreach (string input in inputs) {args.Add("-input");args.Add(input);}if (output != null) {args.Add("-output");args.Add(output);}if (mapper != null) {args.Add("-mapper");args.Add(mapper);}if (reducer != null) {args.Add("-reducer");args.Add(reducer);}return new HadoopJarStepConfig{Jar = "/home/hadoop/contrib/streaming/hadoop-streaming.jar",Args = args};}
