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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Latency
decodeLatency
(byte[] data) protected LogOffset
findOffset
(LogManager manager, LogPartitionGroup key, Latency latency) getLogNames
(LogManager manager, String names) name()
protected Map<LogPartitionGroup,
Latency> readLatencies
(LogManager manager) protected boolean
restorePosition
(LogManager manager) boolean
run
(LogManager manager, org.apache.commons.cli.CommandLine cmd) protected Map<LogPartitionGroup,
LogOffset> searchOffsets
(LogManager manager, Map<LogPartitionGroup, Latency> latencies) void
updateOptions
(org.apache.commons.cli.Options options) protected void
updatePosition
(LogManager manager, LogPartitionGroup key, LogOffset offset) protected void
updatePositions
(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:
updateOptions
in classCommand
-
run
public boolean run(LogManager manager, org.apache.commons.cli.CommandLine cmd) throws InterruptedException - Specified by:
run
in 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
-