public class TierMetadataValidator
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
java.lang.String |
metadataStatesDir |
java.util.Properties |
props |
java.lang.String |
workDir |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method will be primarily used to clean up resources including various backends
|
boolean |
comparesStates(java.nio.file.Path actual,
java.nio.file.Path expected)
Compares the 'actual' state file with 'expected' state file.
|
static boolean |
isValidStates(java.util.Iterator<TierObjectMetadata> eIterator,
java.util.Iterator<TierObjectMetadata> aIterator,
long firstValidOffset,
java.util.Optional<TierObjectStore> objectStoreOpt,
boolean verifyOffsetScan,
CancellationContext cancellationContext,
java.util.function.Function<org.apache.kafka.common.TopicPartition,java.lang.Long> startOffsetProducer) |
static void |
main(java.lang.String[] args) |
void |
run() |
boolean |
validateStates(java.nio.file.Path expected,
java.nio.file.Path actual,
org.apache.kafka.common.TopicPartition id,
long startOffset)
For the given 'expected' and 'actual' metadata states path, the method will validate if they
are same or not.
|
public final java.lang.String metadataStatesDir
public final java.lang.String workDir
public java.util.Properties props
public void run() throws java.io.IOException
java.io.IOException
public boolean validateStates(java.nio.file.Path expected, java.nio.file.Path actual, org.apache.kafka.common.TopicPartition id, long startOffset) throws java.io.IOException
java.io.IOException
public boolean comparesStates(java.nio.file.Path actual, java.nio.file.Path expected) throws java.io.IOException
java.io.IOException
public static boolean isValidStates(java.util.Iterator<TierObjectMetadata> eIterator, java.util.Iterator<TierObjectMetadata> aIterator, long firstValidOffset, java.util.Optional<TierObjectStore> objectStoreOpt, boolean verifyOffsetScan, CancellationContext cancellationContext, java.util.function.Function<org.apache.kafka.common.TopicPartition,java.lang.Long> startOffsetProducer)
public void close()
close
in interface java.lang.AutoCloseable
public static void main(java.lang.String[] args)