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


    mesos上安装storm

    美人岛,美丽海岛风景

    1.基本说明

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

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

      (1)分布式系统,类似hadoop

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

    更多资料请参考如下网站:

      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-mesos

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

        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

  • 相关阅读:
    curl 空格和转义符
    supervisor
    pandas 小笔记
    bert 进行文本相似度计算
    认股权证的会计处理
    企业所得税汇算清缴
    调整事项与非调整事项的区别
    centos 挂载windows 2003 smb
    如何获得带转义的json内容
    安装了vs2019 编译node-sass node-gyp 找不到编译器的解决方法
  • 原文地址:https://www.cnblogs.com/neverwinter/p/2998132.html
Copyright © 2020-2023  润新知