hangc0276 / pulsar Goto Github PK
View Code? Open in Web Editor NEWThis project forked from apache/pulsar
Apache Pulsar - distributed pub-sub messaging system
Home Page: https://pulsar.apache.org/
License: Apache License 2.0
This project forked from apache/pulsar
Apache Pulsar - distributed pub-sub messaging system
Home Page: https://pulsar.apache.org/
License: Apache License 2.0
1.1 list all unrecoverable ledgers without deleting them
bin/sn-pulsar-tools bookie delete-underreplicate-ledgers --conf ./bookkeeper.conf --dry-run
Please confirm the results are expected.
1.2 list and delete all unrecoverable ledgers
bin/sn-pulsar-tools bookie delete-underreplicate-ledgers --conf ./bookkeeper.conf
root@pulsar-toolset-0:/pulsar/sn-pulsar-tools/bin# ./sn-pulsar-tools pck bookie detect-missing-ledger --zookeeper pulsar-zookeeper:2181 --service-url http://pulsar-broker:8080 -n public/default --auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken --auth-params file:///pulsar/tokens/client/token
3.1 Replace the generated python Protobuf file MLDataFormats_pb2.py
with the given one. (This python file is generated from Pulsar 2.9.3.23, which matched the customer's Pulsar version. The new python file list is below)
3.2 From step 2's output, we can the missing ledgerId with the topic name. For example, the missing ledgerId is [2,3] and the related topic name is persistent://public/default/test_v1-partition-0
Use the following command to get the ledger list of the topic and confirm the list containers missing ledgerIds
bin/pulsar-managed-ledger-admin print-managed-ledger -zk ip:port --managedLedgerPath public/default/persistent/test_v1-partition-0
After confirmingd, we can use the following command to delete ledgerIds [2, 3] from the topic's ledger list.
bin/pulsar-managed-ledger-admin delete-managed-ledger-ids -zk ip:port --ledgerIds 2,3 --managedLedgerPath public/default/persistent/test_v1-partition-0
Use the following command to confirm the ledgerIds has been deletd.
bin/pulsar-managed-ledger-admin print-managed-ledger -zk ip:port --managedLedgerPath public/default/persistent/test_v1-partition-0
Notice:
--managedLedgerPath
. This parameter represents the ZNode path in Zookeeper, we can find it in Zookeeper's Znode. If the topic name is persistent://public/default/test_v1-partition-0
and the parameter is public/default/persistent/test_v1-partition-0
Ricks:
This delete command directly updates ZNode. However, the broker maybe also update the ZNode at the same time. It has the risk of this tool updating the ZNode with the old content and may lead to data loss. It may happens with low probability.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.