Ignore:
Timestamp:
Jul 3, 2008, 5:25:22 PM (16 years ago)
Author:
waue
Message:

test!

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  
    44 * From :  NCHC. Taiwn
    55 * Last Update Date: 07/02/2008
    6  * Upgrade to 0.17
    76 * Re-code from : Cloud9: A MapReduce Library for Hadoop
    87 */
     
    2827import org.apache.hadoop.mapred.lib.IdentityMapper;
    2928import org.apache.hadoop.mapred.lib.IdentityReducer;
    30 
    31 import tw.org.nchc.code.Convert;
    3229
    3330/**
     
    8178    conf.setNumMapTasks(mapTasks);
    8279    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));
    8781    conf.setMapperClass(IdentityMapper.class);
    8882    conf.setCombinerClass(IdentityReducer.class);
  • sample/hadoop-0.16/tw/org/nchc/demo/DemoHBaseSource.java

    r21 r27  
    44 * From :  NCHC. Taiwn
    55 * Last Update Date: 07/02/2008
    6  * Upgrade to 0.17
    76 * Re-code from : Cloud9: A MapReduce Library for Hadoop
    87 */
     
    2827import org.apache.hadoop.mapred.Reducer;
    2928import org.apache.hadoop.mapred.Reporter;
    30 
    31 import tw.org.nchc.code.Convert;
    3229
    3330/**
     
    104101    conf.setOutputKeyClass(Text.class);
    105102    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));
    109104   
    110105    conf.setMapperClass(MapClass.class);
  • sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCondProb.java

    r21 r27  
    3333import org.apache.hadoop.mapred.lib.IdentityReducer;
    3434
    35 import tw.org.nchc.code.Convert;
    3635import tw.org.nchc.tuple.Schema;
    3736import tw.org.nchc.tuple.Tuple;
     
    185184    conf1.setNumMapTasks(numMapTasks);
    186185    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));
    190187   
    191188    conf1.setInputFormat(SequenceFileInputFormat.class);
    192189   
    193     // 0.16
    194 //    conf1.setOutputPath(new Path(output1Path));
    195     Convert.setOutputPath(conf1,new Path(output1Path));
     190    conf1.setOutputPath(new Path(output1Path));
    196191    conf1.setOutputKeyClass(Tuple.class);
    197192    conf1.setOutputValueClass(FloatWritable.class);
  • sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCount.java

    r25 r27  
    44 * From :  NCHC. Taiwn
    55 * Last Update Date: 07/02/2008
    6  * Upgrade to 0.17
    76 */
    87/*
  • sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCountTuple.java

    r21 r27  
    44 * From :  NCHC. Taiwn
    55 * Last Update Date: 07/02/2008
    6  * Upgrade to 0.17
    76 */
    87/*
     
    2928import org.apache.hadoop.mapred.SequenceFileOutputFormat;
    3029
    31 import tw.org.nchc.code.Convert;
    3230import tw.org.nchc.tuple.Schema;
    3331import tw.org.nchc.tuple.Tuple;
  • sample/hadoop-0.16/tw/org/nchc/demo/DemoWordCountTuple2.java

    r21 r27  
    44 * From :  NCHC. Taiwn
    55 * Last Update Date: 07/02/2008
    6  * Upgrade to 0.17
    76 */
    87/*
     
    2928import org.apache.hadoop.mapred.SequenceFileOutputFormat;
    3029
    31 import tw.org.nchc.code.Convert;
    3230import tw.org.nchc.tuple.ListWritable;
    3331import 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 */
    17/**
    28 * Copyright 2007 The Apache Software Foundation
     
    95101    }
    96102  }
     103//   do it to resolve warning : FileSystem.listPaths
    97104  static public Path[] listPaths(FileSystem fsm,Path path) throws IOException
    98105  {
     
    114121    jobConf.setJobName("apache log fetcher");
    115122    jobConf.set(TABLE, table);
    116     // my convert function from 0.16 to 0.17
     123//     Path[] in = FileSystem.listPaths(fs, InputDir);
    117124    Path[] in = listPaths(fs, InputDir);
    118125    if (fs.isFile(InputDir)) {
     
    123130          jobConf.addInputPath(in[i]);
    124131        } else {
    125           // my convert function from 0.16 to 0.17
     132//          Path[] sub = FileSystem.listPaths(fs, in[i]);
    126133          Path[] sub = listPaths(fs, in[i]);
    127134          for (int j = 0; j < sub.length; j++) {
Note: See TracChangeset for help on using the changeset viewer.