hadoop-1.0.1 でアプリケーションを実行したいのですが、アプリケーションが map 関数に入らないことに気付きました。Hadoop ローカルではアプリケーションは適切に実行されますが、分散 Hadoop ではマップ関数が呼び出されません。
私はこの構造を持っています
Class Embed {
public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, Text, LongWritable> {
public void map(LongWritable key, Text value, OutputCollector<Text, LongWritable> output, Reporter reporter) throws IOException {
........
}
}
public static class Reduce extends MapReduceBase implements Reducer<Text, LongWritable, Text, LongWritable> {
public void reduce(Text key, Iterator<LongWritable> values, OutputCollector<Text, LongWritable> output, Reporter reporter) throws IOException {
..........
}
public static void main(String[] args) throws Exception {
readArguments(args);
JobConf conf = new JobConf(Embed.class);
conf.setJobName("embed");
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(LongWritable.class);
conf.setMapperClass(Map.class);
//conf.setCombinerClass(Reduce.class);
conf.setReducerClass(Reduce.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
FileInputFormat.setInputPaths(conf, new Path(input));
FileOutputFormat.setOutputPath(conf, new Path(output));
JobClient.runJob(conf);
}
}
ご協力いただきありがとうございます。