hadoop大数据组件启动
1.1.启动集群
sbin/start-dfs.sh
注:这个启动脚本是通过ssh对多个节点的namenode、datanode、journalnode以及zkfc进程进行批量启动的。
1.2.启动NameNode
sbin/hadoop-daemon.sh start namenode
1.3.启动DataNode
sbin/hadoop-daemon.sh start datanode
1.4. 启动 MR的HistoryServer
sbin/mr-jobhistory-daemon.sh start historyserver
1.4.停止集群
sbin/stop-dfs.sh
1.5.停止单个进程
sbin/hadoop-daemon.sh stop zkfc
sbin/hadoop-daemon.sh stop journalnode
sbin/hadoop-daemon.sh stop datanode
sbin/hadoop-daemon.sh stop namenode
参考:http://www.cnblogs.com/jun1019/p/6266615.html
2. Yarn (v 2.7.3)
2.1.启动集群
sbin/start-yarn.sh
注:start-yarn.sh启动脚本只在本地启动一个ResourceManager进程,而3台机器上的nodemanager都是通过ssh的方式启动的。
2.2.启动ResouceMananger
sbin/yarn-daemon.sh start resourcemanager
2.3.启动NodeManager
sbin/yarn-daemon.sh start nodemanager
2.3.启动JobHistoryServer
sbin/yarn-daemon.sh start historyserver
2.4.停止集群
sbin/stop-yarn.sh
2.5.停止单个节点
sbin/yarn-daemon.sh stop resourcemanager
sbin/yarn-daemon.sh stop nodemanager
参考:http://www.cnblogs.com/jun1019/p/6266615.html
3. Zookeeper (v 3.4.5)
3.1.启动集群
bin/zkServer.sh start
3.2.启动单个节点
bin/zkServer.sh start
3.3.启动客户端
bin/zkCli.sh -server master:2181
4.Kafka (v 2.10-0.10.1.1)
4.1.启动集群
bin/kafka-server-start.sh -daemon config/server.properties
4.2.启动单个节点
bin/kafka-server-start.sh -daemon config/server.properties
4.3.创建Topic
bin/kafka-topics.sh --create --zookeeper master:2181 --replication-factor 1 --partitions 1 --topic test
4.4.列出Topic
bin/kafka-topics.sh --list --zookeeper master:2181
4.5.生产数据
bin/kafka-console-producer.sh --broker-list master:9092 --topic test
4.6.读取数据
bin/kafka-console-consumer.sh --zookeeper master:2181 --topic test --from-beginning
5.Hbase (v 1.2.4)
5.1.启动/停止集群
bin/start-hbase.sh
bin/stop-hbase.sh
5.2. 启动/停止HMaster
bin/hbase-daemon.sh start master
bin/hbase-daemon.sh stop master
5.3. 启动/停止HRegionServer
bin/hbase-daemon.sh start regionserver
bin/hbase-daemon.sh stop regionserver
5.2.启动Shell
bin/hbase shell
6.Spark (v 2.1.0-bin-hadoop2.7)
6.1.启动程序
6.1.1. 本地
bin/spark-shell --master local
6.1.2.Standalone
bin/spark-shell --master spark://master:7077
6.1.3. Yarn Client
bin/spark-shell --master yarn-client
6.1.4. Yarn Cluster
bin/spark-shell --master yarn-cluster
7. Flume
7.1启动Agent
bin/flume-ng agent -n LogAgent -c conf -f conf/logagent.properties -Dflume.root.logger=DEBUG,console
8.Sqoop
8.1.导入
sqoop import \
--connect jdbc:mysql://mysql.example.com/sqoop \
--username sqoop \
--password sqoop \
--table cities
8.2.导出
复制代码
sqoop export \
--connect jdbc:mysql://mysql.example.com/sqoop \
--username sqoop \
--password sqoop \
--table cities \
--export-dir cities
复制代码
9.Hive
9.1 启动metastore
nohup hive --service metastore >> /home/zkpk/apache-hive-2.1.1-bin/metastore.log 2>&1 &
9.2 启动Hive server
nohup hive --service hiveserver2 >> /home/zkpk/apache-hive-2.1.1-bin/hiveserver.log 2>&1 &
9.2. 启动Shell
hive -h <host> -p <port>
beeline
!connect jdbc:hive2://master:10000
10. Mysql
10.1.启动Shell
mysql -u<user> -p<password>
---------------------------------------------------------------
5).启动storm集群:
[hadoop@bgs-5p173-wangwenting storm]$ cd /opt/storm/bin
[hadoop@bgs-5p173-wangwenting bin]$ nohup ./storm nimbus &
[hadoop@bgs-5p173-wangwenting bin]$ nohup ./storm ui &
b.再在bgs-5p174-wangwenting,bgs-5p175-wangwenting机器上启动supervisor
[hadoop@bgs-5p174-wangwenting bin]$ nohup ./storm supervisor &
[hadoop@bgs-5p175-wangwenting bin]$ nohup ./storm supervisor &
欢迎转载,转载时请在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.