You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/08/08 09:16:07 UTC

[GitHub] [hbase] Apache9 commented on a diff in pull request #4662: HBASE-27252 Clean up error-prone findings in hbase-it

Apache9 commented on code in PR #4662:
URL: https://github.com/apache/hbase/pull/4662#discussion_r940012928


##########
hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestReplication.java:
##########
@@ -121,10 +123,10 @@ protected class ClusterID {
      */
     public ClusterID(Configuration base, String key) {
       configuration = new Configuration(base);
-      String[] parts = key.split(":");
-      configuration.set(HConstants.ZOOKEEPER_QUORUM, parts[0]);
-      configuration.set(HConstants.ZOOKEEPER_CLIENT_PORT, parts[1]);
-      configuration.set(HConstants.ZOOKEEPER_ZNODE_PARENT, parts[2]);
+      Iterable<String> parts = Splitter.on(':').split(key);

Review Comment:
   Better to split to list and then use get 0, 1, 2? Or create a iterator, call next 3 times. Iterables.get will always start from the  first one and iterate...



##########
hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java:
##########
@@ -598,15 +600,11 @@ private void startWalkers(int numWalkers, Configuration conf, Context context) {
 
       private void joinWalkers() {
         walkersStop = true;

Review Comment:
   Better move this inside the synchronized lock?



-- 
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: issues-unsubscribe@hbase.apache.org

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