Sunil G commented on YARN-6971:

Thanks [~yufeigu].
bq. at least document when to use BuilderUtils.newResource() and when to use 
Yes. I agree with you. We could streamline and document the same so that 
developer wont use {{BuilderUtils}} unnecessary. I am not very sure about 
{{createResourceForRPC}} as many other places also we are using BuilderUtils or 
RecordFacory etc.

Yes. I think it will be fine if we can do in YARN-3926  where we are already 
touching these api and could help to a lot of rebasing.

> Clean up different ways to create resources
> -------------------------------------------
>                 Key: YARN-6971
>                 URL: https://issues.apache.org/jira/browse/YARN-6971
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager, scheduler
>            Reporter: Yufei Gu
>            Priority: Minor
>              Labels: newbie
> There are several ways to create a {{resource}} object, e.g., 
> BuilderUtils.newResource() and Resources.createResource(). These methods not 
> only cause confusing but also performance issues, for example 
> BuilderUtils.newResource() is significant slow than 
> Resources.createResource(). 
> We could merge them some how, and replace most BuilderUtils.newResource() 
> with Resources.createResource().

This message was sent by Atlassian JIRA

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