Coder Social home page Coder Social logo

hangc0276 / pulsar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/pulsar

0.0 0.0 0.0 403.53 MB

Apache Pulsar - distributed pub-sub messaging system

Home Page: https://pulsar.apache.org/

License: Apache License 2.0

Java 98.26% Shell 0.49% Python 0.74% HTML 0.01% JavaScript 0.01% HCL 0.04% Go 0.35% Dockerfile 0.06% Batchfile 0.04% Lua 0.01% Groovy 0.01%

pulsar's People

Contributors

315157973 avatar aahmed-se avatar anonymitaet avatar bewaremypower avatar codelipenghui avatar coderzc avatar congbobo184 avatar eolivelli avatar ivankelly avatar jennifer88huang-zz avatar jerrypeng avatar jiazhai avatar lhotari avatar liangyepianzhou avatar mattisonchao avatar merlimat avatar michaeljmarshall avatar nicoloboschi avatar nodece avatar poorbarcode avatar rdhabalia avatar shoothzj avatar sijie avatar srkukarni avatar technoboy- avatar tisonkun avatar tuteng avatar urfreespace avatar wolfstudy avatar zymap avatar

Watchers

 avatar

pulsar's Issues

Steps of finding out and deleting missing ledgers on the Pulsar side

1. Delete unrecoverable ledgers in under replicated state in the BookKeeper cluster

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 

2. Find out ledgers that existed on Pulsar managedLedger list, but not existed in the BookKeeper cluster.

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. Delete missing ledgers from Pulsar managedLedger list (Run it in the toolset container).

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:

  1. Please test the above command with one topic first to confirm it works as expected.
  2. Please pay attention to the parameter --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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.