storm 集群配置
配置storm集群的过程中出现写问题,记录下来
1.storm是通过zookeeper管理的,先要安装zookeeper,从zk官网上下来,我这里下下来的的3.4.9,下载后移动到/usr/local,并解压。
tar -zxvf zookeeper-3.4.9.tar.gz
2.进入conf目录,复制zoo_sample.cfg且改名未zoo.cfg,修改zoo.cfg配置文件
cp zoo_sample.cfg /usr/local/zookeeper-3.4.9/conf/zoo.cfg
打开gedit zoo.cfg,配置:
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/tmp/zookeeper
dataLogDir=/tmp/zookeeperlogs
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=192.168.154.129:2888:3888
server.2=192.168.154.133:2888:3888
server.3=192.168.154.132:2888:3888
注意红色部分,这个dataDir 下需要建立 myid,每个myid 的目录要和 dataDir 指定的目录相同,且每个机器的myid 不同,myid的值范围是1-255.
vi myid
3. server.myid=ip:port1:port2,ip 可以是本地的ip,如果在/etc/hosts 配置,也可以用该hosts的配置来制定,port1是默认指定端口,port2备用端口。
之后配置环境变量,vim /etc/profile,将其添加到环境变量中
export ZOOKEEPER_HOME=/usr/local/zookeeper-3.4.9
配置后发送到 另外的两台机器,
scp -r /usr/local/zookeeper-3.4.9 root@192.168.154.133:/usr/local (注意文件要加-r)
输入密码后即可,和上面类似配置zoo.cfg, vi myid ,修改环境变量,创建zookeeper的日志目录。
4.启动 zk
bin/zkServer.sh start ,用jps查看 是否成功,看到有quorumPeerMain显示成功
用bin/zkCli.sh -server 192.168.154.132:2181 测试是否可以链接到另外两台。
5.安装storm
从官网下载storm,我下载的0.9.6,非最新版本,下载后解压到 /usr/local/storm目录下
tar -zxvf apache-storm-0.9.6.tar.gz
6.进入conf目录下,修改storm.yaml
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "192.168.154.129"
- "192.168.154.132"
- "192.168.154.133"
storm.zookeeper.port: 2181
# - "server1"
# - "server2"
#
nimbus.host: "192.168.154.129"
#
#
# ##### These may optionally be filled in:
#
## List of custom serializations
# topology.kryo.register:
# - org.mycompany.MyType
# - org.mycompany.MyType2: org.mycompany.MyType2Serializer
#
## List of custom kryo decorators
# topology.kryo.decorators:
# - org.mycompany.MyDecorator
#
## Locations of the drpc servers
# drpc.servers:
# - "server1"
# - "server2"
storm.local.dir: "/tmp/storm"
supervisor.slots.ports:
-6700
-6701
-6702
-6703
## Metrics Consumers
# topology.metrics.consumer.register:
# - class: "backtype.storm.metric.LoggingMetricsConsumer"
# parallelism.hint: 1
# - class: "org.mycompany.MyMetricsConsumer"
# parallelism.hint: 1
# argument:
# - endpoint: "metrics-collector.mycompany.org"
注意 上面的红色部分,前面要加上空格,要不会报expected '<document start>', but found BlockMappingStart
in 'reader', line 46, column 1:
supervisor.slots.ports:
我就是这个问题折腾了好久,,经试验原来是这几个配置名称前需要加空格。即:

