问题标签 [apache-bookkeeper]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
apache-pulsar - Apache Bookkeeper 删除日志
在 Apache bookkeeper 中,我们如何删除分类帐中的日志条目?如果 ledge 是不可变的并且无法删除条目,那么 pulsar 如何从 bookies 中删除过期消息?
wal - 在apache bookkeeper中,数据是先添加到WAL还是先存储在内存中?
对于典型的 lsm 树方法,我认为附加到 WAL 会在将数据存储在内存表中之前发生,但是当我查看 apache bookkeeper 的源代码时,我发现了这一行,https://github.com/apache/ bookkeeper/blob/98df593ba432eb08b18d98331201099cc72879dc/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java#L1272这意味着添加到分类帐存储发生在添加到日志之前。此外,代码中的注释说“日志addEntry
应该在条目添加到分类帐存储之后发生。否则日志条目可能会在分类帐在分类帐存储中创建之前滚动”。我在这里错过了什么吗?
apache-pulsar - 如何从终止的 pulsar bookie 中恢复
我们正在运行 Apache Pulsar 2.72。在使用 5 节点 (aws r5ad.2xlarge) bookie 集群 (4.12.0) 的 Prod 中。其中一个节点被终止。根据我们的 ASG,一个新节点出现并加入了集群。博彩公司有
- autoRecoveryDaemonEnabled=true
- lostBookieRecoveryDelay=0
- bookkeeperClientMinNumRacksPerWriteQuorum=2
- managedLedgerDefaultEnsembleSize=3
- managedLedgerDefaultWriteQuorum=3
然而,账本重新复制并没有发生。我尝试使用 sudo /opt/apache-pulsar/apache-pulsar-2.7.2/bin/bookkeeper shell decommissionbookie -bookieid bookieIP:port 停用终止的节点,但它卡在 23:53:36.465 [main] INFO org.apache .bookkeeper.client.BookKeeperAdmin - 需要重新复制的分类帐计数:793 00:03:37.293 [main] INFO org.apache.bookkeeper.client.BookKeeperAdmin - 需要重新复制的分类帐计数:793 00:13: 38.119 [main] INFO org.apache.bookkeeper.client.BookKeeperAdmin - 需要重新复制的分类帐计数:793 00:23:39.194 [main] INFO org.apache.bookkeeper.client.BookKeeperAdmin - 需要重新复制的分类帐计数被重新复制:793 00:33:39.995 [main] INFO org.apache.bookkeeper.client.BookKeeperAdmin - 需要重新复制的分类帐计数:793 超过 30 分钟。我们甚至尝试使用 sh bookkeeper shell listunderreplicated 获取复制不足的分类帐,并使用 sh bookkeeper shell ledger -m 读取一些返回的分类帐,但失败并出现异常,抱怨无法访问已终止的 bookie。我们最终删除了复制不足的分类帐。
我正在寻找一个建议,以最好地从终止的 bookie 中恢复,因为我们不得不删除分类帐
linux - Apache Bookkeeper - 如果底层存储设备有多个 DiskPartitions 或 SSD,为什么最好启用 entryLogPerLedgerEnabled=true
entryLogPerLedgerEnabled 是 bookkeeper 的配置之一,它控制 bookkeeper 使用每个 ledger 的单独日志文件。根据该文件,似乎在底层存储设备具有多个 DiskPartition 时启用此配置可能有利于 bookkeeper 的性能。但为什么?谁能解释一下这个问题:
- 如果底层存储设备有多个 DisPartition,为什么启用 entryLogPerLedgerEnabled 是理想的?
- 有什么好处?
java - BookKeeper - BKException$BKNotEnoughBookiesException
我正在尝试实现一个利用 apache bookkeeper 的简单应用程序。
我正在使用以下 docker-compose 创建本地部署。
这似乎运行成功。
在Java方面,我有以下代码:
bookkeeper.createLedger 没有抱怨,但我总是得到
org.apache.bookkeeper.client.BKException$BKNotEnoughBookiesException
执行时ledgerHandle.addEntry(message.getBytes())
ZooKeeper 容器日志:
2022-02-28 13:02:52,329 [myid:1] - WARN [NIOWorkerThread-7:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取其他数据,它可能关闭了套接字:地址 = /172.29。 0.3:38102, session = 0x10001cfa38d0000 at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn.java:170) at org.apache。 zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:508) at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor。 runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:02: 52,443 [myid:1] - WARN [NIOWorkerThread-12:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取附加数据,它可能关闭了套接字:地址 = /172.29.0.3:38104,会话 = org.apache.zookeeper 的 0x10001cfa38d0001 .server.NIOServerCnxn.handleFailedRead(NIOServerCnxn.java:170) at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java :508) at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util .concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:02:52,552 [myid:1] - WARN [NIOWorkerThread-3:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取附加数据,它可能关闭了套接字:地址 = /172.29.0.3:38106,会话 = 0x10001cfa38d0002 at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn. java:170) at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:508) at org.apache.zookeeper .server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run( Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:02:52,981 [myid:1] - WARN [NIOWorkerThread-10:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取附加数据,它可能关闭了套接字:地址 = /172.29.0.4:47484,会话 = 0x10001cfa38d0003 at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn. java:170) at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:508) at org.apache.zookeeper .server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run( Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:02:53,105 [myid:1] - WARN [NIOWorkerThread-1:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取附加数据,它可能关闭了套接字:地址 = /172.29.0.4:47488,会话 = 0x10001cfa38d0005 at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn. java:170) at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:508) at org.apache.zookeeper .server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run( Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:02:53,163 [myid:1] - WARN [NIOWorkerThread-8:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取附加数据,它可能关闭了套接字:地址 = /172.29.0.5:54222,会话 = 0x10001cfa38d0006 at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn. java:170) at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:508) at org.apache.zookeeper .server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run( Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:02:53,328 [myid:1] - WARN [NIOWorkerThread-15:NIOServerCnxn@371] - 意外异常 EndOfStreamException:无法从客户端读取附加数据,它可能关闭了套接字:地址 = /172.29.0.5:54224,会话 = 0x10001cfa38d0007 at org.apache.zookeeper.server.NIOServerCnxn.handleFailedRead(NIOServerCnxn. java:170) at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:333) at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:508) at org.apache.zookeeper .server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run( Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-02-28 13:03:03,716 [myid:1] - INFO [SessionTracker:ZooKeeperServer@628] - 会话过期 0x10001cfa38d0005,超时时间超过 10000 毫秒 2022-02-28 13:03:03,716 [myid:1] - 信息 [SessionTracker:ZooKeeperServer@628] - 会话过期 0x10001cfa38d0006,超时时间超过 10000 毫秒