You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2022/02/01 10:40:18 UTC

[GitHub] [zookeeper] brentwritescode opened a new pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

brentwritescode opened a new pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796


   Apache Jira Issue: https://issues.apache.org/jira/browse/ZOOKEEPER-4291
   Zookeeper Contribution Guidelines: https://cwiki.apache.org/confluence/display/zookeeper/howtocontribute
   
   This is a fairly substantial change and I will also send a note on the zookeeper-dev@ mailing list to start a discussion in case there are more questions/comments.
   
   The existing version of ZooInspector had an extremely short cache retention time combined with tying high frequency UI operations to network calls which resulted in almost unusable latency when using ZooInspector to talk to a Zookeeper cluster over a network.  This change refactors the tree view to move network calls onto background threads in the TreeModel while keeping the UI itself responsive and only reloading data on request after initial node expansion.
   
   In general, I think these changes take the tool from being virtually unusable when talking to remote clusters to being performant enough and responsive enough to be useful in most cases.
   
   Some other related highlights include:
   - Made getNumChildren() use the NodeCache (it wasn't previously)
   - Remove network calls getting triggered during UI redraw animations such as using scroll bars or resizing the window
   - Addition of a mouse spinner animation when work is in progress
   - Addition of the number of child nodes in parentheses after the node name on the UI
   - Move Add/Delete node logic to be encapsulated in TreeViewer logic (and remove separate Add/Delete NodeAction classes)
   - Addition of a right-click menu item to refresh a selected subtree (previously this was only doable for the entire tree)
   - Fixed the broken "Node Viewer Settings" icon and button (it previously had no icon set and didn't show on the UI)
   - Fixed the broken "About" button (it previously was failing to find the about.html file)
   - Fixed a number of Javadoc-related build warnings
   - Fixed a number of naming typos (e.g. NodeVeiwers -> NodeViewers)
   - Removed some dead/unused code
   
   Testing
   - The build succeeds, though ZooInspector currently has no unit tests.  I did test it fairly extensively with some remote clusters I have available.
   <img width="974" alt="zooinspector-helix-screenshot" src="https://user-images.githubusercontent.com/33364712/148818936-065d19fc-e06b-4b00-8cae-374cd8ac82a0.png">
   
   I have attached a screenshot of the updated version of ZooInspector (examining an Apache Helix cluster in Zookeeper).


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli closed pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
eolivelli closed pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796


   


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
symat commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1027664231


   agree, those are flaky and unrelated.
   I merged it to master, the patch will land in 3.8.0. Thanks for the contribution, @brentwritescode !


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
symat commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1027660686


   thanks @brentwritescode ! I'm going to merge it soon.
   This is our 'official' wiki, linked from zookeeper webpage: https://cwiki.apache.org/confluence/display/ZOOKEEPER/Index
   This is some apache wiki, where ZooKeeper has it's own 'space'. I'm not sure who can add you as an editor...


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat commented on a change in pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
symat commented on a change in pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#discussion_r796620532



##########
File path: zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeView.java
##########
@@ -0,0 +1,600 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.gui;
+
+import com.nitido.utils.toaster.Toaster;
+import org.apache.zookeeper.inspector.gui.nodeviewer.NodeSelectionListener;
+import org.apache.zookeeper.inspector.manager.NodeListener;
+import org.apache.zookeeper.inspector.manager.Pair;
+import org.apache.zookeeper.inspector.manager.ZooInspectorManager;
+
+import javax.swing.*;

Review comment:
       please avoid * imports in the patch




-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on a change in pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#discussion_r796725489



##########
File path: zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeView.java
##########
@@ -0,0 +1,600 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.gui;
+
+import com.nitido.utils.toaster.Toaster;
+import org.apache.zookeeper.inspector.gui.nodeviewer.NodeSelectionListener;
+import org.apache.zookeeper.inspector.manager.NodeListener;
+import org.apache.zookeeper.inspector.manager.Pair;
+import org.apache.zookeeper.inspector.manager.ZooInspectorManager;
+
+import javax.swing.*;

Review comment:
       thanks




-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] brentwritescode commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
brentwritescode commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1027434622


   > @brentwritescode what about writing a small blog post about ZooInspector and how are you using it in production ?
   
   That's an interesting idea.  Is there an official Zookeeper blog somewhere?  Or do you mean on a personal or company blog that I have access to?


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1026702245


   closed/reopened to trigger CI


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1027662872


   @symat the errors in CI (CPP tests) are unrelated to this patch.
   I believe that we can merge the patch


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] asfgit closed pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796


   


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] brentwritescode commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
brentwritescode commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1009238101


   Darn, I think I missed a license header.  I didn't think to run the RAT check locally.  I will run the proper build command locally and upload a fix.


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] brentwritescode commented on a change in pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
brentwritescode commented on a change in pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#discussion_r796724055



##########
File path: zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeView.java
##########
@@ -0,0 +1,600 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.inspector.gui;
+
+import com.nitido.utils.toaster.Toaster;
+import org.apache.zookeeper.inspector.gui.nodeviewer.NodeSelectionListener;
+import org.apache.zookeeper.inspector.manager.NodeListener;
+import org.apache.zookeeper.inspector.manager.Pair;
+import org.apache.zookeeper.inspector.manager.ZooInspectorManager;
+
+import javax.swing.*;

Review comment:
       It turns out IntelliJ has a bunch of configuration that was causing this to happen.  Thank you for catching it!  I have submitted a small update to remove all wildcard imports from the project.




-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on pull request #1796: ZOOKEEPER-4291: ZooInspector has very high latency when operating against remote clusters

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #1796:
URL: https://github.com/apache/zookeeper/pull/1796#issuecomment-1026983717


   @brentwritescode what about writing a small blog post about ZooInspector and how are you using it in production ?


-- 
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: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org