Class PushStatusStoreReader
java.lang.Object
com.linkedin.venice.pushstatushelper.PushStatusStoreReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
This class is a helper class for Venice controller to read PushStatus / Heartbeat messages.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionPushStatusStoreReader
(com.linkedin.d2.balancer.D2Client d2Client, String clusterDiscoveryD2ServiceName, long heartbeatExpirationTimeInSeconds) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
getHeartbeat
(String storeName, String instanceName) getInstanceStatus
(String storeName, String instanceName) getPartitionStatus
(String storeName, int version, int partitionId, Optional<String> incrementalPushVersion) getPartitionStatus
(String storeName, int version, int partitionId, Optional<String> incrementalPushVersion, Optional<String> incrementalPushPrefix) getPartitionStatuses
(String storeName, int storeVersion, String incrementalPushVersion, int numberOfPartitions) Return statuses of all replicas belonging to partitions with partitionIds in the range [0 (inclusive), numberOfPartitions (exclusive)) {partitionId: {instance:status, instance:status,...},...}getPartitionStatuses
(String storeName, int storeVersion, String incrementalPushVersion, int numberOfPartitions, int batchGetLimit) getPartitionStatuses
(String storeName, int storeVersion, String incrementalPushVersion, Set<Integer> partitionIds, Optional<Integer> batchGetLimitOption) Return statuses of all replicas belonging to partitions mentioned in partitionIds.getSupposedlyOngoingIncrementalPushVersions
(String storeName, int storeVersion) getVersionStatus
(String storeName, int version, Optional<String> incrementalPushVersion) boolean
isInstanceAlive
(String storeName, String instanceName)
-
Constructor Details
-
PushStatusStoreReader
public PushStatusStoreReader(com.linkedin.d2.balancer.D2Client d2Client, String clusterDiscoveryD2ServiceName, long heartbeatExpirationTimeInSeconds)
-
-
Method Details
-
getVersionStatus
-
getPartitionStatus
-
getPartitionStatus
-
getPartitionStatuses
public Map<Integer,Map<CharSequence, getPartitionStatusesInteger>> (String storeName, int storeVersion, String incrementalPushVersion, int numberOfPartitions) Return statuses of all replicas belonging to partitions with partitionIds in the range [0 (inclusive), numberOfPartitions (exclusive)) {partitionId: {instance:status, instance:status,...},...} -
getPartitionStatuses
-
getPartitionStatuses
public Map<Integer,Map<CharSequence, getPartitionStatusesInteger>> (String storeName, int storeVersion, String incrementalPushVersion, Set<Integer> partitionIds, Optional<Integer> batchGetLimitOption) Return statuses of all replicas belonging to partitions mentioned in partitionIds. If status is not available for a partition then empty map will be returned as a value for that partition. {partitionId: {instance:status, instance:status,...},...} -
getHeartbeat
- Parameters:
instanceName
- = [hostname + appName]
-
isInstanceAlive
-
getInstanceStatus
public PushStatusStoreReader.InstanceStatus getInstanceStatus(String storeName, String instanceName) -
getSupposedlyOngoingIncrementalPushVersions
public Map<CharSequence,Integer> getSupposedlyOngoingIncrementalPushVersions(String storeName, int storeVersion) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-