public class TierPartitionStateFencingTrigger
extends Object
A tool that injects PartitionFence events into TierTopic for a provided list of
TopicIdPartition. This is helpful in triggering fencing of broker's TierPartitionState
materializer. The tool outputs a file containing JSON-formatted
`kafka.tier.tools.common.FenceEventInfo` objects, each containing information about an injected
PartitionFence event.
Most of the times, this tool is going to be run in conjunction with
TierMetadataComparator and then the TierPartitionStateRestoreTrigger tools,
in a tier data/metadata recovery use case. These tools use a common
working directory. TierPartitionStateFencingTrigger tool allows user to
clean the working directory so that files leftover from the previous run of
TierPartitionStateFencingTrigger -> TierMetadataComparator ->
TierPartitionStateRestoreTrigger tool chain do not affect the current run
of these tools. If such cleanup is desired, user can provide the path to
the working directory in the confluent.tier.recovery.working.dir
configuration at the properties file.
Note: Working directory is not cleaned at the end of the Restore tool so
that the files stay around for any post-run analysis, if needed.
SAMPLE USAGE:
$> bin/kafka-run-class.sh \
kafka.tier.tools.TierPartitionStateFencingTrigger \
--tier.config /path/to/xxx.properties \
--file-fence-target-partitions /path/to/fence_target_partitions.csv