热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

apachestorm1.0.2.tar.gz的集群搭建(3节点)(图文详解)(非HA和HA)

apache,storm,1,0,2,tar,gz,的,集群,搭建,3,节点,图文,详解

为什么我用过storm-0.9.6版本,我还要用storm-1.0.2?

storm集群也是由主节点和从节点组成的。 


storm版本的变更: 
storm0.9.x 
storm0.10.x 
storm1.x 
前面这些版本里面storm的核心源码是由Java+clojule组成的。 
storm2.x 
后期这个版本就是全部用java重写了。 
(阿里在很早的时候就对storm进程了重写,提供了jstorm,后期jstorm也加入到apachestorm 
负责使用java对storm进行重写,这就是storm2.x版本的由来。) 
注意: 
在storm0.9.x的版本中,storm集群只支持一个nimbus节点,主节点是存在问题。 
在storm0.10.x以后,storm集群可以支持多个nimbus节点,其中有一个为leader,负责真正运行,其余的为offline。 
主节点(控制节点 master)【主节点可以有一个或者多个】 
职责:负责分发代码,监控代码的执行。 
nimbus: 
ui:可以查看集群的信息以及topology的运行情况 
logviewer:因为主节点会有多个,有时候也需要查看主节点的日志信息。 
从节点(工作节点 worker)【从节点可以有一个或者多个】 
职责:负责产生worker进程,执行任务。 
supervisor: 
logviewer:可以通过webui界面查看topology的运行日志 

 

 

 

 

 

 

 

 

Storm的本地模式安装

本地模式在一个进程里面模拟一个storm集群的所有功能, 这对开发和测试来说非常方便。以本地模式运行topology跟在集群上运行topology类似。

要创建一个进程内“集群”,使用LocalCluster对象就可以了:

import backtype.storm.LocalCluster; LocalCluster cluster = new LocalCluster();

然后可以通过LocalCluster对象的submitTopology方法来提交topology, 效果和StormSubmitter对应的方法是一样的。submitTopology方法需要三个参数: topology的名字, topology的配置以及topology对象本身。你可以通过killTopology方法来终止一个topology, 它需要一个topology名字作为参数。

要关闭一个本地集群,简单调用:

cluster.shutdown();

就可以了。

 

 

 

 

 

Storm的分布式模式安装(本博文)

官方安装文档

http://storm.apache.org/releases/current/Setting-up-a-Storm-cluster.html

 

 

 

 

 机器情况:在master、slave1、slave2机器的/home/hadoop/app目录下分别下载storm安装包

 

 

 

 

 

 

 

 

 

本博文情况是

master  nimbus 

slave1  nimbus supervisor 

slave2  supervisor 

 

 

 

 

 

 

  1、apache-storm-1.0.2.tar.gz的下载

http://archive.apache.org/dist/storm/apache-storm-1.0.2/

 

 

或者,直接在安装目录下,在线下载

wget http://apache.fayea.com/storm/apache-storm-1.0.2/apache-storm-1.0.2.tar.gz

 

我这里,选择先下载好,再上传安装的方式。

 

 

 

 

2、上传压缩包

 

 

