Class PushStatusStoreWriter
- java.lang.Object
-
- com.linkedin.venice.pushstatushelper.PushStatusStoreWriter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class PushStatusStoreWriter extends java.lang.Object implements java.lang.AutoCloseable
PushStatusStoreWriter is a helper class for Da Vinci to write PushStatus and heartbeat message into PushStatus store real-time topic. Heartbeat update is a normal Venice write. PushStatus update is via a map-merge of Write-Compute.
-
-
Constructor Summary
Constructors Constructor Description PushStatusStoreWriter(VeniceWriterFactory writerFactory, java.lang.String instanceName, SchemaEntry valueSchemaEntry, DerivedSchemaEntry updateSchemaEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToSupposedlyOngoingIncrementalPushVersions(java.lang.String storeName, int storeVersion, java.lang.String incrementalPushVersion, ExecutionStatus status)
void
close()
java.util.concurrent.Future<PubSubProduceResult>
deletePartitionIncrementalPushStatus(java.lang.String storeName, int version, java.lang.String incrementalPushVersion, int partitionId)
N.B.: Currently used by tests only.void
deletePushStatus(java.lang.String storeName, int version, java.util.Optional<java.lang.String> incrementalPushVersion, int partitionCount)
void
removeFromSupposedlyOngoingIncrementalPushVersions(java.lang.String storeName, int storeVersion, java.lang.String incrementalPushVersion)
void
removePushStatusStoreVeniceWriter(java.lang.String storeName)
void
writeHeartbeat(java.lang.String storeName)
void
writeHeartbeat(java.lang.String storeName, long heartbeat)
void
writeHeartbeatForBootstrappingInstance(java.lang.String storeName)
This function will write `-1` to indicate the node is bootstrapping and Controller should ignore all the reports from this instance.void
writePushStatus(java.lang.String storeName, int version, int partitionId, ExecutionStatus status, java.util.Optional<java.lang.String> incrementalPushVersion)
void
writePushStatus(java.lang.String storeName, int version, int partitionId, ExecutionStatus status, java.util.Optional<java.lang.String> incrementalPushVersion, java.util.Optional<java.lang.String> incrementalPushPrefix)
void
writeVersionLevelPushStatus(java.lang.String storeName, int version, ExecutionStatus status, java.util.Set<java.lang.Integer> partitionIds)
This only works for "batch push" status update.
-
-
-
Constructor Detail
-
PushStatusStoreWriter
public PushStatusStoreWriter(VeniceWriterFactory writerFactory, java.lang.String instanceName, SchemaEntry valueSchemaEntry, DerivedSchemaEntry updateSchemaEntry)
-
-
Method Detail
-
writeHeartbeat
public void writeHeartbeat(java.lang.String storeName)
-
writeHeartbeatForBootstrappingInstance
public void writeHeartbeatForBootstrappingInstance(java.lang.String storeName)
This function will write `-1` to indicate the node is bootstrapping and Controller should ignore all the reports from this instance.- Parameters:
storeName
-
-
writeHeartbeat
public void writeHeartbeat(java.lang.String storeName, long heartbeat)
-
writePushStatus
public void writePushStatus(java.lang.String storeName, int version, int partitionId, ExecutionStatus status, java.util.Optional<java.lang.String> incrementalPushVersion)
-
writePushStatus
public void writePushStatus(java.lang.String storeName, int version, int partitionId, ExecutionStatus status, java.util.Optional<java.lang.String> incrementalPushVersion, java.util.Optional<java.lang.String> incrementalPushPrefix)
-
writeVersionLevelPushStatus
public void writeVersionLevelPushStatus(java.lang.String storeName, int version, ExecutionStatus status, java.util.Set<java.lang.Integer> partitionIds)
This only works for "batch push" status update. Write one single push status for all partitions on this node, which assumes that all partitions are on the same state. The key only contains version number.
-
addToSupposedlyOngoingIncrementalPushVersions
public void addToSupposedlyOngoingIncrementalPushVersions(java.lang.String storeName, int storeVersion, java.lang.String incrementalPushVersion, ExecutionStatus status)
-
removeFromSupposedlyOngoingIncrementalPushVersions
public void removeFromSupposedlyOngoingIncrementalPushVersions(java.lang.String storeName, int storeVersion, java.lang.String incrementalPushVersion)
-
deletePushStatus
public void deletePushStatus(java.lang.String storeName, int version, java.util.Optional<java.lang.String> incrementalPushVersion, int partitionCount)
-
deletePartitionIncrementalPushStatus
public java.util.concurrent.Future<PubSubProduceResult> deletePartitionIncrementalPushStatus(java.lang.String storeName, int version, java.lang.String incrementalPushVersion, int partitionId)
N.B.: Currently used by tests only.- Returns:
-
removePushStatusStoreVeniceWriter
public void removePushStatusStoreVeniceWriter(java.lang.String storeName)
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-