Package com.linkedin.venice.offsets
Class DeepCopyStorageMetadataService
java.lang.Object
com.linkedin.venice.offsets.DeepCopyOffsetManager
com.linkedin.venice.offsets.DeepCopyStorageMetadataService
- All Implemented Interfaces:
StorageMetadataService
,OffsetManager
public class DeepCopyStorageMetadataService
extends DeepCopyOffsetManager
implements StorageMetadataService
This class is used to systematically copy
OffsetRecord
instances rather than
passing them as is. This is necessary in StoreConsumptionTaskTest.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearStoreVersionState
(String topicName) This will clear all metadata, including store-version state and partition states, tied to .void
computeStoreVersionState
(String topicName, Function<StoreVersionState, StoreVersionState> mapFunction) getStoreVersionState
(String topicName) Gets the currently-persistedStoreVersionState
for this topic.Methods inherited from class com.linkedin.venice.offsets.DeepCopyOffsetManager
clearOffset, getLastOffset, put
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linkedin.venice.offsets.OffsetManager
clearOffset, getLastOffset, put
Methods inherited from interface com.linkedin.davinci.storage.StorageMetadataService
getStoreVersionCompressionDictionary
-
Constructor Details
-
DeepCopyStorageMetadataService
-
-
Method Details
-
computeStoreVersionState
public void computeStoreVersionState(String topicName, Function<StoreVersionState, StoreVersionState> mapFunction) throws VeniceException- Specified by:
computeStoreVersionState
in interfaceStorageMetadataService
- Throws:
VeniceException
-
clearStoreVersionState
This will clear all metadata, including store-version state and partition states, tied to .- Specified by:
clearStoreVersionState
in interfaceStorageMetadataService
- Parameters:
topicName
- to be cleared
-
getStoreVersionState
Gets the currently-persistedStoreVersionState
for this topic.- Specified by:
getStoreVersionState
in interfaceStorageMetadataService
- Parameters:
topicName
- kafka topic to which the consumer thread is registered to.- Returns:
- an instance of
StoreVersionState
corresponding to this topic. - Throws:
VeniceException
-