Storm搭建

版权声明:有一种生活不去经历不知其中艰辛,有一种艰辛不去体会,不会知道其中快乐,有一种快乐,没有拥有不知其中纯粹 https://blog.csdn.net/wwwzydcom/article/details/84961259

进入官方网址:http://storm.apache.org/

在这里插入图片描述
在这里插入图片描述
官网步骤:

  1. Set up a Zookeeper cluster
  2. Install dependencies on Nimbus and worker machines
  3. Download and extract a Storm release to Nimbus and worker machines
  4. Fill in mandatory configurations into storm.yaml
  5. Launch daemons under supervision using “storm” script and a supervisor of your choice

三台虚拟机:三个hadoop集群,三台zookeeper,三台storm,并且note01为主节点

解压

tar -zxvf apache-storm-1.1.0.tar.gz -C /opt/module/

拷贝到其他节点上

scp -r apache-storm-1.1.0 note02:pwd

scp -r apache-storm-1.1.0 note03:pwd

进入storm目录

[root@note03 apache-storm-1.1.0]# mkdir data

修改配置文件

[root@note03 apache-storm-1.1.0]# cd conf/

# 设置zookeeper的主机名称
 storm.zookeeper.servers:
     - "note01"
     - "note02"
     - "note03"
     
#设置主节点的主机名称
 nimbus.seeds: ["note01"]
 #设置storm数据存储路径 
storm.local.dir: "/opt/module/apache-storm-1.1.0/data"
#设置worker的端口号
supervisor.slots.ports:
    - 6700
    - 6701
    - 6702

配置环境变量

 vi /etc/profile
 
STORM_HOME=/opt/module/apache-storm-1.1.
PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/sbin:$HADOOP_HOME/bin:$ZOOKEEPER_HOME/bin:$HIVE_HOME/bin:$HBASE_HOME/bin:$FLUME_HOME/bin:$SQOOP_HOME/bin:$STORM_HOME/bin

source /etc/profile

同步

[root@note01 etc]# scp profile note02:`pwd`
profile                                                   100% 2278     2.2KB/s   00:00    
[root@note01 etc]# scp profile note03:`pwd`
profile  

出现BUG

Caused by: expected '<document start>', but found BlockMappingStart
 in 'reader', line 28, column 1:
    storm.local.dir: "/opt/module/ap ... 

解决

在这里插入图片描述
要求:不能有空格和换行

重新启动

[root@note01 conf]# storm nimbus

在这里插入图片描述
成功

同步到其他节点上

[root@note01 conf]# scp storm.yaml note02:`pwd`
storm.yaml                                                100% 3209     3.1KB/s   00:00    
[root@note01 conf]# scp storm.yaml note03:`pwd`
storm.yaml                                                100% 3209     3.1KB/s   00:00 

启动时jps查询,节点上会多出一个nimbus进程,并且只有部分节点启动会出现一个config_value的进程

[root@note01 conf]# jps
1729 nimbus
1387 QuorumPeerMain
1846 Jps

启动所有的supervisor进程

[root@note01 conf]# storm supervisor &

启动UI

[root@note01 conf]# storm ui

进入UI界面

http://note01:8080/index.html

正常情况下是看不到日志信息
在这里插入图片描述
在这里插入图片描述

logviewer,可以在web页面点击相应的端口号即可查看日志

在这里插入图片描述
查看日志信息

猜你喜欢

转载自blog.csdn.net/wwwzydcom/article/details/84961259