Changeset 25 for sample/hadoop-0.16/tw/org/nchc/code
- Timestamp:
- Jul 3, 2008, 4:45:54 PM (16 years ago)
- Location:
- sample/hadoop-0.16/tw/org/nchc/code
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sample/hadoop-0.16/tw/org/nchc/code/HBaseRecordPro.java
r23 r25 228 228 conf.setNumMapTasks(mapTasks); 229 229 conf.setNumReduceTasks(reduceTasks); 230 // 0.16231 //conf.setInputPath(text_path);232 Convert.setInputPath(conf, text_path); 230 231 conf.setInputPath(text_path); 232 233 233 234 234 conf.setMapperClass(IdentityMapper.class); … … 240 240 // delete tmp file 241 241 // 0.16 242 // FileSystem.get(conf).delete(text_path); 243 FileSystem.get(conf).delete(text_path,true); 242 FileSystem.get(conf).delete(text_path); 244 243 245 244 setup.deleteFile(conf_tmp); -
sample/hadoop-0.16/tw/org/nchc/code/WordCount.java
r23 r25 110 110 conf.setNumMapTasks(mapTasks); 111 111 conf.setNumReduceTasks(reduceTasks); 112 // 0.16113 //conf.setInputPath(new Path(wc.filepath));114 Convert.setInputPath(conf, new Path(wc.filepath)); 112 113 conf.setInputPath(new Path(wc.filepath)); 114 115 115 conf.setOutputKeyClass(Text.class); 116 116 conf.setOutputValueClass(IntWritable.class); 117 // 0.16 118 // conf.setOutputPath(new Path(wc.outputPath)); 119 Convert.setOutputPath(conf, new Path(wc.outputPath)); 117 118 conf.setOutputPath(new Path(wc.outputPath)); 120 119 121 120 conf.setMapperClass(MapClass.class); … … 125 124 // Delete the output directory if it exists already 126 125 Path outputDir = new Path(wc.outputPath); 127 // 0.16 128 FileSystem.get(conf).delete(outputDir,true); 129 126 FileSystem.get(conf).delete(outputDir); 130 127 JobClient.runJob(conf); 131 128 } -
sample/hadoop-0.16/tw/org/nchc/code/WordCountFromHBase.java
r23 r25 168 168 // input is Hbase format => TableInputFormat 169 169 conf.setInputFormat(TableInputFormat.class); 170 // 0.16 171 // conf.setOutputPath(new Path(outputPath)); 172 Convert.setOutputPath(conf, new Path(outputPath)); 170 conf.setOutputPath(new Path(outputPath)); 173 171 // delete the old path with the same name 174 FileSystem.get(conf).delete(new Path(outputPath) ,true);172 FileSystem.get(conf).delete(new Path(outputPath)); 175 173 JobClient.runJob(conf); 176 174 }
Note: See TracChangeset
for help on using the changeset viewer.