epugh commented on code in PR #4124:
URL: https://github.com/apache/solr/pull/4124#discussion_r2784537673
##########
solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java:
##########
@@ -436,30 +518,30 @@ private String normalizePath(String path) {
//
//
--------------------------------------------------------------------------------------
- static class ZKPrinter implements ContentStream {
- static boolean FULLPATH_DEFAULT = false;
-
- boolean indent = true;
- boolean fullpath = FULLPATH_DEFAULT;
- boolean detail = false;
- boolean dump = false;
-
- String keeperAddr; // the address we're connected to
-
- final Utils.BAOS baos = new Utils.BAOS();
- final Writer out = new OutputStreamWriter(baos, StandardCharsets.UTF_8);
- SolrZkClient zkClient;
+ /**
+ * Base class for ZooKeeper JSON printers. Provides common functionality for
building JSON from
+ * ZooKeeper data.
+ */
+ abstract static class ZkBasePrinter {
+ protected boolean detail;
+ protected boolean dump;
- PageOfCollections page;
- PagedCollectionSupport pagingSupport;
- ZkController zkController;
+ protected final Utils.BAOS baos = new Utils.BAOS();
+ protected final Writer out = new OutputStreamWriter(baos,
StandardCharsets.UTF_8);
+ protected final SolrZkClient zkClient;
+ protected final ZkController zkController;
+ protected final String keeperAddr;
- public ZKPrinter(ZkController controller) throws IOException {
+ public ZkBasePrinter(ZkController controller, boolean detail, boolean
dump) {
this.zkController = controller;
- keeperAddr = controller.getZkServerAddress();
- zkClient = controller.getZkClient();
+ this.detail = detail;
+ this.dump = dump;
+ this.keeperAddr = controller.getZkServerAddress();
+ this.zkClient = controller.getZkClient();
Review Comment:
this guy doesnt't make sense in standalone, so it's okay.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]