[ https://issues.apache.org/jira/browse/YARN-5227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15348949#comment-15348949 ]
Jian He commented on YARN-5227: ------------------------------- oh, I misread. I interpreted as "If containerId is specified, appId should be null". May be change the message to be something like "ERROR: Both applicationId and containerId are not specified. One of them must be specified." For below logic, if both appId and containerId are specified, containerId will not be interpreted ? Then it will fail {code} if (appIdStr != null) { try { appId = ApplicationId.fromString(appIdStr); } catch (Exception e) { System.err.println("Invalid ApplicationId specified"); return -1; } } else { try { containerId = ContainerId.fromString(containerIdStr); appId = containerId.getApplicationAttemptId().getApplicationId(); } catch (Exception e) { System.err.println("Invalid ContainerId specified"); return -1; } } {code} > yarn logs command: no need to specify -applicationId when specifying > containerId > -------------------------------------------------------------------------------- > > Key: YARN-5227 > URL: https://issues.apache.org/jira/browse/YARN-5227 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Jian He > Assignee: Gergely Novák > Attachments: YARN-5227.001.patch > > > No need to specify -applicaionId when specifying containerId, because > applicationId is retrievable from containerId -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org