在mesos上安装storm,而且执行wordcount测试程序

mesos上安装storm

美人岛,美丽海岛风景html

1.基本说明

  若是只用一句话来描述storm的话,可能会是这样:分布式实时计算系统。按照storm做者的说法,storm对于实时计算的意义相似于hadoop对于批处理的意义。咱们都知道,根据google mapreduce来实现的hadoop为咱们提供了map, reduce原语,使咱们的批处理程序变得很是地简单和优美。一样,storm也为实时计算提供了一些简单优美的原语。java

 

  相信看了上面的话你应该对storm是什么有了大概的了解,即python

  (1)分布式系统,相似hadoopgit

   (2) 针对实时数据的流计算框架github

更多资料请参考以下网站:框架

  1.关于storm的详细介绍 http://www.searchtb.com/2012/09/introduction-to-storm.html分布式

  2.storm官网:https://github.com/nathanmarz/storm/wiki工具

  3.storm-mesos官网:https://github.com/nathanmarz/storm-mesosoop

说明:基于mesos安装假设你已经安装而且成功运行了mesospost

    mesos安装请参考个人博文《在mesos上安装hadoop》

2.基本依赖安装

2.1 zookeeper(运行storm前先开启)

单独的安装能够看个人博文:《zookeeper快速安装》

也能够使用Hbase自带的zookeeper也能够

 

2.2 Zeromq

wget http://download.zeromq.org/zeromq-2.1.7.tar.gz
tar -xzf zeromq-2.1.7.tar.gz
cd zeromq-2.1.7
./configure
make
sudo make install

若是安装过程提示缺乏依赖,则安装缺乏的依赖。

yum install uuid*

yum install  e2fsprogs*

 

2.3 python

若是按照我以前的环境搭建了,这个是确定安装好了,没有请自行yum

yum install python*

 

2.4 jzmq

git clone https://github.com/nathanmarz/jzmq.git
cd jzmq
./autogen.sh
./configure
make
sudo make install

 

3.安装和配置storm

3.1 下载解压

wget https://github.com/downloads/nathanmarz/storm-mesos/storm-mesos-0.0.1-SNAPSHOT.tgz

tar -zxvf  storm-mesos-0.0.1-SNAPSHOT.tgz

 

3.2 配置storm.yaml

cd storm-mesos-0.0.1-SNAPSHOT/conf

vi storm.yaml

 

storm.yaml内容以下

java.library.path: "/home/hadoop/storm-mesos-0.0.1-SNAPSHOT/lib:/home/hadoop/storm-mesos-0.0.1-SNAPSHOT/native:/home/hadoop/mesos/lib"
mesos.master.url: "192.168.4.100:5050"
mesos.executor.uri: "/home/hadoop/storm-mesos-0.0.1-repack.tgz"
storm.zookeeper.servers:
    - "192.168.4.101"
    - "192.168.4.102"
    - "192.168.4.103"
nimbus.host: "localhost"

storm.local.dir: "/home/hadoop/storm-mesos-0.0.1-SNAPSHOT/storm-local-dir"

ui.port: "8088"

以上参数的含义见官网解释:

  1. mesos.executor.uri: Once you fill in the configs and repack the distribution, you need to place the distribution somewhere where Mesos executors can find it. Typically this is on HDFS, and this config is the location of where you put the distibution.
  2. mesos.master.url: URL for the Mesos master.
  3. java.library.path: Needs the location of the ZeroMQ libs and the Mesos native libraries. The Storm/Mesos distribution comes with the native ZeroMQ libraries in the "native" folder (for Linux). This config is typically set to "native:{location of mesos native libs}"
  4. storm.zookeeper.servers: The location of the Zookeeper servers to be used by the Storm master.
  5. nimbus.host: The hostname of where you run Nimbus.

 

4.安装lein

Leiningen是一个Clojure项目管理工具。因为运行例子用到的storm-starter须要。

官网:https://github.com/technomancy/leiningen

4.1 下载脚本文件安装

wget https://raw.github.com/technomancy/leiningen/preview/bin/lein

mv lein /usr/bin

非root执行如下命令开始下载安装

lein

执行lein后效果以下

4.2 验证

lein repl

发现能够进入

quit退出

 

5.安装storm-starter

相关文章
相关标签/搜索