Changeset 27 for sample/hadoop-0.16/tw/org/nchc/demo
- Timestamp:
- Jul 3, 2008, 5:25:22 PM (16 years ago)
- Location:
- sample/hadoop-0.16/tw/org/nchc/demo
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
sample/hadoop-0.16/tw/org/nchc/demo/DemoHBaseSink.java
r21 r27 4 4 * From : NCHC. Taiwn 5 5 * Last Update Date: 07/02/2008 6 * Upgrade to 0.177 6 * Re-code from : Cloud9: A MapReduce Library for Hadoop 8 7 */ … … 28 27 import org.apache.hadoop.mapred.lib.IdentityMapper; 29 28 import org.apache.hadoop.mapred.lib.IdentityReducer; 30 31 import tw.org.nchc.code.Convert;32 29 33 30 /** … … 81 78 conf.setNumMapTasks(mapTasks); 82 79 conf.setNumReduceTasks(reduceTasks); 83 // 0.16 84 // conf.setInputPath(new Path(filename)); 85 Convert.setInputPath(conf, new Path(filename)); 86 80 conf.setInputPath(new Path(filename)); 87 81 conf.setMapperClass(IdentityMapper.class); 88 82 conf.setCombinerClass(IdentityReducer.class); -
sample/hadoop-0.16/tw/org/nchc/demo/DemoHBaseSource.java
r21 r27 4 4 * From : NCHC. Taiwn 5 5 * Last Update Date: 07/02/2008 6 * Upgrade to 0.177 6 * Re-code from : Cloud9: A MapReduce Library for Hadoop 8 7 */ … … 28 27 import org.apache.hadoop.mapred.Reducer; 29 28 import org.apache.hadoop.mapred.Reporter; 30 31 import tw.org.nchc.code.Convert;32 29 33 30 /** … … 104 101 conf.setOutputKeyClass(Text.class); 105 102 conf.setOutputValueClass(IntWritable.class); 106 //0.16 107 // conf.setOutputPath(new Path(outputPath)); 108 Convert.setOutputPath(conf,new Path(outputPath)); 103 conf.setOutputPath(new Path(outputPath)); 109 104 110 105 conf.setMapperClass(MapClass.class); -
sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCondProb.java
r21 r27 33 33 import org.apache.hadoop.mapred.lib.IdentityReducer; 34 34 35 import tw.org.nchc.code.Convert;36 35 import tw.org.nchc.tuple.Schema; 37 36 import tw.org.nchc.tuple.Tuple; … … 185 184 conf1.setNumMapTasks(numMapTasks); 186 185 conf1.setNumReduceTasks(numReduceTasks); 187 //0.16 188 // conf1.setInputPath(new Path(inPath)); 189 Convert.setInputPath(conf1, new Path(inPath)); 186 conf1.setInputPath(new Path(inPath)); 190 187 191 188 conf1.setInputFormat(SequenceFileInputFormat.class); 192 189 193 // 0.16 194 // conf1.setOutputPath(new Path(output1Path)); 195 Convert.setOutputPath(conf1,new Path(output1Path)); 190 conf1.setOutputPath(new Path(output1Path)); 196 191 conf1.setOutputKeyClass(Tuple.class); 197 192 conf1.setOutputValueClass(FloatWritable.class); -
sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCount.java
r25 r27 4 4 * From : NCHC. Taiwn 5 5 * Last Update Date: 07/02/2008 6 * Upgrade to 0.177 6 */ 8 7 /* -
sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCountTuple.java
r21 r27 4 4 * From : NCHC. Taiwn 5 5 * Last Update Date: 07/02/2008 6 * Upgrade to 0.177 6 */ 8 7 /* … … 29 28 import org.apache.hadoop.mapred.SequenceFileOutputFormat; 30 29 31 import tw.org.nchc.code.Convert;32 30 import tw.org.nchc.tuple.Schema; 33 31 import tw.org.nchc.tuple.Tuple; -
sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCountTuple2.java
r21 r27 4 4 * From : NCHC. Taiwn 5 5 * Last Update Date: 07/02/2008 6 * Upgrade to 0.177 6 */ 8 7 /* … … 29 28 import org.apache.hadoop.mapred.SequenceFileOutputFormat; 30 29 31 import tw.org.nchc.code.Convert;32 30 import tw.org.nchc.tuple.ListWritable; 33 31 import tw.org.nchc.tuple.Schema; -
sample/hadoop-0.16/tw/org/nchc/demo/LogFetcher.java
r25 r27 1 /** 2 * Program: LogFetcher.java 3 * Editor: Waue Chen 4 * From : NCHC. Taiwn 5 * Last Update Date: 07/02/2008 6 */ 1 7 /** 2 8 * Copyright 2007 The Apache Software Foundation … … 95 101 } 96 102 } 103 // do it to resolve warning : FileSystem.listPaths 97 104 static public Path[] listPaths(FileSystem fsm,Path path) throws IOException 98 105 { … … 114 121 jobConf.setJobName("apache log fetcher"); 115 122 jobConf.set(TABLE, table); 116 // my convert function from 0.16 to 0.17 123 // Path[] in = FileSystem.listPaths(fs, InputDir); 117 124 Path[] in = listPaths(fs, InputDir); 118 125 if (fs.isFile(InputDir)) { … … 123 130 jobConf.addInputPath(in[i]); 124 131 } else { 125 // my convert function from 0.16 to 0.17 132 // Path[] sub = FileSystem.listPaths(fs, in[i]); 126 133 Path[] sub = listPaths(fs, in[i]); 127 134 for (int j = 0; j < sub.length; j++) {
Note: See TracChangeset
for help on using the changeset viewer.