Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-25323 Fix potential NPE when the zookeeper path of RegionServerTracker does not exist when start #2702

Merged
merged 3 commits into from
Nov 25, 2020

Conversation

yuqi1129
Copy link
Contributor

No description provided.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 10s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for branch
+1 💚 mvninstall 3m 43s master passed
+1 💚 checkstyle 1m 21s master passed
+1 💚 spotbugs 2m 33s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 26s the patch passed
-0 ⚠️ checkstyle 1m 3s hbase-server: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 17m 23s Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚 spotbugs 2m 56s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 24s The patch does not generate ASF License warnings.
42m 32s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2702
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux 49d33c25cfe2 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 1cd8f3c
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count 94 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=3.1.12
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 28s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 25s Maven dependency ordering for branch
+1 💚 mvninstall 4m 23s master passed
+1 💚 compile 1m 18s master passed
+1 💚 shadedjars 7m 10s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 54s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 4m 3s the patch passed
+1 💚 compile 1m 28s the patch passed
+1 💚 javac 1m 28s the patch passed
+1 💚 shadedjars 7m 46s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 59s the patch passed
_ Other Tests _
+1 💚 unit 0m 46s hbase-zookeeper in the patch passed.
+1 💚 unit 217m 34s hbase-server in the patch passed.
250m 29s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2702
Optional Tests javac javadoc unit shadedjars compile
uname Linux 9d8e4ccf834f 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 1cd8f3c
Default Java AdoptOpenJDK-1.8.0_232-b09
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/1/testReport/
Max. process+thread count 2942 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@@ -163,8 +168,9 @@ private synchronized void refresh() {
server.abort("Unexpected zk exception getting RS nodes", e);
return;
}
Set<ServerName> servers =
Set<ServerName> servers = CollectionUtils.isEmpty(names) ? Collections.EMPTY_SET :
Copy link
Contributor

Choose a reason for hiding this comment

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

Collections.emptySet(). Use EMPTY_SET will introduce a warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I will use replace it with Collections.emptySet()

@infraio infraio changed the title Hbase 25323 Fix potential NPE when the zookeeper path of RegionServerTracker does not exist when start HBASE-25323 Fix potential NPE when the zookeeper path of RegionServerTracker does not exist when start Nov 24, 2020
@@ -297,7 +297,7 @@ public static boolean deleteIfEquals(ZKWatcher zkw, final String content) {
public static List<ServerName> getBackupMastersAndRenewWatch(
ZKWatcher zkw) throws InterruptedIOException {
// Build Set of backup masters from ZK nodes
List<String> backupMasterStrings = Collections.emptyList();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is not need to assign value to backupMasterStrings see code below

image

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 13s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
+1 💚 mvninstall 4m 22s master passed
+1 💚 checkstyle 1m 26s master passed
+1 💚 spotbugs 2m 56s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 4m 3s the patch passed
-0 ⚠️ checkstyle 1m 14s hbase-server: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 20m 4s Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚 spotbugs 3m 38s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 24s The patch does not generate ASF License warnings.
49m 5s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2702
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux 6182f0d58177 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4affae5
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count 84 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/console
versions git=2.17.1 maven=3.6.3 spotbugs=3.1.12
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 8s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 25s Maven dependency ordering for branch
+1 💚 mvninstall 5m 25s master passed
+1 💚 compile 1m 49s master passed
+1 💚 shadedjars 8m 51s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 10s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for patch
+1 💚 mvninstall 5m 45s the patch passed
+1 💚 compile 2m 1s the patch passed
+1 💚 javac 2m 1s the patch passed
+1 💚 shadedjars 9m 14s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 13s the patch passed
_ Other Tests _
+1 💚 unit 0m 51s hbase-zookeeper in the patch passed.
+1 💚 unit 149m 48s hbase-server in the patch passed.
191m 22s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2702
Optional Tests javac javadoc unit shadedjars compile
uname Linux 7f3131f754f4 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4affae5
Default Java AdoptOpenJDK-11.0.6+10
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/testReport/
Max. process+thread count 3870 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 24s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 4m 1s master passed
+1 💚 compile 1m 15s master passed
+1 💚 shadedjars 7m 11s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 52s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 53s the patch passed
+1 💚 compile 1m 15s the patch passed
+1 💚 javac 1m 15s the patch passed
+1 💚 shadedjars 7m 12s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 49s the patch passed
_ Other Tests _
+1 💚 unit 0m 42s hbase-zookeeper in the patch passed.
-1 ❌ unit 220m 20s hbase-server in the patch failed.
253m 0s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2702
Optional Tests javac javadoc unit shadedjars compile
uname Linux 05f917a7b29a 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4affae5
Default Java AdoptOpenJDK-1.8.0_232-b09
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/testReport/
Max. process+thread count 3153 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2702/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@infraio infraio left a comment

Choose a reason for hiding this comment

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

+1

@infraio infraio merged commit 984d578 into apache:master Nov 25, 2020
asfgit pushed a commit that referenced this pull request Nov 25, 2020
…Tracker does not exist when start (#2702)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Guanghao Zhang <[email protected]>
asfgit pushed a commit that referenced this pull request Nov 25, 2020
…Tracker does not exist when start (#2702)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Guanghao Zhang <[email protected]>
asfgit pushed a commit that referenced this pull request Nov 25, 2020
…Tracker does not exist when start (#2702)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Guanghao Zhang <[email protected]>
ramkrish86 pushed a commit to ramkrish86/hbase that referenced this pull request Dec 8, 2020
…Tracker does not exist when start (apache#2702)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Guanghao Zhang <[email protected]>
wchevreuil pushed a commit to wchevreuil/hbase that referenced this pull request May 24, 2021
…Tracker does not exist when start (apache#2702)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Guanghao Zhang <[email protected]>
(cherry picked from commit b710fbd)

Change-Id: I8449e9eeb93715d598d644abb545e133f667b8b4
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