[
https://issues.apache.org/jira/browse/HDFS-13779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574081#comment-16574081
]
Erik Krogen commented on HDFS-13779:
------------------------------------
Attaching a WIP patch which covers this and HDFS-13780, and relies on some more
refactoring in ConfiguredFailoverProxyProvider.
The idea is basically to continue allowing the CFPP layer to manage only the
Active/Standby NameNodes, and ORPP to manage the observers (then fall back to
CFPP's non-observer proxies). _Failover_ refers only to switching Active
NameNodes, _not_ switching between observers.
* Refactor CFPP a bit to create a separate {{getProxies()}} method where the
initialization can be done (solving HDFS-13780), and also where it can be
overridden by ORPP.
* On proxy initialization, also fetch all of the NameNode states. When CFPP
requests proxies, filter to only non-observers.
* Method invocation, on read methods, tries all of the NNs thought to
currently be in observer state. If any throws a StandbyException, mark it as
non-observer. Unfortunately we have no way to tell here if one of the
thought-to-be-observers has actually become Active, but in this case failover
will happen soon (at the next write request) and the situation will be fixed
(see below).
* If all observer NNs fail, or it is a write method, pass the request up to
CFPP, which will try the current Active. This may trigger failover. If so,
before picking a new node from the list of non-observers, refresh the states of
all of the NameNodes. This handles the case where one of the previous observers
is now active.
[~shv], [~chliang], let me know your thoughts on the above.
> Implement performFailover logic for ObserverReadProxyProvider.
> --------------------------------------------------------------
>
> Key: HDFS-13779
> URL: https://issues.apache.org/jira/browse/HDFS-13779
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Reporter: Konstantin Shvachko
> Assignee: Erik Krogen
> Priority: Major
> Attachments: HDFS-13779-HDFS-12943.WIP00.patch
>
>
> Currently {{ObserverReadProxyProvider}} inherits {{performFailover()}} method
> from {{ConfiguredFailoverProxyProvider}}, which simply increments the index
> and switches over to another NameNode. The logic for ORPP should be smart
> enough to choose another observer, otherwise it can switch to a SBN, where
> reads are disallowed, or to an ANN, which defeats the purpose of reads from
> standby.
> This was discussed in HDFS-12976.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]