-
Notifications
You must be signed in to change notification settings - Fork 9k
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
HDFS-16699: RBF: Update Observer NameNode state to Active when failover #4663
base: trunk
Are you sure you want to change the base?
Conversation
…ver because of sockeTimeOut Exception
💔 -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.
Thanks @SanQiMax for your PR.
Can you explain how to reproduce it in detail? Have used Observer Read in RBF?
isUnavailableException contains ConnectTimeoutException, EOFException,SocketException,StandbyException |
I add logs,and build a jar ,The final log print confirmed my guess, |
The router will obtain all nn lists (randomly sorted) before forwarding a read request each time. If it is a write request, it will obtain the Active and Standby、OBserver nn lists, and access them in turn until the request is processed successfully. |
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.
RBF with observer reads isn't supported yet. I don't think we need to chase issues regarding Observer reads with RBF unless we finalise the solution for that
@@ -483,10 +483,11 @@ public Object invokeMethod( | |||
final Object proxy = client.getProxy(); | |||
|
|||
ret = invoke(nsId, 0, method, proxy, params); | |||
if (failover) { | |||
if (failover && namenode.getState().equals(FederationNamenodeServiceState.STANDBY)) { |
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.
FederationNamenodeServiceState.STANDBY.equals(namenode.getState())
Is usually safer.
// Success on alternate server, update | ||
InetSocketAddress address = client.getAddress(); | ||
namenodeResolver.updateActiveNamenode(nsId, address); | ||
LOG.info("Update ActiveNameNode,nsId = {},rpcAddress = {}.", nsId, rpcAddress); |
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.
Fix spaces in the log
OK,I got it,thanks very much |
If i am not wrong, reads from observerNodes in RBF has been added in HDFS-16767. |
…ver because of sockeTimeOut Exception
Description of PR
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?