You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "zhihai xu (JIRA)" <ji...@apache.org> on 2015/07/31 21:40:25 UTC

[jira] [Commented] (HADOOP-12294) provide better visibility of parsing configuration failure

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

zhihai xu commented on HADOOP-12294:
------------------------------------

[~lichangleo], thanks for working on the issue. It looks like your patch will have regression, which change the current code functionality at {{FsPermission#getUMask}}. The current code only throws IllegalArgumentException when oldUmask is equal to Integer.MIN_VALUE.
The reason is if oldUmask is not equal to Integer.MIN_VALUE(default value), it will use the oldUmask to create FsPermission.
You patch removed the check, which means: it will throw IllegalArgumentException instead of creating FsPermission with oldUmask when oldUmask is not equal to Integer.MIN_VALUE.
{code}
int umask = DEFAULT_UMASK;
      if(oldUmask != Integer.MIN_VALUE) { // Property was set with old key
        if (umask != oldUmask) {
          LOG.warn(DEPRECATED_UMASK_LABEL
              + " configuration key is deprecated. " + "Convert to "
              + UMASK_LABEL + ", using octal or symbolic umask "
              + "specifications.");
          // Old and new umask values do not match - Use old umask
          umask = oldUmask;
        }
      }
    }    
    return new FsPermission((short)umask);
{code}

> provide better visibility of parsing configuration failure
> ----------------------------------------------------------
>
>                 Key: HADOOP-12294
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12294
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Chang Li
>            Assignee: Chang Li
>         Attachments: HADOOP-12294.patch
>
>
> provide better visibility of parsing configuration failure by logging full error message and propagate error message of parsing configuration back to client



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)