[
https://issues.apache.org/jira/browse/YARN-987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814486#comment-13814486
]
Zhijie Shen commented on YARN-987:
----------------------------------
* The unnecessary type casting is still there.
{code}
+ @Override
+ protected void serviceStart() throws Exception {
+ LOG.info("Starting ApplicationHistory");
+ if (historyStore instanceof Service) {
+ ((Service) historyStore).start();
+ }
+ super.serviceStart();
+ }
+
+ @Override
+ protected void serviceStop() throws Exception {
+ LOG.info("Stopping ApplicationHistory");
+ if (historyStore != null && historyStore instanceof Service) {
+ ((Service) historyStore).stop();
+ }
+ super.serviceStop();
+ }
{code}
* lastAttempt can be null. Should do null check. Otherwise, NPE may be
expected. Btw, it not like other methods which is straightforward wrap-up. Is
it good to write a test case for this one?
{code}
+ ApplicationAttemptHistoryData lastAttempt = getLastAttempt(appHistory
+ .getApplicationId());
{code}
> Adding History Service to use Store and converting Historydata to Report
> ------------------------------------------------------------------------
>
> Key: YARN-987
> URL: https://issues.apache.org/jira/browse/YARN-987
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Mayank Bansal
> Assignee: Mayank Bansal
> Attachments: YARN-987-1.patch, YARN-987-2.patch, YARN-987-3.patch,
> YARN-987-4.patch, YARN-987-5.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)