hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7180) Remove class ResourceType
Date Tue, 10 Oct 2017 09:05:00 GMT

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

Sunil G commented on YARN-7180:

Thanks [~templedf]

To me, I think the whole feature done in YARN-2162 is not considered multiple resource types.
Hence fixing a part of it may not help much.

   * Parses a resource config value of a form like "1024", "1024 mb",
   * or "1024 mb, 3 vcores". If no units are given, megabytes are assumed.
   * @throws AllocationConfigurationException
  public static ConfigurableResource parseResourceConfigValue(String val)
      throws AllocationConfigurationException {
    ConfigurableResource configurableResource;
    try {
      val = StringUtils.toLowerCase(val);
      if (val.contains("%")) {
        configurableResource = new ConfigurableResource(
      } else {
        int memory = findResource(val, "mb");
        int vcores = findResource(val, "vcores");
        configurableResource = new ConfigurableResource(
            BuilderUtils.newResource(memory, vcores));

If you see here, it expects a string like {{"1024 mb, 3 vcores"}} and for other resources,
nothing is defined. So we have to use ResourceUtils for this and then change the behavior
of {{ConfigurableResource}} etc. I think a followup jira for YARN-2162 could be created  and
handle this cleanly. 

For now if its fine, we can get this jira in as we could avoid potential mis-use of *ResourceType*

> Remove class ResourceType
> -------------------------
>                 Key: YARN-7180
>                 URL: https://issues.apache.org/jira/browse/YARN-7180
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager, scheduler
>            Reporter: Yufei Gu
>            Assignee: Sunil G
>         Attachments: YARN-7180.001.patch, YARN-7180.002.patch
> org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceType isn't needed any
more with the new resource type change.  

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