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

Sidharta Seethana commented on YARN-7286:
-----------------------------------------

The {{DEFAULT_NM_DOCKER_CONTAINER_CAPABILITIES}} list was based on the 
capabilities docker enabled by default at the time. This default list of 
capabilities is meant to stay consistent even if docker changes this list over 
time. 

{quote}
Well, yes, but that's at the discretion of the admin. If they want to give the 
user 0 capabilities, then they should be able to. The question is what the best 
way to do that is. If I were to look at yarn-site.xml and see <value></value> 
for the capabilities, I would implicitly think there are no capabilities given, 
since this is an empty list. However, this would actually give the default list 
of capabilities.
{quote}

This is bit that is surprising - is this the behavior expected from 
{{Configuration.setStrings(key, "")}} as well ? The behavior I see is this : 

{code}
final YarnConfiguration conf = new YarnConfiguration();
//set test.key1 and not test.key2
conf.setStrings("test.key1", "");
Assert.assertTrue(conf.getStrings("test.key1", "val1",
        "val2") == null);
Assert.assertEquals(2, conf.getStrings("test.key2", "val1", "val2")
        .length);
{code}



> Add support for docker to have no capabilities
> ----------------------------------------------
>
>                 Key: YARN-7286
>                 URL: https://issues.apache.org/jira/browse/YARN-7286
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>         Attachments: YARN-7286.001.patch, YARN-7286.002.patch, 
> YARN-7286.003.patch
>
>
> Support for controlling capabilities was introduced in YARN-4258. However, it 
> does not allow for the capabilities list to be NULL, since {{getStrings()}} 
> will treat an empty value the same as it treats an unset property. So, a NULL 
> list will actually give the default capabilities list.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to