[ https://issues.apache.org/jira/browse/YARN-8987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682241#comment-16682241 ]
Bibin A Chundatt commented on YARN-8987: ---------------------------------------- Hi [~cheersyang] {quote} I think validateAttributesExists doesn't need to check AttributeMappingOperationType, can we remove the 2nd parameter? And this applies to replace too. If the check is not there. {quote} Replace does complete replace of node attributes. So its not applicable for replace. Regarding null check, proto implementation takes care of few # nodesToAttributes will return empty list. # nodeToAttrs.getNode() --> handled in latest patch. # getAttributesForNode(String hostName) cant be null as per implementation. Empty hashmap is expected. {quote} It thinks I type a wrong command and prints usage message. {quote} Ignored the usage in case of YarnException. > Usability improvements node-attributes CLI > ------------------------------------------ > > Key: YARN-8987 > URL: https://issues.apache.org/jira/browse/YARN-8987 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Weiwei Yang > Priority: Critical > Attachments: YARN-8987.001.patch > > > I setup a single node cluster, then trying to add node-attributes with CLI, > first I tried: > {code:java} > ./bin/yarn nodeattributes -add localhost:hostname(STRING)=localhost > {code} > this command returns exit code 0, however the node-attribute was not added. > Then I tried to replace "localhost" with the host ID, and it worked. > We need to ensure the command fails with proper error message when adding was > not succeed. > Similarly, when I remove a node-attribute that doesn't exist, I still get > return code 0. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org