本站分享:AI、大数据、数据分析师培训认证考试,包括:Python培训Excel培训Matlab培训SPSS培训SAS培训R语言培训Hadoop培训Amos培训Stata培训Eviews培训

shell编程实例_shell编程实例大全_linux shell编程实例_shell脚本编程实例

hadoop培训 cdadata 3105℃

shell编程实例_shell编程实例大全_linux shell编程实例_shell脚本编程实例

shell编程实例

第一部分:Hadoop Bin

后面根据项目的实际需要Hadoop Bin  包括:

Hadoop  hadoop的Shell

hadoop-config.sh 它的作用是对一些变量进行赋值

HADOOP_HOME(hadoop的安装目录)。

HADOOP_CONF_DIR(hadoop的配置文件目录)。HADOOP_SLAVES(–hosts指定的文件的地址)

hadoop-daemon.sh 单节点启动

hadoop-daemons.sh 启动slaves.sh和hadoop-daemon.sh

start-all.sh    启动HDFS与MapReduce

start-balancer.sh 启动Hadoop的负载均衡

start-dfs.sh  启动HDFS

start-jobhistoryserver.sh

start-mapred.sh  启动MapReduce

来进行调整。

后面根据项目的实际需要Hadoop Bin  包括:

Hadoop  hadoop的Shell

hadoop-config.sh 它的作用是对一些变量进行赋值

HADOOP_HOME(hadoop的安装目录)。

HADOOP_CONF_DIR(hadoop的配置文件目录)。

HADOOP_SLAVES(–hosts指定的文件的地址)

hadoop-daemon.sh 单节点启动

hadoop-daemons.sh 在所有slaves上运行相同的脚本hadoop-daemon.sh

start-all.sh    启动HDFS与MapReduce

start-balancer.sh 启动Hadoop的负载均衡

start-dfs.sh  启动HDFS

start-jobhistoryserver.sh

start-mapred.sh  启动MapReduce

来进行调整。

stop-all.sh   停止HDFS与MapReduce

stop-balancer.sh 停止做负载均衡

stop-dfs.sh   停止HDFS

stop-jobhistoryserver.sh 停止Job追踪

stop-mapred.sh 停止MapReduce

task-controller

第二部分:Hadoop Shell 基本操作

nHadoop shell

包括:    namenode -format     format the DFS filesystem

secondarynamenode    run the DFS secondary namenode

namenode             run the DFS namenode

datanode             run a DFS datanode

dfsadmin             run a DFS admin client

mradmin              run a Map-Reduce admin client

fsck                 run a DFS filesystem checking utility

fs                   run a generic filesystem user client

balancer             run a cluster balancing utility

fetchdt              fetch  delegation token from the NameNode

jobtracker           run the MapReduce job Tracker node

pipes                run a Pipes job

tasktracker          run a MapReduce task Tracker node

historyserver        run job history servers as a standalone daemon

job                  manipulate MapReduce jobs

queue                get information regarding JobQueues

version              print the version

jar <jar>            run a jar file

distcp <srcurl> <desturl> copy file or directories recursively

archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive

classpath            prints the class path needed to get the

Hadoop jar and the required libraries

daemonlog            get/set the log level for each daemon

or

CLASSNAME            run the class named CLASSNAME

转载请注明:数据分析 » shell编程实例_shell编程实例大全_linux shell编程实例_shell脚本编程实例

喜欢 (1)or分享 (0)