hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhijie Shen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1023) [YARN-321] Weservices REST API's support for Application History
Date Mon, 12 Aug 2013 18:10:48 GMT

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

Zhijie Shen commented on YARN-1023:

For the second exception, is it better to say "malformed appId", because the first validation
has already verified the appId is not null? Same for attempt id and container id. I guess
the message is learnt from RMWebServices, but is the aforementioned one a better message?
+    if (appId == null || appId.isEmpty()) {
+      throw new NotFoundException("appId, " + appId + ", is empty or null");
+    }
+    ApplicationId id = ConverterUtils.toApplicationId(recordFactory, appId);
+    if (id == null) {
+      throw new NotFoundException("appId is null");
+    }

It's safe to check map != null before calling values(), though it is supposed to be an empty
map if there's no container. Same for attempts.
+      containers = appHistoryReader.getContainers(id).values();

In YARN-954, if we want support query the containers with both app and appattempt ids, we'd
better to support both here as well. The section "{appattemptid}" can be either app and appattempt
id (may need renaming), and is parsed in this method.
+  @GET
+  @Path("/\{appattemptid\}/containers")
+  @Produces(\{ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML \})
+  public AHSContainersInfo getContainers(
+      @PathParam("appattemptid") String appAttemptId) {
> [YARN-321] Weservices REST API's support for Application History
> ----------------------------------------------------------------
>                 Key: YARN-1023
>                 URL: https://issues.apache.org/jira/browse/YARN-1023
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: YARN-321
>            Reporter: Devaraj K
>            Assignee: Devaraj K
>         Attachments: YARN-1023-v0.patch

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message