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

Giovanni Matteo Fumarola commented on YARN-996:
-----------------------------------------------

Thanks [~ozawa] for working on this.

I have some doubts about this code.
{code:java}
private ResourceOption resourceOption;

public ResourceOptionInfo(ResourceOption resourceOption) {
  this.resource = new ResourceInfo(resourceOption.getResource());
  this.overCommitTimeout = resourceOption.getOverCommitTimeout();
}

public ResourceOption getResourceOption() {
  if (resourceOption == null) {
    resourceOption = ResourceOption.newInstance(
    resource.getResource(), overCommitTimeout);
  }
  return resourceOption;
}
{code}
* this.resourceOption = resourceOption should be In the constructor. 

 

* getResourceOption can go in NPE if we use the first constructor.

> REST API support for node resource configuration
> ------------------------------------------------
>
>                 Key: YARN-996
>                 URL: https://issues.apache.org/jira/browse/YARN-996
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: graceful, nodemanager, scheduler
>            Reporter: Junping Du
>            Assignee: Tsuyoshi Ozawa
>            Priority: Major
>         Attachments: YARN-996-2.patch, YARN-996-3.patch, YARN-996-4.patch, 
> YARN-996-sample.patch
>
>
> Besides admin protocol and CLI, REST API should also be supported for node 
> resource configuration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to