[hadoop@master app]$ ll total 64 drwxrwxr-x 10 hadoop hadoop 4096 May 21 14:23 apache-storm-0.9.6 drwxrwxr-x 5 hadoop hadoop 4096 May 1 15:21 azkaban drwxrwxr-x 7 hadoop hadoop 4096 Apr 21 15:43 elasticsearch-2.4.0 drwxrwxr-x 6 hadoop hadoop 4096 Apr 21 12:12 elasticsearch-2.4.3 lrwxrwxrwx 1 hadoop hadoop 20 Apr 21 15:00 es -> elasticsearch-2.4.0/ lrwxrwxrwx 1 hadoop hadoop 11 Apr 20 12:19 flume -> flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:17 flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:00 flume-1.7.0 lrwxrwxrwx. 1 hadoop hadoop 12 Apr 12 11:27 hadoop -> hadoop-2.6.0 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 16:33 hadoop-2.6.0 lrwxrwxrwx. 1 hadoop hadoop 13 Apr 12 11:28 hbase -> hbase-0.98.19 drwxrwxr-x. 8 hadoop hadoop 4096 Apr 12 17:27 hbase-0.98.19 lrwxrwxrwx. 1 hadoop hadoop 10 Apr 12 11:28 hive -> hive-1.0.0 drwxrwxr-x. 8 hadoop hadoop 4096 May 14 14:08 hive-1.0.0 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 10:18 jdk -> jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Aug 5 2015 jdk1.8.0_60 lrwxrwxrwx 1 hadoop hadoop 18 May 3 21:41 kafka -> kafka_2.11-0.8.2.2 drwxr-xr-x 6 hadoop hadoop 4096 May 3 22:01 kafka_2.11-0.8.2.2 lrwxrwxrwx 1 hadoop hadoop 26 Apr 21 22:18 kibana -> kibana-4.6.3-linux-x86_64/ drwxrwxr-x 11 hadoop hadoop 4096 Nov 4 2016 kibana-4.6.3-linux-x86_64 lrwxrwxrwx 1 hadoop hadoop 12 May 1 19:35 snappy -> snappy-1.1.3 drwxr-xr-x 6 hadoop hadoop 4096 May 1 19:40 snappy-1.1.3 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 11:28 sqoop -> sqoop-1.4.6 drwxr-xr-x. 9 hadoop hadoop 4096 May 19 10:31 sqoop-1.4.6 lrwxrwxrwx 1 hadoop hadoop 19 May 21 13:17 storm -> apache-storm-0.9.6/ lrwxrwxrwx. 1 hadoop hadoop 15 Apr 12 11:28 zookeeper -> zookeeper-3.4.6 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 17:13 zookeeper-3.4.6 [hadoop@master app]$ rz [hadoop@master app]$ ll total 175032 drwxrwxr-x 10 hadoop hadoop 4096 May 21 14:23 apache-storm-0.9.6 -rw-r--r-- 1 hadoop hadoop 179161400 May 21 15:31 apache-storm-1.0.2.tar.gz drwxrwxr-x 5 hadoop hadoop 4096 May 1 15:21 azkaban drwxrwxr-x 7 hadoop hadoop 4096 Apr 21 15:43 elasticsearch-2.4.0 drwxrwxr-x 6 hadoop hadoop 4096 Apr 21 12:12 elasticsearch-2.4.3 lrwxrwxrwx 1 hadoop hadoop 20 Apr 21 15:00 es -> elasticsearch-2.4.0/ lrwxrwxrwx 1 hadoop hadoop 11 Apr 20 12:19 flume -> flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:17 flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:00 flume-1.7.0 lrwxrwxrwx. 1 hadoop hadoop 12 Apr 12 11:27 hadoop -> hadoop-2.6.0 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 16:33 hadoop-2.6.0 lrwxrwxrwx. 1 hadoop hadoop 13 Apr 12 11:28 hbase -> hbase-0.98.19 drwxrwxr-x. 8 hadoop hadoop 4096 Apr 12 17:27 hbase-0.98.19 lrwxrwxrwx. 1 hadoop hadoop 10 Apr 12 11:28 hive -> hive-1.0.0 drwxrwxr-x. 8 hadoop hadoop 4096 May 14 14:08 hive-1.0.0 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 10:18 jdk -> jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Aug 5 2015 jdk1.8.0_60 lrwxrwxrwx 1 hadoop hadoop 18 May 3 21:41 kafka -> kafka_2.11-0.8.2.2 drwxr-xr-x 6 hadoop hadoop 4096 May 3 22:01 kafka_2.11-0.8.2.2 lrwxrwxrwx 1 hadoop hadoop 26 Apr 21 22:18 kibana -> kibana-4.6.3-linux-x86_64/ drwxrwxr-x 11 hadoop hadoop 4096 Nov 4 2016 kibana-4.6.3-linux-x86_64 lrwxrwxrwx 1 hadoop hadoop 12 May 1 19:35 snappy -> snappy-1.1.3 drwxr-xr-x 6 hadoop hadoop 4096 May 1 19:40 snappy-1.1.3 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 11:28 sqoop -> sqoop-1.4.6 drwxr-xr-x. 9 hadoop hadoop 4096 May 19 10:31 sqoop-1.4.6 lrwxrwxrwx 1 hadoop hadoop 19 May 21 13:17 storm -> apache-storm-0.9.6/ lrwxrwxrwx. 1 hadoop hadoop 15 Apr 12 11:28 zookeeper -> zookeeper-3.4.6 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 17:13 zookeeper-3.4.6 [hadoop@master app]$ 

