hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harsh J (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5354) testHDFSConf.xml assumes username is composed by [a-zA-z0-9]
Date Mon, 27 Oct 2014 16:00:34 GMT

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

Harsh J commented on HDFS-5354:
-------------------------------

We do have some limitations applied, within WebHDFS/NFS/etc. for example, on what the default
usernames can look like. While it does support the dot as per your example, I think the \S
regex is too wide for covering just the few added characters we do support, as it will also
cover username characters we've never previously tested with.

I also wonder if dots will break username-to-queue mapping in YARN schedulers, given their
queues use dot notation for separation as well.

Some greps revealing limited support in different parts, for example:

{code}➜  hadoop git:(trunk) grep "A-Z" -R hadoop-hdfs-project | grep \\.java
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java: 
    "^(default:)?(user|group|mask|other):[[A-Za-z_][A-Za-z0-9._-]]*:([rwx-]{3})?(,(default:)?(user|group|mask|other):[[A-Za-z_][A-Za-z0-9._-]]*:([rwx-]{3})?)*$";
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java: 
public static final String  DFS_WEBHDFS_USER_PATTERN_DEFAULT = "^[A-Za-z_][A-Za-z0-9._-]*[$]?$";
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/resources/TestParam.java:
   String newPattern = "^[A-Za-z0-9_][A-Za-z0-9._-]*[$]?$";
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java:
   conf.set(DFSConfigKeys.DFS_WEBHDFS_USER_PATTERN_KEY, "^[A-Za-z0-9_][A-Za-z0-9._-]*[$]?$");
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/util/Check.java:
 private static final String IDENTIFIER_PATTERN_STR = "[a-zA-z_][a-zA-Z0-9_\\-]*";
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/util/Check.java:
  * <code>[a-zA-z_][a-zA-Z0-9_\-]*</code>, up to a maximum length.
{code}

> testHDFSConf.xml assumes username is composed by [a-zA-z0-9]
> ------------------------------------------------------------
>
>                 Key: HDFS-5354
>                 URL: https://issues.apache.org/jira/browse/HDFS-5354
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.2.0
>            Reporter: haosdent
>            Priority: Trivial
>         Attachments: HDFS-5354.patch
>
>
> All the RegexpComparator in testHDFSConf.xml assumes username is composed by [a-zA-z0-9],
but other characters are also allowed exist in username, such as 'haosong.hhs'. 



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

Mime
View raw message