steveloughran commented on code in PR #4604:
URL: https://github.com/apache/hadoop/pull/4604#discussion_r927602020
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestDFSIO.java:
##########
@@ -462,20 +463,33 @@ private void runIOTest(
Path outputDir) throws IOException {
JobConf job = new JobConf(config, TestDFSIO.class);
- FileInputFormat.setInputPaths(job, getControlDir(config));
+ setInputPaths(job,getControlDir(config));
job.setInputFormat(SequenceFileInputFormat.class);
job.setMapperClass(mapperClass);
job.setReducerClass(AccumulatingReducer.class);
- FileOutputFormat.setOutputPath(job, outputDir);
+ job.set(org.apache.hadoop.mapreduce.lib.output.
+ FileOutputFormat.OUTDIR, outputDir.toString());
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(Text.class);
job.setNumReduceTasks(1);
job.setSpeculativeExecution(false);
JobClient.runJob(job);
}
+ public static void setInputPaths(JobConf conf, Path... inputPaths) {
+ Path path = inputPaths[0];
+ StringBuffer str = new
StringBuffer(StringUtils.escapeString(path.toString()));
+ for(int i = 1; i < inputPaths.length;i++) {
Review Comment:
could you use java8 streams here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]