Migrate command `readledger`

Descriptions of the changes in this PR:

#2040 

- Using `bkctl` run `readledger`

```
Read a range of entries from a ledger.

Usage:  bkctl bookie readledger [flags]

Flags:

    -b, --bookie
        Only read from a specific bookie

    -ef, --entryformatter
        Set entry formatter

    -fe, --firstentryid
        First Entry ID

    -r, --force-recovery
        Ensure the ledger is properly closed before reading

    -le, --lastentryid
        Last Entry ID

    -l, --ledgerid
        Ledger ID

    -lf, --ledgeridformatter
        Set ledger id formatter

    -m, --msg
        Print message body


    -h, --help
        Display help information
```


Reviewers: Jia Zhai <zhaijia@apache.org>, Sijie Guo <sijie@apache.org>

This closes #2041 from zymap/command-readledger and squashes the following commits:

56b0a4581 [Yong Zhang] Remove unused import
30dafa85f [Yong Zhang] Merge branch 'master' into command-readledger
bfbd6b023 [Yong Zhang] Migrate command `decommission`
d40b8b69f [Yong Zhang] Migrate command `readlog`
95d145a15 [Yong Zhang] Migrate command `nukeexistingcluster`
e2b1dc7f3 [Yong Zhang] Migrate command `listunderreplicated`
c465c4761 [Yong Zhang] Remove unused import
0988e12c7 [bd2019us] ISSUE #2023: change cached thread pool to fixed thread pool
6a6d7bbd9 [Yong Zhang] Migrate command `initnewcluster`
931df8c2c [Sijie Guo] Merge branch 'master' into command-readledger
c391fe58d [Yong Zhang] Migrate command `readlogmetadata`
120d67737 [Yong Zhang] Migrate command `lostbookierecoverydelay`
bf66235e5 [Yong Zhang] Migrate command `deleteledger`
87e6644f2 [Yong Zhang] Fix some conflict
5ae05f0d2 [Yong Zhang] Migrate command `readledger`
751e55fa4 [Arvin] ISSUE #2020: close db properly to avoid open RocksDB failure at the second time
138a7ae85 [Yong Zhang] Migrate command `metadataformat`
b043d1694 [Yong Zhang] Migrate command `listledgers`
4573285db [Ivan Kelly] Docker autobuild hook
e3d807a32 [Like] Fix IDE complain as there are multi choices for error code
9524a9f4a [Yong Zhang] Migrate command `readjournal`
6c3f33f55 [Yong Zhang] Fix when met unexpect entry id crashed
e35a108c7 [Like] Fix error message for unrecognized number-of-bookies
5902ee27b [Boyang Jerry Peng] fix potential NPE when releasing entry that is null
6aa73ce05 [Ivan Kelly] [RELEASE] Update website to include documentation for 4.8.2
1448d12aa [Yong Zhang] Migrate command `listfilesondisk`
4de598379 [Yong Zhang] Issue #1987: Migrate command `convert-to-interleaved-storage`
468743e7e [Matteo Merli] In DbLedgerStorage use default values when config key is present but empty
f26a4cae0 [Ivan Kelly] Release notes for v4.8.2
ec2636cd2 [Yong Zhang] Issue #1985: Migrate command `convert-to-db-storage`
8cc7239ac [Yong Zhang] Issue #1982: Migrate command `bookiesanity`
fa90f0185 [Yong Zhang] Issue #1980: Migrate command `ledger` from shell to bkctl
4 files changed
tree: 947878ba73f6f813d73784462164fba0b229c2db
  1. .github/
  2. .test-infra/
  3. .travis_scripts/
  4. bin/
  5. bookkeeper-benchmark/
  6. bookkeeper-common/
  7. bookkeeper-common-allocator/
  8. bookkeeper-dist/
  9. bookkeeper-http/
  10. bookkeeper-proto/
  11. bookkeeper-server/
  12. bookkeeper-stats/
  13. bookkeeper-stats-providers/
  14. buildtools/
  15. circe-checksum/
  16. conf/
  17. cpu-affinity/
  18. deploy/
  19. dev/
  20. docker/
  21. metadata-drivers/
  22. microbenchmarks/
  23. shaded/
  24. site/
  25. stats/
  26. stream/
  27. tests/
  28. tools/
  29. .gitignore
  30. .travis.yml
  31. LICENSE
  32. NOTICE
  33. pom.xml
  34. README.md
README.md

Build Status Build Status Coverage Status Maven Central

Apache BookKeeper

Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.

It is suitable for being used in following scenarios:

  • WAL (Write-Ahead-Logging), e.g. HDFS NameNode.
  • Message Store, e.g. Apache Pulsar.
  • Offset/Cursor Store, e.g. Apache Pulsar.
  • Object/Blob Store, e.g. storing state machine snapshots.

Get Started

  • Concepts: Start with the basic concepts of Apache BookKeeper. This will help you to fully understand the other parts of the documentation.
  • Getting Started to setup BookKeeper to write logs.

Documentation

Developers

You can also read Turning Ledgers into Logs to learn how to turn ledgers into continuous log streams. If you are looking for a high level log stream API, you can checkout DistributedLog.

Administrators

Contributors

Get In Touch

Report a Bug

For filing bugs, suggesting improvements, or requesting new features, help us out by opening a Github issue or opening an Apache jira.

Need Help?

Subscribe or mail the user@bookkeeper.apache.org list - Ask questions, find answers, and also help other users.

Subscribe or mail the dev@bookkeeper.apache.org list - Join development discussions, propose new ideas and connect with contributors.

Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.

Contributing

We feel that a welcoming open community is important and welcome contributions.

Contributing Code

  1. See Developer Setup to get your local environment setup.

  2. Take a look at our open issues: JIRA Issues Github Issues.

  3. Review our coding style and follow our pull requests to learn about our conventions.

  4. Make your changes according to our contribution guide.

Improving Website and Documentation

  1. See Building the website and documentation on how to build the website and documentation.