slave1和slave2机器同样。不多赘述。

 

 

 

 

 3、解压压缩包,并赋予用户组和用户权限

[hadoop@master app]$ ll total 175032 drwxrwxr-x 10 hadoop hadoop 4096 May 21 14:23 apache-storm-0.9.6 -rw-r--r-- 1 hadoop hadoop 179161400 May 21 15:31 apache-storm-1.0.2.tar.gz drwxrwxr-x 5 hadoop hadoop 4096 May 1 15:21 azkaban drwxrwxr-x 7 hadoop hadoop 4096 Apr 21 15:43 elasticsearch-2.4.0 drwxrwxr-x 6 hadoop hadoop 4096 Apr 21 12:12 elasticsearch-2.4.3 lrwxrwxrwx 1 hadoop hadoop 20 Apr 21 15:00 es -> elasticsearch-2.4.0/ lrwxrwxrwx 1 hadoop hadoop 11 Apr 20 12:19 flume -> flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:17 flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:00 flume-1.7.0 lrwxrwxrwx. 1 hadoop hadoop 12 Apr 12 11:27 hadoop -> hadoop-2.6.0 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 16:33 hadoop-2.6.0 lrwxrwxrwx. 1 hadoop hadoop 13 Apr 12 11:28 hbase -> hbase-0.98.19 drwxrwxr-x. 8 hadoop hadoop 4096 Apr 12 17:27 hbase-0.98.19 lrwxrwxrwx. 1 hadoop hadoop 10 Apr 12 11:28 hive -> hive-1.0.0 drwxrwxr-x. 8 hadoop hadoop 4096 May 14 14:08 hive-1.0.0 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 10:18 jdk -> jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Aug 5 2015 jdk1.8.0_60 lrwxrwxrwx 1 hadoop hadoop 18 May 3 21:41 kafka -> kafka_2.11-0.8.2.2 drwxr-xr-x 6 hadoop hadoop 4096 May 3 22:01 kafka_2.11-0.8.2.2 lrwxrwxrwx 1 hadoop hadoop 26 Apr 21 22:18 kibana -> kibana-4.6.3-linux-x86_64/ drwxrwxr-x 11 hadoop hadoop 4096 Nov 4 2016 kibana-4.6.3-linux-x86_64 lrwxrwxrwx 1 hadoop hadoop 12 May 1 19:35 snappy -> snappy-1.1.3 drwxr-xr-x 6 hadoop hadoop 4096 May 1 19:40 snappy-1.1.3 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 11:28 sqoop -> sqoop-1.4.6 drwxr-xr-x. 9 hadoop hadoop 4096 May 19 10:31 sqoop-1.4.6 lrwxrwxrwx 1 hadoop hadoop 19 May 21 13:17 storm -> apache-storm-0.9.6/ lrwxrwxrwx. 1 hadoop hadoop 15 Apr 12 11:28 zookeeper -> zookeeper-3.4.6 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 17:13 zookeeper-3.4.6 [hadoop@master app]$ tar -zxvf apache-storm-1.0.2.tar.gz 

slave1和slave2机器同样。不多赘述。

 

 

 

 4、删除压缩包,为了更好容下多版本,创建软链接

