hadoop零散笔记

查找有没有这个软件通过管道查询:sudo apt-cache搜索| grep ssh


安装的话:sudo apt-get安装xxxxx

安装ssh后要生成一个文件即执行:ssh - keygen rsa - p - t”“- f ~/. ssh/id_rsa

最后在软/haoop/etc/hadoop目录下的三个文件中执行core-site.xml, hdfs-site.xml mapred-site。xml中配置


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


查看端口:netstat -lnpt netstat或netstat确切地。查看所有的端口:netstat另

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

把文件放到哪里用hadoop fs——xxxx/xxxx/xxxxx/xxx


往上面集群上放文件:hadoop - config/软/hadoop/etc/hadoop_cluster fs——/home/ubuntu/hell.一边txt/user/ubuntu/数据/

在集群上下载文件是:hadoop - config/软/hadoop/etc/hadoop_cluster fs -/user/ubuntu/数据/你好。txt bb。txt


查看文件的健康情况:hdfs - config/软/hadoop/etc/hadoop/etc/hadoop_cluster fsck/用户/ubuntu/数据/你好。txt



通过scp远程复制:scp - r/xxx/x


格式化文件系统:hdfs - config/软/hadoop/etc/hadoop_cluster namenode格式


触摸是建一个文本文件


从一个虚拟机登录到另个虚拟机ssh s2,如果是ssh s2 ls ~的话就是显示一列列是的样子。如果执行

ssh s2 ls ~ | xargs是显示一横的内容


查看集群状况:hadoop - config/软/hadoop/etc/hadoop_cluster fs lsr/

把文件放到集群上面就是hadoop - config/软/hadoop/etc/hadoop_cluster fs——xxxxx,后面是加所放的路径位置


查看进程ssh s2译本,每分钟房颤也是查看进程,。杀死进程是kill - 9后面加进程的端口号


苏根根用户


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

HDFS概念:namenode,datanode 

namenode:镜像文件+编辑日志,存放于本地磁盘,以及数据节点信息,不含块信息.block信息在集群启动时由datanode重建

datanode:工作节点,存储检索块定期向namenode发送块列表


在当地/usr/sbin下切换到苏根用户下建脚本,编写你想要的执行脚本


修改blocksize大小,默认是128

它在[hdfs-site.xml]

dfs。blocksize=8米,设置块大小是8 m

1、测试方式:把文件,比;8 m,通过webui查看块大小


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


hadoop:可靠,可伸缩,分布式的计算框架,开源软件


四大模块:1,常见——hadoop-commom-xxx。jar

, 2, hdfs

,,,,,3,mapreduce

, 4,纱


hadoop完全分布式:

1, hdfs——→NameNode, Datanode, SecondaryNode(辅助名称节点)

2,纱——祝辞ResourceManager(资源管理器),NodeManager(节点管理器)


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

配置静态ip进入等的网络里面下编辑sudo纳米界面:


#这个文件描述了可用的网络接口的下面编写GRUB_CMDLINE_LINUX_DEFAULT=拔谋尽?/p>


在#取消禁用图形终端(grub-pc> grub_terminal=控制台//打开注释


改后执行sudo update-grub最后执行重启sudo重启


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

启动所有的数据节点:

hadoop-daemons。sh namenode启动//在名称节点服务器上执行启动名称节点

hadoop-daemons。sh开始datanode//在指定的datanode上执行,启动所有的数据节点

hadoop-daemon。sh开始secondsrynamenode//启动辅助名称节点


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

hdfs getconf能查看到节点配置信息。比如hdfs getconf namenode可以知道是在s1客户机上运行



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

四大模块:

1, common 

hadoop-coommon-xxx.jar

core-site.xml

core-default.xml

2, hdfs

hdfs-site.xml

hdfs-defailt.xml

3, mapreduce

mapre-site.xml mapred-default.xml

4,纱

yarn-site.xml

hadoop零散笔记