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/tw/org/nchc/demo/DemoWordCount.java

    r21 r25  
    2828import org.apache.hadoop.mapred.Reducer;
    2929import org.apache.hadoop.mapred.Reporter;
    30 
    31 import tw.org.nchc.code.Convert;
    3230
    3331/**
     
    107105    conf.setNumMapTasks(mapTasks);
    108106    conf.setNumReduceTasks(reduceTasks);
    109     //0.16
    110 //    conf.setInputPath(new Path(filename));
    111     Convert.setInputPath(conf, new Path(filename));
     107
     108    conf.setInputPath(new Path(filename));
     109
    112110    conf.setOutputKeyClass(Text.class);
    113111    conf.setOutputValueClass(IntWritable.class);
    114     // 0.16
    115 //    conf.setOutputPath(new Path(outputPath));
    116     Convert.setInputPath(conf, new Path(outputPath));
     112
     113    conf.setOutputPath(new Path(outputPath));
    117114    conf.setMapperClass(MapClass.class);
    118115    conf.setCombinerClass(ReduceClass.class);
     
    121118    // Delete the output directory if it exists already
    122119    Path outputDir = new Path(outputPath);
    123     // 0.16
    124 //    FileSystem.get(conf).delete(outputDir);
    125     FileSystem.get(conf).delete(outputDir,true);
     120    FileSystem.get(conf).delete(outputDir);
    126121    JobClient.runJob(conf);
    127122  }
Note: See TracChangeset for help on using the changeset viewer.