大数据各子项目的环境搭建之建立与删除软连接(博主推荐)

 

[hadoop@master app]$ ll total 68 drwxrwxr-x 2 hadoop hadoop 4096 May 21 17:20 apache-storm-0.9.6 drwxrwxr-x 11 hadoop hadoop 4096 May 21 17:18 apache-storm-1.0.2 drwxrwxr-x 5 hadoop hadoop 4096 May 1 15:21 azkaban drwxrwxr-x 7 hadoop hadoop 4096 Apr 21 15:43 elasticsearch-2.4.0 drwxrwxr-x 6 hadoop hadoop 4096 Apr 21 12:12 elasticsearch-2.4.3 lrwxrwxrwx 1 hadoop hadoop 20 Apr 21 15:00 es -> elasticsearch-2.4.0/ lrwxrwxrwx 1 hadoop hadoop 11 Apr 20 12:19 flume -> flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:17 flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:00 flume-1.7.0 lrwxrwxrwx. 1 hadoop hadoop 12 Apr 12 11:27 hadoop -> hadoop-2.6.0 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 16:33 hadoop-2.6.0 lrwxrwxrwx. 1 hadoop hadoop 13 Apr 12 11:28 hbase -> hbase-0.98.19 drwxrwxr-x. 8 hadoop hadoop 4096 Apr 12 17:27 hbase-0.98.19 lrwxrwxrwx. 1 hadoop hadoop 10 Apr 12 11:28 hive -> hive-1.0.0 drwxrwxr-x. 8 hadoop hadoop 4096 May 14 14:08 hive-1.0.0 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 10:18 jdk -> jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Aug 5 2015 jdk1.8.0_60 lrwxrwxrwx 1 hadoop hadoop 18 May 3 21:41 kafka -> kafka_2.11-0.8.2.2 drwxr-xr-x 6 hadoop hadoop 4096 May 3 22:01 kafka_2.11-0.8.2.2 lrwxrwxrwx 1 hadoop hadoop 26 Apr 21 22:18 kibana -> kibana-4.6.3-linux-x86_64/ drwxrwxr-x 11 hadoop hadoop 4096 Nov 4 2016 kibana-4.6.3-linux-x86_64 lrwxrwxrwx 1 hadoop hadoop 12 May 1 19:35 snappy -> snappy-1.1.3 drwxr-xr-x 6 hadoop hadoop 4096 May 1 19:40 snappy-1.1.3 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 11:28 sqoop -> sqoop-1.4.6 drwxr-xr-x. 9 hadoop hadoop 4096 May 19 10:31 sqoop-1.4.6 lrwxrwxrwx. 1 hadoop hadoop 15 Apr 12 11:28 zookeeper -> zookeeper-3.4.6 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 17:13 zookeeper-3.4.6 [hadoop@master app]$ ln -s apache-storm-1.0.2/ storm [hadoop@master app]$ ll total 68 drwxrwxr-x 2 hadoop hadoop 4096 May 21 17:20 apache-storm-0.9.6 drwxrwxr-x 11 hadoop hadoop 4096 May 21 17:18 apache-storm-1.0.2 drwxrwxr-x 5 hadoop hadoop 4096 May 1 15:21 azkaban drwxrwxr-x 7 hadoop hadoop 4096 Apr 21 15:43 elasticsearch-2.4.0 drwxrwxr-x 6 hadoop hadoop 4096 Apr 21 12:12 elasticsearch-2.4.3 lrwxrwxrwx 1 hadoop hadoop 20 Apr 21 15:00 es -> elasticsearch-2.4.0/ lrwxrwxrwx 1 hadoop hadoop 11 Apr 20 12:19 flume -> flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:17 flume-1.6.0 drwxrwxr-x 7 hadoop hadoop 4096 Apr 20 12:00 flume-1.7.0 lrwxrwxrwx. 1 hadoop hadoop 12 Apr 12 11:27 hadoop -> hadoop-2.6.0 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 16:33 hadoop-2.6.0 lrwxrwxrwx. 1 hadoop hadoop 13 Apr 12 11:28 hbase -> hbase-0.98.19 drwxrwxr-x. 8 hadoop hadoop 4096 Apr 12 17:27 hbase-0.98.19 lrwxrwxrwx. 1 hadoop hadoop 10 Apr 12 11:28 hive -> hive-1.0.0 drwxrwxr-x. 8 hadoop hadoop 4096 May 14 14:08 hive-1.0.0 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 10:18 jdk -> jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79 drwxr-xr-x. 8 hadoop hadoop 4096 Aug 5 2015 jdk1.8.0_60 lrwxrwxrwx 1 hadoop hadoop 18 May 3 21:41 kafka -> kafka_2.11-0.8.2.2 drwxr-xr-x 6 hadoop hadoop 4096 May 3 22:01 kafka_2.11-0.8.2.2 lrwxrwxrwx 1 hadoop hadoop 26 Apr 21 22:18 kibana -> kibana-4.6.3-linux-x86_64/ drwxrwxr-x 11 hadoop hadoop 4096 Nov 4 2016 kibana-4.6.3-linux-x86_64 lrwxrwxrwx 1 hadoop hadoop 12 May 1 19:35 snappy -> snappy-1.1.3 drwxr-xr-x 6 hadoop hadoop 4096 May 1 19:40 snappy-1.1.3 lrwxrwxrwx. 1 hadoop hadoop 11 Apr 12 11:28 sqoop -> sqoop-1.4.6 drwxr-xr-x. 9 hadoop hadoop 4096 May 19 10:31 sqoop-1.4.6 lrwxrwxrwx 1 hadoop hadoop 19 May 21 17:21 storm -> apache-storm-1.0.2/ lrwxrwxrwx. 1 hadoop hadoop 15 Apr 12 11:28 zookeeper -> zookeeper-3.4.6 drwxr-xr-x. 10 hadoop hadoop 4096 Apr 12 17:13 zookeeper-3.4.6 [hadoop@master app]$ 

