Conversation
Adapt Apache ZooKeeper ZOOKEEPER-4566 by Szabolcs Bukros (05b2159). Reuse the comparer snapshot loader and fixtures, retaining subtree totals, depth behavior, launchers and CLI regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an offline subtree summary to help operators locate where a saved ZooKeeper snapshot's znodes and payload bytes are concentrated, without dumping node values or scanning a live ensemble.
This adapts Apache ZooKeeper's ZOOKEEPER-4566 implementation, reusing the native snapshot loader and existing CLI conventions.
0for unlimited output. Depth limits only what is displayed: totals still cover the full subtree.The tool loads the snapshot into memory and reads it without modification. Its output describes the saved snapshot, not a transaction-consistent reconstruction or current live state.
Tests
Validated
SnapshotRecursiveSummaryTest,SnapshotComparerTest, andSnapStreamTestusing Maven on JDK 11 with Java 8 API targeting:Coverage includes root and subtree selection, leaf behavior, exact byte/count totals, display-depth boundaries, null data, ephemerals, compression, invalid arguments, corruption, and shell launcher execution.
Actual Java 8 VM and Windows launcher execution were not available.
Changes that Break Backward Compatibility (Optional)
None to existing server or client behavior. This adds a read-only command and does not alter snapshot formats or replay transaction logs.
Documentation (Optional)
Updated
zookeeper-docs/src/main/resources/markdown/zookeeperTools.mdwith usage, sample output, depth/counting semantics, and operational limitations.🤖 Generated with GitHub Copilot CLI