hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Templeton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7442) [YARN-7069] Limit format of resource type name
Date Thu, 09 Nov 2017 21:09:00 GMT

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

Daniel Templeton commented on YARN-7442:

Thanks, [~leftnoteasy].  Two comments:
# {{validateNameOfResourceNameAndThorwException()}} is misspelled: "Thorw" => "Throw"
# The error message in {{validateNameOfResourceNameAndThorwException()}} seems cruel.  Can
we instead say something more generally understandable, like, "'<resource>' is not a
valid resource name. A valid resource name must begin with a letter and contain only letters,
numbers, and any of: '.', '_', or '-'.  A valid resource name may also be optionally preceded
by a name space followed by a slash.  A valid name space consists of period-separated groups
of letters, numbers, and dashes."

It might be nice to say that in the documentation as well.

Back to my earlier question, do we actually need to allow for dots in resource names?

> [YARN-7069] Limit format of resource type name
> ----------------------------------------------
>                 Key: YARN-7442
>                 URL: https://issues.apache.org/jira/browse/YARN-7442
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>            Priority: Blocker
>         Attachments: YARN-7442.001.patch, YARN-7442.002.patch
> I think we should limit format of resource type name. Otherwise it could be very hard
to update in the future after release. 
> I propose to have format:
> {code}
> [a-zA-Z0-9][a-zA-Z0-9_.-/]*
> {code}
> Adding this check to setResourceInformation might affect performance a lot. Probably
we can add to {{ResourceUtils#initializeResourcesMap}} when resource types are loaded from
config file.
> [~templedf]/[~sunilg].

This message was sent by Atlassian JIRA

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

View raw message