|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.taobao.metamorphosis.utils.MetaZookeeper
public class MetaZookeeper
Meta与zookeeper交互的辅助类
嵌套类摘要 | |
---|---|
class |
MetaZookeeper.ZKGroupDirs
|
class |
MetaZookeeper.ZKGroupTopicDirs
|
字段摘要 | |
---|---|
String |
brokerIdsPath
|
String |
brokerTopicsPath
已过时。 |
String |
brokerTopicsPubPath
|
String |
brokerTopicsSubPath
|
String |
consumersPath
|
String |
metaRoot
|
构造方法摘要 | |
---|---|
MetaZookeeper(org.I0Itec.zkclient.ZkClient zkClient,
String root)
|
方法摘要 | |
---|---|
String |
brokerIdsPathOf(int brokerId,
int slaveId)
brokerId 在zk上注册的path |
String |
brokerTopicsPathOf(String topic,
boolean publish,
int brokerId,
int slaveId)
Returns topic path in zk |
String |
brokerTopicsPathOf(String topic,
int brokerId,
int slaveId)
已过时。 |
Set<Broker> |
getBrokersById(int brokerId)
从zk查询一个id下的brokers,包含master和一个或多个slave |
Cluster |
getCluster()
返回broker集群,包含slave和master |
Broker |
getMasterBrokerById(int brokerId)
从zk查询master broker,不存在则返回null |
Map<Integer,String> |
getMasterBrokersByTopic(String topic)
返回发布了指定的topic的所有master brokers |
Map<String,List<Partition>> |
getPartitionsForSubTopicsFromMaster(Collection<String> topics,
int brokerId)
返回一个master 下的topic到partition映射的map |
Map<String,List<Partition>> |
getPartitionsForTopicsFromMaster(Collection<String> topics)
返回master的topic到partition映射的map |
Map<String,List<String>> |
getPartitionStringsForSubTopics(Collection<String> topics)
返回topic到partition映射的map. |
Map<String,List<String>> |
getPartitionStringsForSubTopicsFromMaster(Collection<String> topics,
int brokerId)
返回一个master下的topic到partition映射的map |
Set<String> |
getTopicsByBrokerIdFromMaster(int brokerId)
返回一个broker发布的所有topics |
org.I0Itec.zkclient.ZkClient |
getZkClient()
|
String |
masterConfigChecksum(int brokerId)
Master config file checksum path |
void |
setZkClient(org.I0Itec.zkclient.ZkClient zkClient)
|
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
public final String metaRoot
public final String consumersPath
public final String brokerIdsPath
@Deprecated public final String brokerTopicsPath
public final String brokerTopicsPubPath
public final String brokerTopicsSubPath
构造方法详细信息 |
---|
public MetaZookeeper(org.I0Itec.zkclient.ZkClient zkClient, String root)
方法详细信息 |
---|
public org.I0Itec.zkclient.ZkClient getZkClient()
public void setZkClient(org.I0Itec.zkclient.ZkClient zkClient)
public Cluster getCluster()
zkClient
-
public Set<Broker> getBrokersById(int brokerId)
public Broker getMasterBrokerById(int brokerId)
public Map<Integer,String> getMasterBrokersByTopic(String topic)
public Map<String,List<Partition>> getPartitionsForTopicsFromMaster(Collection<String> topics)
zkClient
- topics
-
public Set<String> getTopicsByBrokerIdFromMaster(int brokerId)
public Map<String,List<Partition>> getPartitionsForSubTopicsFromMaster(Collection<String> topics, int brokerId)
zkClient
- topics
-
public Map<String,List<String>> getPartitionStringsForSubTopicsFromMaster(Collection<String> topics, int brokerId)
zkClient
- topics
-
public Map<String,List<String>> getPartitionStringsForSubTopics(Collection<String> topics)
zkClient
- topics
-
public String brokerIdsPathOf(int brokerId, int slaveId)
brokerId
- slaveId
- slave编号, 小于0表示masterpublic String masterConfigChecksum(int brokerId)
brokerId
-
@Deprecated public String brokerTopicsPathOf(String topic, int brokerId, int slaveId)
topic
- brokerId
- slaveId
- slave编号, 小于0表示masterpublic String brokerTopicsPathOf(String topic, boolean publish, int brokerId, int slaveId)
topic
- brokerId
- slaveId
- slave编号, 小于0表示master
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |