HBASE-23275: Track active master's address in ActiveMasterManager (#812)#1096
Closed
bharathv wants to merge 2 commits intoapache:branch-2from
Closed
HBASE-23275: Track active master's address in ActiveMasterManager (#812)#1096bharathv wants to merge 2 commits intoapache:branch-2from
bharathv wants to merge 2 commits intoapache:branch-2from
Conversation
This patch implements a simple cache that all the masters can lookup to serve cluster ID to clients. Active HMaster is still responsible for creating it but all the masters will read it from fs to serve clients. RPCs exposing it will come in a separate patch as a part of HBASE-18095. Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Guangxu Cheng <guangxucheng@gmail.com> (cherry picked from commit c2e01f2)
…ache#812) Currently we just track whether an active master exists. It helps to also track the address of the active master in all the masters to help serve the client RPC requests to know which master is active. Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Andrew Purtell <apurtell@apache.org> (cherry picked from commit efebb84)
|
💔 -1 overall
This message was automatically generated. |
apurtell
approved these changes
Jan 29, 2020
| import org.apache.zookeeper.KeeperException; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; |
Contributor
There was a problem hiding this comment.
Does this show up as a checkstyle nit?
Contributor
There was a problem hiding this comment.
I guess it doesn't, never mind...
| private ClusterId clusterId; | ||
|
|
||
| // cache stats for testing. | ||
| private AtomicInteger cacheMisses = new AtomicInteger(0); |
Contributor
There was a problem hiding this comment.
Same comment as per the master version of this change: A bit wasteful just for a unit test? Nit
| while (fetchInProgress.get()) { | ||
| // We don't want the fetches to block forever, for example if there are bugs | ||
| // of missing notifications. | ||
| fetchInProgress.wait(MAX_FETCH_TIMEOUT_MS); |
Contributor
There was a problem hiding this comment.
Oh forgot to mention this while looking at the master patch. You will miss the notification for sure if the Preconditions check above throws an exception. Doesn't seem wrong, just thought I'd mention it.
Contributor
Author
|
Will be merged as a part of #1098 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently we just track whether an active master exists.
It helps to also track the address of the active master in
all the masters to help serve the client RPC requests to
know which master is active.
Signed-off-by: Nick Dimiduk ndimiduk@apache.org
Signed-off-by: Andrew Purtell apurtell@apache.org
(cherry picked from commit efebb84)