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

Eric Badger commented on YARN-10493:
------------------------------------

Thanks for the latest patch. I tested out the patch along with the CLI tool 
from YARN-10494 and everything seems to be working well. The addition of 
namespaces has fixed my issue from last time with the {{hadoop/rhel7:current}} 
image. But I do have a few comments. In addition to these comments, I would 
like to commit both this JIRA and YARN-10494 at the same time, because I don't 
particularly think either makes sense without the other. And YARN-10494 has a 
blocker on it because of the docker->overlayfs incompatibilities with 
whiteout/opaque files. Anyway, here are my comments on this JIRA

{noformat}
    if (!tag.equals("")) {
{noformat}
nit: There are a few times where the patch uses this, but I think {{isEmpty()}} 
is more appropriate than {{equals("")}}. 

{noformat}
    String[] nameParts = imageCoordinates.split("/", -1);
    String imageTag;
    if (nameParts.length == 2) {
      metaNamespace = nameParts[0];
      imageTag = nameParts[1];
    } else if (nameParts.length == 1) {
      imageTag = nameParts[0];
    } else {
      throw new IllegalArgumentException("Invalid image coordinates: "
          + imageCoordinates);
    }
{noformat}
According to the 
[documentation|https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String-int-]
 for {{split}}, this code will create a String array with the number of 
elements equal to the number of {{/}} + 1. But then we only look at the first 2 
parts of the array. Is there a reason not to take only the part before the 
first slash as the namespace and then take the rest as the imageTag?

> RunC container repository v2
> ----------------------------
>
>                 Key: YARN-10493
>                 URL: https://issues.apache.org/jira/browse/YARN-10493
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, yarn
>    Affects Versions: 3.3.0
>            Reporter: Craig Condit
>            Assignee: Matthew Sharp
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: runc-container-repository-v2-design.pdf, 
> runc-container-repository-v2-design_updated.pdf
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The current runc container repository design has scalability and usability 
> issues which will likely limit widespread adoption. We should address this 
> with a new, V2 layout.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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