[ 
https://issues.apache.org/jira/browse/HDFS-13522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462885#comment-16462885
 ] 

Íñigo Goiri edited comment on HDFS-13522 at 5/3/18 6:16 PM:
------------------------------------------------------------

bq. One thing I'm not certain is that observer reads can be enabled/disabled on 
the client side (e.g., via StandbyReadProxyProvider and some config key). How 
this can be reflected in the RouterRpcClient which sits on the server side?

{{RouterRpcClient}} uses the raw {{ClientProtocol}}.
The core of the code is in {{RouterRpcClient#invokeMethod}} and it has a check 
for {{StandbyException}} and it allows a failover internally.
This method also gets the namenodes to invoke this methods in order based on 
the current status.
The change would be in {{getNamenodesForNameservice(nsId)}}, this method should 
recognize if the operation is READ/WRITE (we can piggyback this information 
from the {{RouterRpcServer}} and if it's a WRITE, keep the current order and if 
it's a READ allow the OBSERVER NNs to go first.

Not sure the policies that are being design right now but we can plug them 
here. Examples I can think: random, observer first...
Anyway, HDFS-12976 should cover that and be modular enough to be reused here.


was (Author: elgoiri):
bq. One thing I'm not certain is that observer reads can be enabled/disabled on 
the client side (e.g., via StandbyReadProxyProvider and some config key). How 
this can be reflected in the RouterRpcClient which sits on the server side?

{{RouterRpcClient}} uses the raw {{ClientProtocol}}.
The core of the code is in {{RouterRpcClient#invokeMethod}} and it has a check 
for {{StandbyException}} and it allows a failover internally.
This method also gets the namenodes to invoke this methods in order based on 
the current status.
The change would be in {{getNamenodesForNameservice(nsId)}}, this method should 
recognize if the operation is READ/WRITE (we can piggyback this information 
from the {{RouterRpcServer}} and if it's a WRITE, keep the current order and if 
it's a READ allow the OBSERVER NNs to go first.
Not sure the policies that are being design right now but we can plug them 
here. Examples I can think: random, observer first...

> Support observer node from Router-Based Federation
> --------------------------------------------------
>
>                 Key: HDFS-13522
>                 URL: https://issues.apache.org/jira/browse/HDFS-13522
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: federation, namenode
>            Reporter: Erik Krogen
>            Priority: Major
>
> Changes will need to occur to the router to support the new observer node.
> One such change will be to make the router understand the observer state, 
> e.g. {{FederationNamenodeServiceState}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to