zoukankan      html  css  js  c++  java
  • storm环境搭建(前言)—— 翻译 Setting Up a Development Environment

    Setting Up a Development Environment

    搭建storm开发环境所需步骤:

    1. Download a Storm release , unpack it, and put the unpacked bin/ directory on your PATH.(下载storm的release版本解压,并且把bin/目录加到环境变量PATH里面去。)
    2. To be able to start and stop topologies on a remote cluster, put the cluster information in ~/.storm/storm.yaml. (为了让我们可以启动/停止远端storm集群上的topology, 把集群的信息配置~/.storm/storm.yaml里面。)

    具体参见:storm环境搭建

    What is a development environment?(What 即什么样子)

    Storm has two modes of operation: local mode and remote mode. In local mode, you can develop and test topologies completely in process on your local machine. In remote mode, you submit topologies for execution on a cluster of machines.

    A Storm development environment has everything installed so that you can develop and test Storm topologies in local mode, package topologies for execution on a remote cluster, and submit/kill topologies on a remote cluster.

    Let's quickly go over the relationship between your machine and a remote cluster.(你的机器与远端集群的关系)

      A Storm cluster is managed by a master node called "Nimbus". Your machine communicates with Nimbus to submit code (packaged as a jar) and topologies for execution on the cluster, and Nimbus will take care of distributing that code around the cluster and assigning workers to run your topology. Your machine uses a command line client called storm to communicate with Nimbus. The storm client is only used for remote mode; it is not used for developing and testing topologies in local mode.

      storm集群是被一个称作Nimbus的控制节点所管理的。你的机器与nimbus通信以提交topology的代码,运行这个topology,而nimbus会自动在集群内部分发你的topology代码,分配任务给各个机器。你的机器使用一个称为storm的客户端去和nimbus通信。storm只有在远程模式的时候才有用; 对于用本地模式开发、测试topology来说是没什么用的。

     

    Installing a Storm release locally

    If you want to be able to submit topologies to a remote cluster from your machine, you should install a Storm release locally. Installing a Storm release will give you the storm client that you can use to interact with remote clusters. To install Storm locally, download a release from here and unzip it somewhere on your computer. Then add the unpacked bin/directory onto your PATH and make sure the bin/storm script is executable.

    Installing a Storm release locally is only for interacting with remote clusters. For developing and testing topologies in local mode, it is recommended that you use Maven to include Storm as a dev dependency for your project. You can read more about using Maven for this purpose on Maven.

    Starting and stopping topologies on a remote cluster

    The previous step installed the storm client on your machine which is used to communicate with remote Storm clusters. Now all you have to do is tell the client which Storm cluster to talk to. To do this, all you have to do is put the host address of the master in the ~/.storm/storm.yaml file. It should look something like this:

    nimbus.host: "123.45.678.890"
    

    Alternatively, if you use the storm-deploy project to provision Storm clusters on AWS, it will automatically set up your ~/.storm/storm.yaml file. You can manually attach to a Storm cluster (or switch between multiple clusters) using the "attach" command, like so:

    lein run :deploy --attach --name mystormcluster
    

    More information is on the storm-deploy wiki

  • 相关阅读:
    摄影初识之一
    Photoshop CS6的安装
    chcon可实现对文件的SEAndroid安全标签的修改
    ubuntu启动失败the system is running in low graphics mode
    将ubuntu14.04设置为文本模式启动?
    Android数据库之SQLite数据库
    系统崩溃分析
    Oops 的栈信息分析
    android framework 之JNI
    SecureCRT语法高亮设置
  • 原文地址:https://www.cnblogs.com/xymqx/p/4371219.html
Copyright © 2011-2022 走看看