、安装zookeeper

本博客全部内容是原创。假设转载请注明来源

http://blog.csdn.net/myhaspl/

myhaspl@aaayun:~/jzmq-master$cd ..

myhaspl@aaayun:~$wget http://apache.fayea.com/zookeeper/zookeeper-3.3.6/zookeeper-3.3.6.tar.gz

myhaspl@aaayun:~$tar -xzvf zookeeper-3.3.6.tar.gz

$cd zookeeper-3.3.6

yhaspl@aaayun:~/zookeeper-3.3.6$ cp./conf/zoo_sample.cfg ./conf/zoo.cfg

myhaspl@aaayun:~/zookeeper-3.3.6$bin/zkServer.sh start

JMX enabled by default

myhaspl@aaayun:~/zookeeper-3.3.6$ sudobin/zkServer.sh start

JMX enabled by default

Using config:/home/myhaspl/zookeeper-3.3.6/bin/../conf/zoo.cfg

Starting zookeeper ... STARTED

myhaspl@aaayun:~/zookeeper-3.3.6$bin/zkCli.sh -server 127.0.0.1:2181

Connecting to 127.0.0.1:2181

2014-12-17 16:22:17,187 - INFO  [main:Environment@97] - Clientenvironment:zookeeper.version=3.3.6-1366786, built on 07/29/2012 06:22 GMT

2014-12-17 16:22:17,207 - INFO  [main:Environment@97] - Clientenvironment:host.name=aaayun

2014-12-17 16:22:17,208 - INFO  [main:Environment@97] - Clientenvironment:java.version=1.7.0_71

2014-12-17 16:22:17,209 - INFO  [main:Environment@97] - Clientenvironment:java.vendor=Oracle Corporation

2014-12-17 16:22:17,210 - INFO  [main:Environment@97] - Clientenvironment:java.home=/usr/lib/java/jre

