资源简介

《R与Hadoop大数据分析实战》源码

资源截图

代码片段和文件信息

package com.PACKT.chapter1;

import java.io.*;
import java.util.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapred.*;
 
public class Map extends MapReducebase implements Mapper{
    public void map(LongWritable key Text value OutputCollector output Reporter reporter) throws IOException {
        StringTokenizer st = new StringTokenizer(value.toString().toLowerCase());
        while(st.hasMoreTokens()) {
            output.collect(new Text(st.nextToken()) new IntWritable(1));
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-11-21 19:53  3282OS_Code\
     目录           0  2013-11-21 02:56  3282OS_Code\final\
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_02_Codes\
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_02_Codes\codes\
     文件        7366  2013-11-21 02:47  3282OS_Code\final\3282OS_02_Codes\codes\Chapter2_Coding_notes
     文件         575  2013-06-28 01:48  3282OS_Code\final\3282OS_02_Codes\codes\Map.java
     文件         722  2013-11-21 01:39  3282OS_Code\final\3282OS_02_Codes\codes\Reduce.java
     文件        3254  2013-06-28 01:48  3282OS_Code\final\3282OS_02_Codes\codes\wordcount.jar
     文件        1814  2013-11-21 02:47  3282OS_Code\final\3282OS_02_Codes\codes\WordCount.java
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_02_Codes\input\
     文件      446615  2012-05-09 10:04  3282OS_Code\final\3282OS_02_Codes\input\CHANGES.txt
     文件       13366  2012-05-09 10:04  3282OS_Code\final\3282OS_02_Codes\input\LICENSE.txt
     文件         101  2012-05-09 10:04  3282OS_Code\final\3282OS_02_Codes\input\NOTICE.txt
     文件        1366  2012-05-09 10:04  3282OS_Code\final\3282OS_02_Codes\input\README.txt
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_03_Codes\
     文件        1290  2013-11-21 02:48  3282OS_Code\final\3282OS_03_Codes\RHadoop1.R
     文件        1817  2013-11-21 02:48  3282OS_Code\final\3282OS_03_Codes\RHadoop2.R
     文件        1325  2013-11-21 02:05  3282OS_Code\final\3282OS_03_Codes\RHIPE1.R
     文件        1676  2013-11-21 02:48  3282OS_Code\final\3282OS_03_Codes\RHIPE2.R
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_04_Codes\
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_04_Codes\HadoopStreaming\
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\data\
     文件        5451  2013-08-02 01:37  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\data\anna.txt
     文件        1351  2013-10-23 05:59  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\Hadoop_streaming.R
     文件        1432  2013-10-23 06:00  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\Hadoop_streaming.txt
     文件        1349  2013-10-23 06:08  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\Hadoop_streaming_samples.R
     文件        1566  2013-11-21 02:23  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\hsWordCnt.R
     文件        1217  2013-08-02 07:28  3282OS_Code\final\3282OS_04_Codes\HadoopStreamingPkg\runHadoop.sh
     目录           0  2013-11-21 02:54  3282OS_Code\final\3282OS_04_Codes\HadoopStreaming\data\
     文件     3015172  2013-08-01 23:19  3282OS_Code\final\3282OS_04_Codes\HadoopStreaming\data\gadata_mr.csv
............此处省略53个文件信息

评论

共有 条评论