slave1和slave2机器同样。不多赘述。

 

 

 

 5、修改配置环境

[hadoop@master app]$ su root Password: [root@master app]# vim /etc/profile

  slave1和slave2机器同样。不多赘述

 

 

#storm export STORM_HOME=/home/hadoop/app/storm export PATH=$PATH:$STORM_HOME/bin

  slave1和slave2机器同样。不多赘述

 

[hadoop@master app]$ su root Password: [root@master app]# vim /etc/profile [root@master app]# source /etc/profile [root@master app]# 

slave1和slave2机器同样。不多赘述

 

 

 

 

6、下载好Storm集群所需的其他

 

 

 

 

  因为博主我的机器是CentOS6.5,已经自带了

 

[hadoop@master ~]$ python Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 

 

 

 

 

7、配置storm的配置文件

[hadoop@master storm]$ pwd /home/hadoop/app/storm [hadoop@master storm]$ ll total 200 drwxrwxr-x 2 hadoop hadoop 4096 May 21 17:18 bin -rw-r--r-- 1 hadoop hadoop 82317 Jul 27 2016 CHANGELOG.md drwxrwxr-x 2 hadoop hadoop 4096 May 21 17:18 conf drwxrwxr-x 3 hadoop hadoop 4096 Jul 27 2016 examples drwxrwxr-x 17 hadoop hadoop 4096 May 21 17:18 external drwxrwxr-x 2 hadoop hadoop 4096 Jul 27 2016 extlib drwxrwxr-x 2 hadoop hadoop 4096 Jul 27 2016 extlib-daemon drwxrwxr-x 2 hadoop hadoop 4096 May 21 17:18 lib -rw-r--r-- 1 hadoop hadoop 32101 Jul 27 2016 LICENSE drwxrwxr-x 2 hadoop hadoop 4096 May 21 17:18 log4j2 -rw-r--r-- 1 hadoop hadoop 981 Jul 27 2016 NOTICE drwxrwxr-x 6 hadoop hadoop 4096 May 21 17:18 public -rw-r--r-- 1 hadoop hadoop 15287 Jul 27 2016 README.markdown -rw-r--r-- 1 hadoop hadoop 6 Jul 27 2016 RELEASE -rw-r--r-- 1 hadoop hadoop 23774 Jul 27 2016 SECURITY.md [hadoop@master storm]$ 

 

 

 

 进入storm配置目录下,修改配置文件storm.yaml

