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

Vinod Kumar Vavilapalli commented on YARN-956:
----------------------------------------------

Seems like the following will throw NPE for apps that don't exist.
{code}
+  public Map<ApplicationAttemptId, ApplicationAttemptHistoryData>
+      getApplicationAttempts(
+          ApplicationId appId) {
+    return new HashMap<ApplicationAttemptId, ApplicationAttemptHistoryData>(
+        applicationAttemptData.get(appId));
   }
{code}

Similarly, please check getAMContainer(), getContainers().

In the test, you should do writeApplicationFinishData(appId) after the 
app-attempt data is written. It is not mandated, but helps readability. 
Similarly,     writeApplicationAttemptFinishData(appAttemptId).

> [YARN-321] Add a testable in-memory HistoryStorage 
> ---------------------------------------------------
>
>                 Key: YARN-956
>                 URL: https://issues.apache.org/jira/browse/YARN-956
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Vinod Kumar Vavilapalli
>            Assignee: Zhijie Shen
>             Fix For: YARN-321
>
>         Attachments: YARN-956-1.patch, YARN-956-2.patch, YARN-956-3.patch, 
> YARN-956.4.patch, YARN-956.5.patch, YARN-956.6.patch, YARN-956.7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to