metaq入門部署到實戰

來源:互聯網
上載者:User

標籤:metaq

zookeeper部署,這裡單機zk為例。
wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.4.5/zookeeper-3.4.6.tar.gztar -zxvf zookeeper-3.4.6.tar.gzcd  zookeeper-3.4.6mkdir datacp conf/zoo_sample.cfg  conf/zoo.cfg
修改zk的設定檔,將data路徑dataDir的值設定為zookeeper-3.4.6下的data
hadoop@yard02:~/bigdata/zookeeper-3.4.6$ cat conf/zoo.cfg # The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial # synchronization phase can takeinitLimit=10# The number of ticks that can pass between # sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just # example sakes.dataDir=/home/hadoop/bigdata/zookeeper-3.4.6/data# the port at which the clients will connectclientPort=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
metaq部署這裡使用單機多執行個體測試
wget http://fnil.net/downloads/metaq-server-1.4.6.2.tar.gztar -zxvf metaq-server-1.4.6.2.tar.gz cd  taobao/cp -rf  metamorphosis-server-wrapper ../metaq9123cp -rf  metamorphosis-server-wrapper ../metaq9124cp -rf  metamorphosis-server-wrapper ../metaq9125
單機多執行個體需要解決連接埠衝突的問題1,修改JMX連接埠,修改服務連接埠,修改dashboardWeb連接埠,zk地址

我這裡保持metaq9123預設,修改metaq9124,metaq9125

vim metaq9124/conf/server.ini

serverPort=8124dashboardHttpPort=8121zk.zkConnect=192.168.137.2:2181

vim metaq9124/bin/env.sh

export JMX_PORT=9124

metaq9125同樣,修改成不被佔用的介面就行了 啟動:

bin/metaServer.sh start

停止

bin/metaServer.sh stop

狀態

bin/metaServer.sh status
zk上節點

摘自http://udukwilliam.iteye.com/blog/1931852

1) /consumers:存放消費者列表以及消費記錄,消費者列表主要是以組的方式存在,結構主要如下:
       /consumers/xxGroup/ids/xxConsumerId:DATA(“:”後的DATA表示節點xxConsumerId對應的資料) 組內消費者Id;DATA為訂閱主題列表,以”,”分隔       /consumers/xxGroup/offsets/xxTopic/分區N:DATA  組內主題分區N的消費進度;DATA為topic下分區N具體進度值       /consumers/xxGroup/owners/xxTopic/分區N:DATA 組內主題分區N的的消費者;DATA為消費者ID,表示XXTopic下分區N的資料由指定的消費者進行消費
2) /brokers/ids:存放Broker列表,如果Broker與Zookeeper失去串連,則會自動登出在/brokers/ids下的broker記錄,例子如下:
    /brokers/ids/xxBroker
3) /brokers/topics-pub:存放發布的主題列表以及對應的可發送訊息的Broker列表,例子如下:
    /brokers/topics-pub/xxTopic/xxBroker    /brokers/topics-pub下記錄的是可發送訊息到xxTopic的Broker列表,意味著有多少個Broker允許儲存Client發送到Topic資料
4) /brokers/topics-sub:存放訂閱的主題列表以及對應可訂閱的Broker列表,例子如下:
    /brokers/topics-sub/xxTopic/xxBroker    /brokers/topics-sub下記錄的可訂閱xxTopic的Broker列表,意味著有多少個Broker允許被Client訂閱topic的資料


這裡使用sohu-zookeeper-view來看了下節點資訊,其中meta-example是group


metaq入門部署到實戰

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.