-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-23275: Track active master's address in ActiveMasterManager (#812) #1096
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
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 <[email protected]> Signed-off-by: Wellington Chevreuil <[email protected]> Signed-off-by: Guangxu Cheng <[email protected]> (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 <[email protected]> Signed-off-by: Andrew Purtell <[email protected]> (cherry picked from commit efebb84)
|
💔 -1 overall
This message was automatically generated. |
| import org.apache.zookeeper.KeeperException; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; |
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.
Does this show up as a checkstyle nit?
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.
I guess it doesn't, never mind...
| private ClusterId clusterId; | ||
|
|
||
| // cache stats for testing. | ||
| private AtomicInteger cacheMisses = new AtomicInteger(0); |
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.
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); |
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.
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.
|
Will be merged as a part of #1098 |
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 [email protected]
Signed-off-by: Andrew Purtell [email protected]
(cherry picked from commit efebb84)