hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Íñigo Goiri (JIRA) <j...@apache.org>
Subject [jira] [Commented] (HDFS-14435) ObserverReadProxyProvider is unable to properly fetch HAState from Standby NNs
Date Wed, 17 Apr 2019 20:45:00 GMT

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

Íñigo Goiri commented on HDFS-14435:

The code looks a little convoluted.
What about something like:
  private HAServiceState getHAServiceState(NNProxyInfo<T> proxyInfo) {
    Exception e;
    try {
      return proxyInfo.proxy.getHAServiceState();
    } catch (RemoteException re) {
      // Though a Standby will allow a getHAServiceState call, it won't allow
      // delegation token lookup, so if DT is used it throws StandbyException
      IOException ioe = re.unwrapRemoteException(StandbyException.class);
      if (ioe instanceof StandbyException) {
        LOG.debug("NameNode {} threw StandbyException when fetching HAState",
        return HAServiceState.STANDBY;
      e = re;
    } catch (IOException ioe) {
      e = ioe;
    LOG.info("Failed to connect to {}. Assuming Standby state",
      proxyInfo.getAddress(), e);
    return HAServiceState.STANDBY;

> ObserverReadProxyProvider is unable to properly fetch HAState from Standby NNs
> ------------------------------------------------------------------------------
>                 Key: HDFS-14435
>                 URL: https://issues.apache.org/jira/browse/HDFS-14435
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: ha, nn
>    Affects Versions: 3.3.0
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>            Priority: Major
>         Attachments: HDFS-14435.000.patch, HDFS-14435.001.patch
> We have been seeing issues during testing of the Consistent Read from Standby feature
that indicate that ORPP is unable to call {{getHAServiceState}} on Standby NNs, as they are
rejected with a {{StandbyException}}. Upon further investigation, we realized that although
the Standby allows the {{getHAServiceState()}} call, reading a delegation token is not allowed
in Standby state, thus the call will fail when using DT-based authentication. This hasn't
caused issues in practice, since ORPP assumes that the state is Standby if it is unable to
fetch the state, but we should fix the logic to properly handle this scenario.

This message was sent by Atlassian JIRA

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

View raw message