[hadoop@master conf]$ pwd /home/hadoop/app/storm/conf [hadoop@master conf]$ ll total 12 -rw-r--r-- 1 hadoop hadoop 1128 Jul 27 2016 storm_env.ini -rwxr-xr-x 1 hadoop hadoop 947 Jul 27 2016 storm-env.sh -rw-r--r-- 1 hadoop hadoop 1635 Jul 27 2016 storm.yaml [hadoop@master conf]$ vim storm.yaml 

slave1和slave2机器同样。不多赘述

 

 

 

 

 

这里,教给大家一个非常好的技巧。

大数据搭建各个子项目时配置文件技巧(适合CentOS和Ubuntu系统)(博主推荐)

 

 

 注意第一列需要一个空格

 

 

 

 注意第一列需要一个空格(HA

 

 storm.zookeeper.servers: - "master" - "slave1" - "slave2" nimbus.seeds: ["master", "slave1"] ui.port: 9999 storm.local.dir: "/home/hadoop/data/storm" supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703

注意:我的这里ui.port选定为9999,是自定义,为了解决Storm 和spark默认的 8080 端口冲突

slave1和slave2机器同样。不多赘述。

 

 

 

 

 

 

注意第一列需要一个空格(HA

 

 storm.zookeeper.servers: - "master" - "slave1" - "slave2" nimbus.seeds: ["master"] ui.port: 9999 storm.local.dir: "/home/hadoop/data/storm" supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703

注意:我的这里ui.port选定为9999,是自定义,为了解决Storm 和spark默认的 8080 端口冲突!

slave1和slave2机器同样。不多赘述。

 

 

 

 

8、新建storm数据存储的路径目录

[hadoop@master conf]$ mkdir -p /home/hadoop/data/storm

slave1和slave2机器同样。不多赘述

 

 

 

 

 9、启动storm集群(HA

本博文情况是

master(主) nimbus 

slave1(主)(从)  nimbus supervisor 

slave2(从)  supervisor 

 

 

1、先在master上启动 

nohup bin/storm nimbus >/dev/null 2>&1 & 

 

[hadoop@master storm]$ jps 2374 QuorumPeerMain 7862 Jps 3343 AzkabanWebServer 2813 ResourceManager 3401 AzkabanExecutorServer 2515 NameNode 2671 SecondaryNameNode [hadoop@master storm]$ nohup bin/storm nimbus >/dev/null 2>&1 & [1] 7876 [hadoop@master storm]$ jps 2374 QuorumPeerMain 7905 Jps 7910 config_value 3343 AzkabanWebServer 2813 ResourceManager 3401 AzkabanExecutorServer 2515 NameNode 2671 SecondaryNameNode [hadoop@master storm]$

 

 

 

 

 

 

 

 

2、再在slave1上启动

nohup bin/storm nimbus >/dev/null 2>&1 & 

 

[hadoop@slave1 storm]$ jps 2421 NodeManager 2342 DataNode 4892 Jps 2274 QuorumPeerMain [hadoop@slave1 storm]$ nohup bin/storm nimbus >/dev/null 2>&1 & [1] 4904

[hadoop@slave1 storm]$ jps
2421 NodeManager
5244 Jps
2342 DataNode
5135 nimbus
5234 config_value
2274 QuorumPeerMain

 

 

 

 

 

 

 

 

 

 

 

3、先在slave1和slave2上启动

nohup bin/storm supervisor >/dev/null 2>&1 & 

 

 

 

 

 

[hadoop@slave2 storm]$ jps 4868 Jps 4089 supervisor 2365 NodeManager 2291 DataNode 2229 QuorumPeerMain [hadoop@slave2 storm]$ nohup bin/storm supervisor >/dev/null 2>&1 & [1] 4903 [hadoop@slave2 storm]$ jps 4918 Jps 4089 supervisor 2365 NodeManager 2291 DataNode 2229 QuorumPeerMain [hadoop@slave2 storm]$ 

 

 

 

 

 

 

4、在master上启动

nohup bin/storm ui>/dev/null 2>&1 & 

 

[hadoop@master storm]$ jps 8550 config_value 2374 QuorumPeerMain 8113 supervisor 3343 AzkabanWebServer 2813 ResourceManager 8560 Jps 3401 AzkabanExecutorServer 8524 config_value 8372 core 2515 NameNode 2671 SecondaryNameNode [hadoop@master storm]$ nohup bin/storm ui>/dev/null 2>&1 & [7] 8582 [hadoop@master storm]$ jps 2374 QuorumPeerMain 8113 supervisor 8623 Jps 3343 AzkabanWebServer 2813 ResourceManager 3401 AzkabanExecutorServer 8372 core 2515 NameNode 8597 config_value 2671 SecondaryNameNode 8613 config_value [hadoop@master storm]$ 

 

 

 

 

 

5、在master、slave1和slave2上启动

nohup bin/storm logviwer >/dev/null 2>&1 & 

 

 

 

 

 

 

 9、启动storm集群(非HA

本博文情况是

master(主) nimbus 

slave1(主)(从)  supervisor 

slave2(从)  supervisor 

 

 

1、先在master上启动 

nohup bin/storm nimbus >/dev/null 2>&1 & 

 

[hadoop@master storm]$ jps 2374 QuorumPeerMain 7862 Jps 3343 AzkabanWebServer 2813 ResourceManager 3401 AzkabanExecutorServer 2515 NameNode 2671 SecondaryNameNode [hadoop@master storm]$ nohup bin/storm nimbus >/dev/null 2>&1 & [1] 7876 [hadoop@master storm]$ jps 2374 QuorumPeerMain 7905 Jps 7910 config_value 3343 AzkabanWebServer 2813 ResourceManager 3401 AzkabanExecutorServer 2515 NameNode 2671 SecondaryNameNode
9743 nimbus [hadoop@master storm]$

 

 

 

 

2、先在slave1和slave2上启动

nohup bin/storm supervisor >/dev/null 2>&1 & 

 

 

 

 

 

[hadoop@slave2 storm]$ jps 4868 Jps 4089 supervisor 2365 NodeManager 2291 DataNode 2229 QuorumPeerMain [hadoop@slave2 storm]$ nohup bin/storm supervisor >/dev/null 2>&1 & [1] 4903 [hadoop@slave2 storm]$ jps 4918 Jps 4089 supervisor 2365 NodeManager 2291 DataNode 2229 QuorumPeerMain [hadoop@slave2 storm]$ 

 

 

 

 

 

 

3、在master上启动

nohup bin/storm ui>/dev/null 2>&1 & 

 

[hadoop@master storm]$ jps 8550 config_value 2374 QuorumPeerMain 8113 supervisor 3343 AzkabanWebServer 2813 ResourceManager 8560 Jps 3401 AzkabanExecutorServer 8524 config_value 8372 core 2515 NameNode 2671 SecondaryNameNode [hadoop@master storm]$ nohup bin/storm ui>/dev/null 2>&1 & [7] 8582 [hadoop@master storm]$ jps 2374 QuorumPeerMain 8113 supervisor 8623 Jps 3343 AzkabanWebServer 2813 ResourceManager 3401 AzkabanExecutorServer 8372 core 2515 NameNode 8597 config_value 2671 SecondaryNameNode 8613 config_value [hadoop@master storm]$ 

 

 

 

4、在master、slave1和slave2上启动

nohup bin/storm logviwer >/dev/null 2>&1 & 

 

 

 

 



本文转自大数据躺过的坑博客园博客,原文链接:http://www.cnblogs.com/zlslch/p/6885145.html,如需转载请自行联系原作者


推荐阅读
  • 本文回顾了作者在求职阿里和腾讯实习生过程中,从最初的迷茫到最后成功获得Offer的心路历程。文中不仅分享了个人的面试经历,还提供了宝贵的面试准备建议和技巧。 ... [详细]
  • 使用 ModelAttribute 实现页面数据自动填充
    本文介绍了如何利用 Spring MVC 中的 ModelAttribute 注解,在页面跳转后自动填充表单数据。主要探讨了两种实现方法及其背后的原理。 ... [详细]
  • Python3爬虫入门:pyspider的基本使用[python爬虫入门]
    Python学习网有大量免费的Python入门教程,欢迎大家来学习。本文主要通过爬取去哪儿网的旅游攻略来给大家介绍pyspid ... [详细]
  • 使用jQuery与百度地图API实现地址转经纬度功能
    本文详细介绍了如何利用jQuery和百度地图API将地址转换为经纬度,包括申请API密钥、页面构建及核心代码实现。 ... [详细]
  • 本文探讨了如何通过JavaScript检测鼠标是否离开了浏览器窗口,包括使用原生方法和第三方库的不同解决方案。 ... [详细]
  • selenium通过JS语法操作页面元素
    做过web测试的小伙伴们都知道,web元素现在很多是JS写的,那么既然是JS写的,可以通过JS语言去操作页面,来帮助我们操作一些selenium不能覆盖的功能。问题来了我们能否通过 ... [详细]
  • 本文由公众号【数智物语】(ID: decision_engine)发布,关注获取更多干货。文章探讨了从数据收集到清洗、建模及可视化的全过程,介绍了41款实用工具,旨在帮助数据科学家和分析师提升工作效率。 ... [详细]
  • 页面预渲染适用于主要包含静态内容的页面。对于依赖大量API调用的动态页面,建议采用SSR(服务器端渲染),如Nuxt等框架。更多优化策略可参见:https://github.com/HaoChuan9421/vue-cli3-optimization ... [详细]
  • 本文分享了作者在使用LaTeX过程中的几点心得,涵盖了从文档编辑、代码高亮、图形绘制到3D模型展示等多个方面的内容。适合希望深入了解LaTeX高级功能的用户。 ... [详细]
  • 【MySQL】frm文件解析
    官网说明:http:dev.mysql.comdocinternalsenfrm-file-format.htmlfrm是MySQL表结构定义文件,通常frm文件是不会损坏的,但是如果 ... [详细]
  • Asynchronous JavaScript and XML (AJAX) 的流行很大程度上得益于 Google 在其产品如 Google Suggest 和 Google Maps 中的应用。本文将深入探讨 AJAX 在 .NET 环境下的工作原理及其实现方法。 ... [详细]
  • 本文探讨了在AspNetForums平台中实施基于角色的权限控制系统的方法,旨在为不同级别的用户提供合适的访问权限,确保系统的安全性和可用性。 ... [详细]
  • 本文介绍了用户界面(User Interface, UI)的基本概念,以及在iOS应用程序中UIView及其子类的重要性和使用方式。文章详细探讨了UIView如何作为用户交互的核心组件,以及它与其他UI控件和业务逻辑的关系。 ... [详细]
  • 尽管在WPF中工作了一段时间,但在菜单控件的样式设置上遇到了一些基础问题,特别是关于如何正确配置前景色和背景色。 ... [详细]
  • 本文详细介绍如何在 Apache 中设置虚拟主机,包括基本配置和高级设置,帮助用户更好地理解和使用虚拟主机功能。 ... [详细]
author-avatar
昆仑神奇_325
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有