Hadoop学习
文章平均质量分 88
Oeljeklaus
python开发,大数据,图数据,数据分析
展开
-
Chapter02 初始Hadoop一
Hadoop的几个重要概念:NameNode的作用:DataNode的作用:次命名节点的作用:JobTracker的作用:TaskTracker的作用:典型的Hadoop集群原创 2017-07-15 22:23:47 · 1283 阅读 · 0 评论 -
Chapter05 高阶MapReduce(一) 链接MapReduce作业
1.顺序链接MapReduce作业现在的需求是,在一个专利数据引用集中,需要找出引用次数最多的10个专利;可以采用如下思路:1.将所有专利排序,利用一个MapReduce进行倒序;2第二个MapReduce找出被应用次数最多的10个专利。这就需要将第一个MapReduce的输出作为第二个MapReduce的输入,命令模式即:mapreduce-1 | mapreduce-2|....原创 2017-07-25 23:21:37 · 1569 阅读 · 0 评论 -
MapReduce练习:DataJoin联结练习
练习题如下:需要输出每个顾客的订单详情。涉及到的文件:Customers1,Stephanie Leung,555-555-55552,Edward Kim,123-456-78903,Jose Madrize,281-330-80044,Davia Stork,408-555-0000Orders3,A,12.95,02-Jun-20081,B,88.25,2原创 2017-08-09 16:53:34 · 1436 阅读 · 0 评论 -
MapReduce练习一:多MapReduce链接
多个MapReduce协同工作,练习题如下:·对于此类问题,一个MapReduce不能解决,需要多个MapReduce协同工作,采用的数据集使用的程序如下:import java.io.IOException;import org.apache.hadoop.conf.Configured;import org.apache.hadoop.fs.Path;import原创 2017-08-08 20:58:09 · 1554 阅读 · 0 评论 -
MapReduce练习二:ChainMapper和ChainReducer的使用
练习的题目如图:解决这类问题的思路是:使用一个Mapper来过滤掉不需要的英文呢,然后就是常规的MapReduce程序,这里使用ChainMapper和ChainReducer具体代码如下:import java.io.IOException;import java.util.Iterator;import org.apache.hadoop.conf.Configura原创 2017-08-08 23:29:05 · 1396 阅读 · 0 评论 -
Chapter04 编写基本的MapReduce程序(三) 非JAVA语言编写mapreduce程序2
使用Aggregate包使用Streaming,使用该包做聚集统计。Mapper的输出格式如下:function map \t reduceAggregate函数列表:Aggreate的使用ValueHistogram的使用原创 2017-07-21 20:39:08 · 1867 阅读 · 0 评论 -
Chapter04 编写基本的MapReduce程序(二) 非JAVA语言编写mapreduce程序
Hadoop也可以使用非Java语言来编写,主要使用Streaming API编写,但只适用较小、功能比较简单的MapReduce程序。下面是使用Shell 脚本来对被引用的专利排序:运行的结果:使用python语言编写,需要使用file参数将程序打包成作业来运行,可以看出并没有设置特定的Reducer,采用默认的IdentifyReducer,把输入直接转原创 2017-07-21 15:08:13 · 2462 阅读 · 0 评论 -
Hadoop 启动节点Datanode失败解决
当我动态添加一个Hadoop从节点的之后,出现了一个问题:[root@hadoop current]# hadoop-daemon.sh start datanodestarting datanode, logging to /usr/local/hadoop1.1/libexec/../logs/hadoop-root-datanode-hadoop.out[root@had原创 2017-07-21 12:50:25 · 2611 阅读 · 0 评论 -
Hadoop集群配置
Hadoop的配置文件分为两类:1.只读类型的默认文件:src/core/core-default.xml 、src/hdfs/hfds-default.xml 、src/mapred/mapred-default.xml、conf/mapred-queues.xml2.定位设置:conf/core-site.xml 、 conf/hdfs-site.xml、conf/mapred-sit原创 2017-07-30 14:03:29 · 1350 阅读 · 0 评论 -
Chpater03 Hadoop组件(一) 文件的基本操作
Hadoop基本的文件命令:Hadoop进行文件相关的操作应该为 hadoop fs -cmd URI,由于配置了一般的信息,例如在core-site.xml配置了如下信息URI的缩写格式由Hadoop创建文件目录:hdfs://localhost:9000/user/$name/filename变为filename查看Hadoop下的所有目录:原创 2017-07-17 15:58:05 · 1312 阅读 · 0 评论 -
Hadoop配置单节点,DataNode没有启动
查看日志:[python] view plain copy[root@slave01 mapred]# tail -100 /opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-datanode-slave01.log 2013-11-12 19:19:22,650 IN转载 2017-07-17 15:13:55 · 1984 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b",原创 2017-12-16 16:03:25 · 1190 阅读 · 0 评论
分享