Skip to content

Conversation

@virajjasani
Copy link
Contributor

…dren, exists and removal of unused reference EnvironmentEdgeManager

…dren, exists and removal of unused reference
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 58 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 mvninstall 255 master passed
+1 compile 16 master passed
+1 checkstyle 10 master passed
+1 shadedjars 264 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 30 master passed
+1 javadoc 15 master passed
_ Patch Compile Tests _
+1 mvninstall 275 the patch passed
+1 compile 18 the patch passed
+1 javac 18 the patch passed
+1 checkstyle 12 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 295 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 774 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 34 the patch passed
+1 javadoc 12 the patch passed
_ Other Tests _
+1 unit 44 hbase-zookeeper in the patch passed.
+1 asflicense 11 The patch does not generate ASF License warnings.
2433
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-310/1/artifact/out/Dockerfile
GITHUB PR #310
JIRA Issue HBASE-22591
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux e19d4e69407f 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 1712d2b
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-310/1/testReport/
Max. process+thread count 301 (vs. ulimit of 10000)
modules C: hbase-zookeeper U: hbase-zookeeper
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-310/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.


private Stat getStatInstance(String path, Watcher watcher, Boolean watch)
throws InterruptedException, KeeperException {
try (TraceScope scope = TraceUtil.createTrace("RecoverableZookeeper.exists")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a need for the scope variable? It isn't used anywhere.

Copy link
Contributor Author

@virajjasani virajjasani Jun 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s true that the scope variable isn’t used anywhere. However, that is how it is used with try-with-resources in most of the cases in this project to create htrace and then close it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


private List<String> getChildrenUtils(String path, Watcher watcher, Boolean watch)
throws InterruptedException, KeeperException {
try (TraceScope scope = TraceUtil.createTrace("RecoverableZookeeper.getChildren")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto


private byte[] getDataUtils(String path, Watcher watcher, Boolean watch, Stat stat)
throws InterruptedException, KeeperException {
try (TraceScope scope = TraceUtil.createTrace("RecoverableZookeeper.getData")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

return getStatInstance(path, watcher, null);
}

private Stat getStatInstance(String path, Watcher watcher, Boolean watch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth rename this method, overloading it as exists, for coherence?

return getChildrenUtils(path, watcher, null);
}

private List<String> getChildrenUtils(String path, Watcher watcher, Boolean watch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my previous comment, maybe simply overload getChildren?

return getDataUtils(path, watcher, null, stat);
}

private byte[] getDataUtils(String path, Watcher watcher, Boolean watch, Stat stat)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overload to getData?

@wchevreuil
Copy link
Contributor

Proposed changes look good. Overall, had suggested some minor neats, but it's more like a personal style, up to you @virajjasani .
Additional note: It seems there's also a getSessionPasswd public method never used anywhere. As part of these cleanouts, maybe worth also remove this method from this class?

@virajjasani
Copy link
Contributor Author

@wchevreuil Although it is personal style, it's definitely better one. Also, +1 to the removal of getSessionPasswd. Thanks for the suggestion. Incorporated in the latest commit

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 26 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
-0 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 mvninstall 248 master passed
+1 compile 15 master passed
+1 checkstyle 10 master passed
+1 shadedjars 267 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 29 master passed
+1 javadoc 15 master passed
_ Patch Compile Tests _
+1 mvninstall 242 the patch passed
+1 compile 18 the patch passed
+1 javac 18 the patch passed
+1 checkstyle 12 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 269 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 783 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 38 the patch passed
+1 javadoc 15 the patch passed
_ Other Tests _
+1 unit 48 hbase-zookeeper in the patch passed.
+1 asflicense 12 The patch does not generate ASF License warnings.
2371
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-310/2/artifact/out/Dockerfile
GITHUB PR #310
JIRA Issue HBASE-22591
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 9858bd24fd69 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 5f2699e
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-310/2/testReport/
Max. process+thread count 341 (vs. ulimit of 10000)
modules C: hbase-zookeeper U: hbase-zookeeper
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-310/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@wchevreuil wchevreuil merged commit 214553d into apache:master Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants