Class RestoreCommand
java.lang.Object
org.nuxeo.lib.stream.tools.command.Command
org.nuxeo.lib.stream.tools.command.RestoreCommand
Restore consumer positions using the latency tracker Log.
- Since:
- 10.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LatencydecodeLatency(byte[] data) protected LogOffsetfindOffset(LogManager manager, LogPartitionGroup key, Latency latency) getLogNames(LogManager manager, String names) name()protected Map<LogPartitionGroup,Latency> readLatencies(LogManager manager) protected booleanrestorePosition(LogManager manager) booleanrun(LogManager manager, org.apache.commons.cli.CommandLine cmd) protected Map<LogPartitionGroup,LogOffset> searchOffsets(LogManager manager, Map<LogPartitionGroup, Latency> latencies) voidupdateOptions(org.apache.commons.cli.Options options) protected voidupdatePosition(LogManager manager, LogPartitionGroup key, LogOffset offset) protected voidupdatePositions(LogManager manager, Map<LogPartitionGroup, LogOffset> offsets) Methods inherited from class org.nuxeo.lib.stream.tools.command.Command
getRecordCodec, getRecordRenderer
-
Field Details
-
NAME
- See Also:
-
GROUP
-
verbose
protected boolean verbose -
input
-
logNames
-
date
protected long date -
dryRun
protected boolean dryRun -
codec
-
-
Constructor Details
-
RestoreCommand
public RestoreCommand()
-
-
Method Details
-
name
-
updateOptions
public void updateOptions(org.apache.commons.cli.Options options) - Specified by:
updateOptionsin classCommand
-
run
public boolean run(LogManager manager, org.apache.commons.cli.CommandLine cmd) throws InterruptedException - Specified by:
runin classCommand- Throws:
InterruptedException
-
restorePosition
- Throws:
InterruptedException
-
updatePositions
-
updatePosition
-
searchOffsets
protected Map<LogPartitionGroup,LogOffset> searchOffsets(LogManager manager, Map<LogPartitionGroup, Latency> latencies) throws InterruptedException- Throws:
InterruptedException
-
findOffset
protected LogOffset findOffset(LogManager manager, LogPartitionGroup key, Latency latency) throws InterruptedException - Throws:
InterruptedException
-
readLatencies
protected Map<LogPartitionGroup,Latency> readLatencies(LogManager manager) throws InterruptedException - Throws:
InterruptedException
-
decodeLatency
-
getLogNames
-