Class ListActiveLedgersCommand
- java.lang.Object
-
- org.apache.bookkeeper.tools.framework.CliCommand<BKFlags,CommandFlagsT>
-
- org.apache.bookkeeper.tools.common.BKCommand<BookieFlagsT>
-
- org.apache.bookkeeper.tools.cli.helpers.BookieCommand<ListActiveLedgersCommand.ActiveLedgerFlags>
-
- org.apache.bookkeeper.tools.cli.commands.bookie.ListActiveLedgersCommand
-
public class ListActiveLedgersCommand extends BookieCommand<ListActiveLedgersCommand.ActiveLedgerFlags>
List active(exist in metadata storage) ledgers in a entry log file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListActiveLedgersCommand.ActiveLedgerFlags
Flags for active ledger command.
-
Field Summary
-
Fields inherited from class org.apache.bookkeeper.tools.framework.CliCommand
spec
-
-
Constructor Summary
Constructors Constructor Description ListActiveLedgersCommand()
ListActiveLedgersCommand(ListActiveLedgersCommand.ActiveLedgerFlags ledgerFlags)
ListActiveLedgersCommand(LedgerIdFormatter ledgerIdFormatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
apply(ServerConfiguration bkConf, ListActiveLedgersCommand.ActiveLedgerFlags cmdFlags)
void
handler(ServerConfiguration bkConf, ListActiveLedgersCommand.ActiveLedgerFlags cmdFlags)
void
printActiveLedgerOnEntryLog(long logId, java.util.List<java.lang.Long> activeLedgers)
-
Methods inherited from class org.apache.bookkeeper.tools.cli.helpers.BookieCommand
apply
-
Methods inherited from class org.apache.bookkeeper.tools.common.BKCommand
acceptServiceUri, apply, apply, apply
-
Methods inherited from class org.apache.bookkeeper.tools.framework.CliCommand
category, description, getUsage, name, path, setParent, usage
-
-
-
-
Constructor Detail
-
ListActiveLedgersCommand
public ListActiveLedgersCommand()
-
ListActiveLedgersCommand
public ListActiveLedgersCommand(LedgerIdFormatter ledgerIdFormatter)
-
ListActiveLedgersCommand
public ListActiveLedgersCommand(ListActiveLedgersCommand.ActiveLedgerFlags ledgerFlags)
-
-
Method Detail
-
apply
public boolean apply(ServerConfiguration bkConf, ListActiveLedgersCommand.ActiveLedgerFlags cmdFlags)
- Specified by:
apply
in classBookieCommand<ListActiveLedgersCommand.ActiveLedgerFlags>
-
handler
public void handler(ServerConfiguration bkConf, ListActiveLedgersCommand.ActiveLedgerFlags cmdFlags) throws java.util.concurrent.ExecutionException, MetadataException
- Throws:
java.util.concurrent.ExecutionException
MetadataException
-
printActiveLedgerOnEntryLog
public void printActiveLedgerOnEntryLog(long logId, java.util.List<java.lang.Long> activeLedgers)
-
-