storm 集群配置的更多相关文章
- storm集群配置以及java编写拓扑例子
storm集群配置 安装 修改配置文件 使用java编写拓扑 storm集群配置 storm配置相当简单 安装 tar -zxvf apache-storm-1.2.2.tar.gz rm apach ...
- 流量监控系统---storm集群配置
1.集群部署的基本流程 集群部署的流程:下载安装包.解压安装包.修改配置文件.分发安装包.启动集群 注意: 所有的集群上都需要配置hosts vi /etc/hosts 192.168.223.20 ...
- storm集群配置
环境:centos6.4软件:jzmq-master-----java与c++通讯的桥梁,有了它,就可以使用zeromp了storm-0.8.2zeromq-2.1.7-----号称史上最牛逼的消息队 ...
- 通过 IDE 向 Storm 集群远程提交 topology
转载: http://weyo.me/pages/techs/storm-topology-remote-submission/ http://www.javaworld.com/article/20 ...
- storm集群部署和配置过程详解
先整体介绍一下搭建storm集群的步骤: 设置zookeeper集群 安装依赖到所有nimbus和worker节点 下载并解压storm发布版本到所有nimbus和worker节点 配置storm ...
- Storm集群的安装配置
Storm集群的安装分为以下几步: 1.首先保证Zookeeper集群服务的正常运行以及必要组件的正确安装 2.释放压缩包 3.修改storm.yaml添加集群配置信息 4.使用storm脚本启动相应 ...
- Storm 集群安装配置
本文详细介绍了 Storm 集群的安装配置方法.如果需要在 AWS 上安装 Storm,你应该看一下 storm-deploy 项目.storm-deploy 可以自动完成 E2 上 Storm 集群 ...
- Storm 系列(三)Storm 集群部署和配置
Storm 系列(二)Storm 集群部署和配置 本章中主要介绍了 Storm 的部署过程以及相关的配置信息.通过本章内容,帮助读者从零开始搭建一个 Storm 集群. 一.Storm 的依赖组件 1 ...
- Storm: 集群安装和配置
前期准备:3台服务器: 192.168.8.94 192.168.8.95 192.168.8.96 去storm官网下载响应版本的软件包:http://storm.apache.org/downl ...
随机推荐
- [spring源码学习]九、IOC源码-applicationEventMulticaster事件广播
一.代码实例 回到第IOC的第七章context部分,我们看源码分析部分,可以看到在spring的bean加载之后的第二个重要的bean为applicationEventMulticaster,从字面 ...
- DelphiXE10.1自定义控件添加图标方法
1 在资源文件中加入个24*24的BMP图片,命名为控件的类名(全大写包括T) 2 项目文件中加入对应的 {$R *.dres} 缺省为项目文件同名,自动加入到项目文件(Projrct- ...
- 《程序员的自我修养》读书笔记 - dllimport
Math.c { __declspec (dllexport) double Add (xx, xx) {...}} MathApp.c { __declspec(dllimport) doub ...
- 工厂模式模拟Spring的bean加载过程
一.前言 在日常的开发过程,经常使用或碰到的设计模式有代理.工厂.单例.反射模式等等.下面就对工厂模式模拟spring的bean加载过程进行解析,如果对工厂模式不熟悉的,具体可以先去学习一下工厂 ...
- JAVA集合类型详解
一.前言 作为java面试的常客[集合类型]是永恒的话题:在开发中,主要了解具体的使用,没有太多的去关注具体的理论说明,掌握那几种常用的集合类型貌似也就够使用了:导致这一些集合类型的理论有可能经常的忘 ...
- Python for Infomatics 第14章 数据库和SQL应用一(译)
14.1 什么是数据库 数据库一种存储结构数据的文件.绝大多数数据库类似字典——映射键和值的关系.最大的区别是数据库是保存在硬盘或其它永久性的存储上,所以在程序结束后它仍然存在.而保存在内存中的字典容 ...
- WindowManager massge和handler
在一个可移动浮动按钮的demo源码学习中,有一些WindowManager的使用,在此做下总结. 1.翻译过来就是窗口管理,是和应用框架层的窗口管理器交互的接口,通过 mWindowManager = ...
- Canvas 最佳实践(性能篇)
Canvas 想必前端同学们都不陌生,它是 HTML5 新增的「画布」元素,允许我们使用 JavaScript 来绘制图形.目前,所有的主流浏览器都支持 Canvas. Canvas 最常见的用途是渲 ...
- 我听说 C...
我听说在 c 语言的世界里,goto 和异常处理都是声名狼藉的东西,而我认为它们在一起就能化解各自的问题.
- 非交织YUV格式转换
本文为自己写的从非交织yuv420转换出yuv444,yuv422h,yuv422v和手动裁剪422h,422v图片的代码 #include <fcntl.h> #include < ...