Ignore:
Timestamp:
Jul 3, 2008, 4:45:54 PM (16 years ago)
Author:
waue
Message:

downgrade from 0.17 to 0.16
test for work -> not yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sample/hadoop-0.16/WordCount2.java

    r24 r25  
    1414import org.apache.hadoop.io.LongWritable;
    1515import org.apache.hadoop.io.Text;
    16 import org.apache.hadoop.mapred.FileInputFormat;
    17 import org.apache.hadoop.mapred.FileOutputFormat;
    1816import org.apache.hadoop.mapred.JobClient;
    1917import org.apache.hadoop.mapred.JobConf;
     
    131129    conf.setNumReduceTasks(reduceTasks);
    132130
    133 //    conf.setInputPath(new Path(filename));
    134     FileInputFormat.setInputPaths(conf,new Path(filename));
     131    conf.setInputPath(new Path(filename));
     132
    135133    conf.setOutputKeyClass(Text.class);
    136134    conf.setOutputValueClass(IntWritable.class);
    137135   
    138 //    conf.setOutputPath(new Path(outputPath));
    139     FileOutputFormat.setOutputPath( conf, new Path(filename));
     136    conf.setOutputPath(new Path(outputPath));
     137
    140138
    141139
     
    146144    // Delete the output directory if it exists already
    147145    Path outputDir = new Path(outputPath);
    148     FileSystem.get(conf).delete(outputDir,true);
     146    FileSystem.get(conf).delete(outputDir);
    149147    JobClient.runJob(conf);
    150148  }
Note: See TracChangeset for help on using the changeset viewer.