1. 测试MapReduce Job

1.1 上传文件到hdfs文件系统

$ jps
Jps
SecondaryNameNode
JobHistoryServer
NameNode
ResourceManager
$ jps > infile
$ hadoop fs -mkdir /inputdir
$ hadoop fs -put infile /inputdir
$ hadoop fs -ls /inputdir
Found items
-rw-r--r-- hduser supergroup -- : /inputdir/infile

1.2 进行word count计算

$ hadoop jar /usr/local/hadoop-2.7./share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7..jar wordcount /inputdir /outputdir
// :: INFO client.RMProxy: Connecting to ResourceManager at /172.16.101.55:
// :: INFO input.FileInputFormat: Total input paths to process :
// :: INFO mapreduce.JobSubmitter: number of splits:
// :: INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1504106569900_0001
// :: INFO impl.YarnClientImpl: Submitted application application_1504106569900_0001
// :: INFO mapreduce.Job: The url to track the job: http://sht-sgmhadoopnn-01:8088/proxy/application_1504106569900_0001/
// :: INFO mapreduce.Job: Running job: job_1504106569900_0001
// :: INFO mapreduce.Job: Job job_1504106569900_0001 running in uber mode : false
// :: INFO mapreduce.Job: map % reduce %
// :: INFO mapreduce.Job: map % reduce %
// :: INFO mapreduce.Job: map % reduce %
// :: INFO mapreduce.Job: Job job_1504106569900_0001 completed successfully
// :: INFO mapreduce.Job: Counters:
File System Counters
FILE: Number of bytes read=
FILE: Number of bytes written=
FILE: Number of read operations=
FILE: Number of large read operations=
FILE: Number of write operations=
HDFS: Number of bytes read=
HDFS: Number of bytes written=
HDFS: Number of read operations=
HDFS: Number of large read operations=
HDFS: Number of write operations=
Job Counters
Launched map tasks=
Launched reduce tasks=
Data-local map tasks=
Total time spent by all maps in occupied slots (ms)=
Total time spent by all reduces in occupied slots (ms)=
Total time spent by all map tasks (ms)=
Total time spent by all reduce tasks (ms)=
Total vcore-milliseconds taken by all map tasks=
Total vcore-milliseconds taken by all reduce tasks=
Total megabyte-milliseconds taken by all map tasks=
Total megabyte-milliseconds taken by all reduce tasks=
Map-Reduce Framework
Map input records=
Map output records=
Map output bytes=
Map output materialized bytes=
Input split bytes=
Combine input records=
Combine output records=
Reduce input groups=
Reduce shuffle bytes=
Reduce input records=
Reduce output records=
Spilled Records=
Shuffled Maps =
Failed Shuffles=
Merged Map outputs=
GC time elapsed (ms)=
CPU time spent (ms)=
Physical memory (bytes) snapshot=
Virtual memory (bytes) snapshot=
Total committed heap usage (bytes)=
Shuffle Errors
BAD_ID=
CONNECTION=
IO_ERROR=
WRONG_LENGTH=
WRONG_MAP=
WRONG_REDUCE=
File Input Format Counters
Bytes Read=
File Output Format Counters
Bytes Written=

1.3 查看wordcount结果

$ hadoop fs -ls /outputdir
Found items
-rw-r--r-- hduser supergroup -- : /outputdir/_SUCCESS
-rw-r--r-- hduser supergroup -- : /outputdir/part-r-
$ hadoop fs -cat /outputdir/part-r- JobHistoryServer
Jps
NameNode
ResourceManager
SecondaryNameNode

2. 测试hdfs分布式存储

2.1 上传测试文件

$ ls -lh hadoop-2.7..tar.gz
-rw-r--r-- root root 205M May : hadoop-2.7..tar.gz
$ hadoop fs -put hadoop-2.7..tar.gz /inputdir
$ hadoop fs -ls -h /inputdir
Found items
-rw-r--r-- hduser supergroup 204.2 M -- : /inputdir/hadoop-2.7..tar.gz
-rw-r--r-- hduser supergroup -- : /inputdir/infile

2.2 查看datanode副本信息

