public class ClusterStateUtil extends Object
Constructor and Description |
---|
ClusterStateUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getLiveAndActiveReplicaCount(ZkStateReader zkStateReader,
String collection) |
static boolean |
waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader,
int timeoutInMs)
Wait to see *all* cores live and active.
|
static boolean |
waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader,
String collection,
int timeoutInMs)
Wait to see *all* cores live and active.
|
static boolean |
waitForAllReplicasNotLive(ZkStateReader zkStateReader,
int timeoutInMs) |
static boolean |
waitForAllReplicasNotLive(ZkStateReader zkStateReader,
String collection,
int timeoutInMs) |
static boolean |
waitForLiveAndActiveReplicaCount(ZkStateReader zkStateReader,
String collection,
int replicaCount,
int timeoutInMs) |
static boolean |
waitToSeeLiveReplica(ZkStateReader zkStateReader,
String collection,
String coreNodeName,
String baseUrl,
int timeoutInMs)
Wait to see an entry in the ClusterState with a specific coreNodeName and
baseUrl.
|
public static boolean waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader, int timeoutInMs)
zkStateReader
- to use for ClusterStatetimeoutInMs
- how long to wait before giving uppublic static boolean waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader, String collection, int timeoutInMs)
zkStateReader
- to use for ClusterStatecollection
- to look attimeoutInMs
- how long to wait before giving uppublic static boolean waitToSeeLiveReplica(ZkStateReader zkStateReader, String collection, String coreNodeName, String baseUrl, int timeoutInMs)
zkStateReader
- to use for ClusterStatecollection
- to look incoreNodeName
- to wait forbaseUrl
- to wait fortimeoutInMs
- how long to wait before giving uppublic static boolean waitForAllReplicasNotLive(ZkStateReader zkStateReader, int timeoutInMs)
public static boolean waitForAllReplicasNotLive(ZkStateReader zkStateReader, String collection, int timeoutInMs)
public static int getLiveAndActiveReplicaCount(ZkStateReader zkStateReader, String collection)
public static boolean waitForLiveAndActiveReplicaCount(ZkStateReader zkStateReader, String collection, int replicaCount, int timeoutInMs)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.