0
在inputformat中使用CombineFileInputFormatInput時,出現錯誤InstantiationException。Hadoop CombineFileInputFormatInput
Configuration conf = new Configuration();
conf.set("fs.default.name", "hdfs://master:54310");
Job job = new Job(conf, "WordCount");
job.setJarByClass(WordCount.class);
job.setMapperClass(WordCountMapper.class);
job.setReducerClass(WordCountReducer.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
job.setInputFormatClass(CombineFileInputFormat.class);
job.setOutputFormatClass(TextOutputFormat.class);
FileInputFormat.addInputPath(job, new Path("/user/hduser/CombineFileInputFormatInput"));
FileOutputFormat.setOutputPath(job, new Path("/user/hduser/CombineFileInputFormatOutputNew2"));
System.exit(job.waitForCompletion(true) ? 0 : 1);
你能找到我們這個異常的堆棧跟蹤嗎? – Amar