Hadoop 2.7.3 完全分布式维护-简单测试篇的更多相关文章

  1. Hadoop 2.7.3 完全分布式维护-部署篇

    测试环境如下  IP       host JDK linux hadop role 172.16.101.55 sht-sgmhadoopnn-01 1.8.0_111 CentOS release ...

  2. Hadoop 2.7.3 完全分布式维护-动态增加datanode篇

    原有环境 http://www.cnblogs.com/ilifeilong/p/7406944.html  IP       host JDK linux hadop role 172.16.101 ...

  3. 安装部署Apache Hadoop (本地模式和伪分布式)

    本节内容: Hadoop版本 安装部署Hadoop 一.Hadoop版本 1. Hadoop版本种类 目前Hadoop发行版非常多,有华为发行版.Intel发行版.Cloudera发行版(CDH)等, ...

  4. Hadoop Single Node Setup(hadoop本地模式和伪分布式模式安装-官方文档翻译 2.7.3)

    Purpose(目标) This document describes how to set up and configure a single-node Hadoop installation so ...

  5. ZooKeeper分布式锁简单实践

    ZooKeeper分布式锁简单实践 在分布式解决方案中,Zookeeper是一个分布式协调工具.当多个JVM客户端,同时在ZooKeeper上创建相同的一个临时节点,因为临时节点路径是保证唯一,只要谁 ...

  6. Hadoop平台K-Means聚类算法分布式实现+MapReduce通俗讲解

        Hadoop平台K-Means聚类算法分布式实现+MapReduce通俗讲解 在Hadoop分布式环境下实现K-Means聚类算法的伪代码如下: 输入:参数0--存储样本数据的文本文件inpu ...

  7. Hadoop、Zookeeper、Hbase分布式安装教程

    参考: Hadoop安装教程_伪分布式配置_CentOS6.4/Hadoop2.6.0   Hadoop集群安装配置教程_Hadoop2.6.0_Ubuntu/CentOS ZooKeeper-3.3 ...

  8. Hadoop 在windows 上伪分布式的安装过程

    第一部分:Hadoop 在windows 上伪分布式的安装过程 安装JDK 1.下载JDK        http://www.oracle.com/technetwork/java/javaee/d ...

  9. Hadoop 2.4.0完全分布式平台搭建、配置、安装

    一:系统安装与配置 Hadoop选择下载2.4.0 http://hadoop.apache.org / http://mirror.bit.edu.cn/apache/hadoop/common/h ...

随机推荐

  1. Latex 算法过长 分页显示方法

    参考: Algorithm tag and page break Latex 算法过长 分页显示方法 1.引用algorithm包: 2.在\begin{document}前加上以下Latex代码: ...

  2. hihoCoder 1233 : Boxes(盒子)

    hihoCoder #1233 : Boxes(盒子) 时间限制:1000ms 单点时限:1000ms 内存限制:256MB Description - 题目描述 There is a strange ...

  3. Intellij idea注册码失效

    从网上下载idea需要输入激活码,晚上用的激活码大多是同一个,但是上次使用的时候突然弹窗告诉我注册码失效了,在网上找到一个新的方法 在注册界面有几个选项,我们常用的是Activation Code,现 ...

  4. 3.2 git命令大全

    1. 常用命令 -- 查看 git remote:要查看当前配置有哪些远程仓库; git remote -v: -v 参数,你还可以看到每个别名的实际链接地址; git branch -a :查看远程 ...

  5. How Many O's? UVA - 11038

    这个题个人感觉有点难,不容易理解. 题意 给你两个数,n,m,找出从n到m所有的数一共包含几个0,看似简单,包含0的不就都是整数么,然后就用暴力循环来找,绝对TL.我自己写这题也没有什么好的办法,没有 ...

  6. leecode第四十六题(全排列)

    class Solution { public: vector<vector<int>> permute(vector<int>& nums) { int ...

  7. MySQL学习(二)

    1 增删改查是针对表来说的. 2 创建一个表 mysql> create table stu( -> id int primary key auto_increment, -> sn ...

  8. MySQL processlist/kill

    1.show full processlist 显示MySQL所有正在执行的进程,用于查看当前的MySQL运行情况,避免死锁等导致的异常情况. 主要的列: Id:进程Id User:登录账号 Host ...

  9. 在docker 容器中安装命令

    apt-get update ##跟新 //vi apt install vim //weget apt install weget //yum apt install yum //ifconfig ...

  10. vue2.0 axios交互

    vue使用axios交互时候会出现的问题大致有三个: 1:本地调试跨域问题? 2:post请求,传参不成功,导致请求失败? 3:axios引用,在使用的组件里面引用 解决方案: 问题一:跨域? 解决本 ...