2014-12-17 16:22:17,212 - INFO  [main:Environment@97] - Clientenvironment:java.class.path=/home/myhaspl/zookeeper-3.3.6/bin/../build/classes:/home/myhaspl/zookeeper-3.3.6/bin/../build/lib/*.jar:/home/myhaspl/zookeeper-3.3.6/bin/../zookeeper-3.3.6.jar:/home/myhaspl/zookeeper-3.3.6/bin/../lib/log4j-1.2.15.jar:/home/myhaspl/zookeeper-3.3.6/bin/../lib/jline-0.9.94.jar:/home/myhaspl/zookeeper-3.3.6/bin/../src/java/lib/*.jar:/home/myhaspl/zookeeper-3.3.6/bin/../conf:.:/usr/lib/java/lib:/usr/lib/java/jre/lib

2014-12-17 16:22:17,213 - INFO  [main:Environment@97] - Clientenvironment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

2014-12-17 16:22:17,276 - INFO  [main:Environment@97] - Clientenvironment:java.io.tmpdir=/tmp

2014-12-17 16:22:17,277 - INFO  [main:Environment@97] - Clientenvironment:java.compiler=<NA>

2014-12-17 16:22:17,278 - INFO  [main:Environment@97] - Clientenvironment:os.name=Linux

2014-12-17 16:22:17,278 - INFO  [main:Environment@97] - Clientenvironment:os.arch=amd64

2014-12-17 16:22:17,279 - INFO  [main:Environment@97] - Clientenvironment:os.version=3.2.0-53-generic

2014-12-17 16:22:17,279 - INFO  [main:Environment@97] - Clientenvironment:user.name=myhaspl

2014-12-17 16:22:17,280 - INFO  [main:Environment@97] - Clientenvironment:user.home=/home/myhaspl

2014-12-17 16:22:17,281 - INFO  [main:Environment@97] - Clientenvironment:user.dir=/home/myhaspl/zookeeper-3.3.6

2014-12-17 16:22:17,286 - INFO  [main:ZooKeeper@379] - Initiating clientconnection, connectString=127.0.0.1:2181 sessionTimeout=30000watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@6c0dc01

2014-12-17 16:22:17,408 - INFO [main-SendThread():ClientCnxn$SendThread@1058] - Opening socketconnection to server /127.0.0.1:2181

Welcome to ZooKeeper!

2014-12-17 16:22:17,796 - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@947] - Socketconnection established to localhost/127.0.0.1:2181, initiating session

JLine support is enabled

2014-12-17 16:22:18,204 - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@736] - Sessionestablishment complete on server localhost/127.0.0.1:2181, sessionid =0x14a575462220000, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:Nonepath:null

[zk: 127.0.0.1:2181(CONNECTED) 0] ls /

[zookeeper]

[zk: 127.0.0.1:2181(CONNECTED) 1] quit

6、storm安装

myhaspl@aaayun:~/zookeeper-3.3.6$ cd ..

myhaspl@aaayun:~$ wget http://mirrors.cnnic.cn/apache/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz

myhaspl@aaayun:~$ tar -xzvf  apache-storm-0.9.3.tar.gz

启动storm

myhaspl@aaayun:~/apache-storm-0.9.3$ sudo  ./bin/storm nimbus&

[1] 25871

myhaspl@aaayun:~/apache-storm-0.9.3$ sudo  ./bin/storm supervisor&

[2] 25882

编辑參数配置

myhaspl@aaayun:~/apache-storm-0.9.3$

myhaspl@aaayun:~/apache-storm-0.9.3$ cdconf

myhaspl@aaayun:~/apache-storm-0.9.3/conf$ls

默认配置例如以下:

# Licensed to the Apache SoftwareFoundation (ASF) under one

# or more contributor licenseagreements.  See the NOTICE file

# distributed with this work for additionalinformation

# regarding copyright ownership.  The ASF licenses this file

# to you under the Apache License, Version2.0 (the

# "License"); you may not usethis 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 oragreed to in writing, software

# distributed under the License isdistributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANYKIND, either express or implied.

# See the License for the specific languagegoverning permissions and

# limitations under the License.

########### These all have default valuesas shown

########### Additional configuration goesinto storm.yaml

java.library.path:"/usr/local/lib:/opt/local/lib:/usr/lib"

### storm.* configs are generalconfigurations

# the local dir is where jars are kept

storm.local.dir: "storm-local"

storm.zookeeper.servers:

-"localhost"

storm.zookeeper.port: 2181

storm.zookeeper.root: "/storm"

storm.zookeeper.session.timeout: 20000

storm.zookeeper.connection.timeout: 15000

storm.zookeeper.retry.times: 5

storm.zookeeper.retry.interval: 1000

storm.zookeeper.retry.intervalceiling.millis:30000

storm.cluster.mode: "distributed"# can be distributed or local

storm.local.mode.zmq: false

storm.thrift.transport:"backtype.storm.security.auth.SimpleTransportPlugin"

storm.messaging.transport:"backtype.storm.messaging.netty.Context"

### nimbus.* configs are for the master

nimbus.host: "localhost"

nimbus.thrift.port: 6627

nimbus.thrift.max_buffer_size: 1048576

nimbus.childopts: "-Xmx1024m"

nimbus.task.timeout.secs: 30

nimbus.supervisor.timeout.secs: 60

nimbus.monitor.freq.secs: 10

nimbus.cleanup.inbox.freq.secs: 600

nimbus.inbox.jar.expiration.secs: 3600

nimbus.task.launch.secs: 120

nimbus.reassign: true

nimbus.file.copy.expiration.secs: 600

nimbus.topology.validator:"backtype.storm.nimbus.DefaultTopologyValidator"

### ui.* configs are for the master

ui.port: 8080

ui.childopts: "-Xmx768m"

logviewer.port: 8000

logviewer.childopts: "-Xmx128m"

logviewer.appender.name: "A1"

drpc.port: 3772

drpc.worker.threads: 64

drpc.queue.size: 128

drpc.invocations.port: 3773

drpc.request.timeout.secs: 600

drpc.childopts: "-Xmx768m"

transactional.zookeeper.root:"/transactional"

transactional.zookeeper.servers: null

transactional.zookeeper.port: null

### supervisor.* configs are for nodesupervisors

# Define the amount of workers that can berun on this machine. Each worker is assigned a port to use for communication

supervisor.slots.ports:

-6700

-6701

-6702

-6703

supervisor.childopts: "-Xmx256m"

#how long supervisor will wait to ensurethat a worker process is started

supervisor.worker.start.timeout.secs: 120

#how long between heartbeats untilsupervisor considers that worker dead and tries to restart it

supervisor.worker.timeout.secs: 30

#how frequently the supervisor checks onthe status of the processes it's monitoring and restarts if necessary

supervisor.monitor.frequency.secs: 3

#how frequently the supervisor heartbeatsto the cluster state (for nimbus)

supervisor.heartbeat.frequency.secs: 5

supervisor.enable: true

### worker.* configs are for task workers

worker.childopts: "-Xmx768m"

worker.heartbeat.frequency.secs: 1

task.heartbeat.frequency.secs: 3

task.refresh.poll.secs: 10

zmq.threads: 1

zmq.linger.millis: 5000

zmq.hwm: 0

storm.messaging.netty.server_worker_threads:1

storm.messaging.netty.client_worker_threads:1

storm.messaging.netty.buffer_size: 5242880#5MB buffer

storm.messaging.netty.max_retries: 30

storm.messaging.netty.max_wait_ms: 1000

storm.messaging.netty.min_wait_ms: 100

### topology.* configs are for specificexecuting storms

topology.enable.message.timeouts: true

topology.debug: false

topology.optimize: true

topology.workers: 1

topology.acker.executors: null

topology.tasks: null

# maximum amount of time a message has tocomplete before it's considered failed

topology.message.timeout.secs: 30

topology.skip.missing.kryo.registrations:false

topology.max.task.parallelism: null

topology.max.spout.pending: null

topology.state.synchronization.timeout.secs:60

topology.stats.sample.rate: 0.05

topology.builtin.metrics.bucket.size.secs:60

topology.fall.back.on.java.serialization:true

topology.worker.childopts: null

topology.executor.receive.buffer.size: 1024#batched

topology.executor.send.buffer.size: 1024#individual messages

topology.receiver.buffer.size: 8 # settingit too high causes a lot of problems (heartbeat thread gets starved, throughputplummets)

topology.transfer.buffer.size: 1024 #batched

topology.tick.tuple.freq.secs: null

topology.worker.shared.thread.pool.size: 4

topology.disruptor.wait.strategy:"com.lmax.disruptor.BlockingWaitStrategy"

topology.spout.wait.strategy:"backtype.storm.spout.SleepSpoutWaitStrategy"

topology.sleep.spout.wait.strategy.time.ms:1

topology.error.throttle.interval.secs: 10

topology.max.error.report.per.interval: 5

topology.kryo.factory:"backtype.storm.serialization.DefaultKryoFactory"

topology.tuple.serializer:"backtype.storm.serialization.types.ListDelegateSerializer"

topology.trident.batch.emit.interval.millis:500

dev.zookeeper.path:"/tmp/dev-storm-zookeeper"

Storm发行版本号解压文件夹下有一个conf/storm.yaml文件。用于配置Storm。默认配置在defaults.yaml能够查看。conf/storm.yaml中的配置选项将覆盖defaults.yaml中的默认配置。

启动后台ui

myhaspl@aaayun:~/apache-storm-0.9.3$ sudo ./bin/stormui&

[3] 25893

数学之路-分布式计算-storm(3)的更多相关文章

  1. 数学之路-分布式计算-disco(4)

    第一个參数iter是一个迭代器,涉及被map函数产生的键和值.它们是reduce实例. 在本例中.单词随机被托付给不同的reduce实例.然后,要单词同样,处理它的reduce也同样.可确保终于合计是 ...

  2. 数学之路-分布式计算-linux/unix技术基础(4)

    pwd显示当前文件夹,ls查看文件夹下的文件,cd 进入文件夹 -bash-4.2$ pwd /home/myhaspl-bash-4.2$ lsabc        hadoop-2.4.1     ...

  3. 数学之路(3)-机器学习(3)-机器学习算法-SVM[5]

    svm小结 1.超平面 两种颜色的点分别代表两个类别,红颜色的线表示一个可行的超平面.在进行分类的时候,我们将数据点  x 代入  f(x)  中,如果得到的结果小于 0 ,则赋予其类别 -1 ,如果 ...

  4. 数学之路-python计算实战(20)-机器视觉-拉普拉斯算子卷积滤波

    拉普拉斯算子进行二维卷积计算,线性锐化滤波 # -*- coding: utf-8 -*- #线性锐化滤波-拉普拉斯算子进行二维卷积计算 #code:myhaspl@myhaspl.com impor ...

  5. 数学之路(3)-机器学习(3)-机器学习算法-PCA

    PCA 主成分分析(Principal components analysis,PCA),维基百科给出一个较容易理解的定义:“PCA是一个正交化线性变换,把数据变换到一个新的坐标系统中,使得这一数据的 ...

  6. 数学之路-python计算实战(13)-机器视觉-图像增强

    指数变换的基本表达式为:y=bc(x-a)-1 当中參数b.c控制曲线的变换形状,參数a控制曲线的位置. 指数变换的作用是扩展图像的高灰度级.压缩低灰度级.能够用于亮度过高的图像 本博客全部内容是原创 ...

  7. 数学之路(3)-机器学习(3)-机器学习算法-SVM[7]

    SVM是新近出现的强大的数据挖掘工具,它在文本分类.手写文字识别.图像分类.生物序列分析等实际应用中表现出非常好的性能.SVM属于监督学习算法,样本以属性向量的形式提供,所以输入空间是Rn的子集. 图 ...

  8. 数学之路-python计算实战(16)-机器视觉-滤波去噪(邻域平均法滤波)

    # -*- coding: utf-8 -*- #code:myhaspl@myhaspl.com #邻域平均法滤波,半径为2 import cv2 import numpy as np fn=&qu ...

  9. 数学之路(3)-机器学习(3)-机器学习算法-SVM[9]

    我们应用SVM的非线性分类功能对手写数字进行识别,我们在这应用poly做为非线性核 svm = mlpy.LibSvm(svm_type='c_svc', kernel_type='poly',gam ...

随机推荐

  1. iOS---UICollectionView详解和常用API翻译

    UICollectionView 1.必须要设置布局参数 2.注册cell 用法类似于UITableView 类.自动实现重用,必须注册初始化. 使用UICollectionView必须实现UICol ...

  2. springMVC返回Base64位编码图片验证码

    import java.awt.Color;import java.awt.Font;import java.awt.Graphics;import java.awt.Graphics2D;impor ...

  3. oauth 理解

    单点登录 对授权码模式的解读. 1. 用户访问客户端,客户端将请求认证服务器. 2. 用户选择是否给予客户端授权 3.用户授权后,认证服务器将用户导向客户端事先定义好的重定向的地址,同时会附上一个授权 ...

  4. scrapy 的分页爬取 CrawlSpider

    1.创建scrapy工程:scrapy startproject projectName 2.创建爬虫文件:scrapy genspider -t crawl spiderName www.xxx.c ...

  5. WPF小记 -- 使用Path自己画图标,点击命中(焦点)丢失问题

    在Template中,Path外面的Grid需添加Background属性值.否则点击范围会受限制,例如:Click,在RadioButton的Height和With范围内点击,命中率<1. & ...

  6. Less功能特性

    (1)变量 我们常常在 CSS 中 看到同一个值重复多次,这样难易于代码维护 const bgColor="skyblue"; $(".post-content" ...

  7. vue 轮播插件使用

    <template> <div> <Swiper ref="swiper" v-if="list.length > 0" : ...

  8. 启发式合并 CodeForces - 600E

    启发式合并最重要的思想就是指的是每次将小集合拷贝合并至大集合.考虑每个元素的合并开销.对于合并次数最多的那个元素来说,它每合并一次,所在集合的规模扩大两倍,最多只会合并 logN 次,因而对于所有元素 ...

  9. HDU1401 Solitaire

    题目描述:8×8的棋盘上有4个棋子,棋子的运动方法如下:1.如果其上/下/左/右一格没有棋子,则可以去;2.如果其上/下/左/右一格有棋子,而且沿原方向再跳一步没有,则可以去. 给出初始结束位置,问8 ...

  10. 笔试算法题(58):二分查找树性能分析(Binary Search Tree Performance Analysis)

    议题:二分查找树性能分析(Binary Search Tree Performance Analysis) 分析: 二叉搜索树(Binary Search Tree,BST)是一颗典型的二叉树,同时任 ...