-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Conversation
…Tracker does not exist when start
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
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 : |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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()
@@ -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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
…Tracker does not exist when start (#2702) Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Guanghao Zhang <[email protected]>
…Tracker does not exist when start (#2702) Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Guanghao Zhang <[email protected]>
…Tracker does not exist when start (#2702) Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Guanghao Zhang <[email protected]>
…Tracker does not exist when start (apache#2702) Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Guanghao Zhang <[email protected]>
…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
No description provided.