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

Li Lu commented on YARN-2819:
-----------------------------

Hi [~zjshen]! I reviewed this patch, and it looks good to me. Specifically, I 
agree that we can treat nulls from old data equal to DEFAULT_DOMAIN in new 
data, by masking them during read out time. The special design for related 
entity in level db store is fine because only entities stored in level db will 
face this problem (any persistent data storage needs to consider domains 
afterwards). 

I noticed that you've added several tests. I think they look good for now. In 
future if we're adding support to hbase or something else, we may want to share 
some of our existing tests like {{testRelatingToNonExistingEntity}}. 

In conclusion, patch LGTM. You may want to find some committers to go through 
it once more.  

> NPE in ATS Timeline Domains when upgrading from 2.4 to 2.6
> ----------------------------------------------------------
>
>                 Key: YARN-2819
>                 URL: https://issues.apache.org/jira/browse/YARN-2819
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: timelineserver
>    Affects Versions: 2.6.0
>            Reporter: Gopal V
>            Assignee: Zhijie Shen
>            Priority: Critical
>              Labels: Upgrade
>         Attachments: YARN-2819.1.patch
>
>
> {code}
> Caused by: java.lang.NullPointerException
>         at java.lang.String.<init>(String.java:554)
>         at 
> org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore.put(LeveldbTimelineStore.java:873)
>         at 
> org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore.put(LeveldbTimelineStore.java:1014)
>         at 
> org.apache.hadoop.yarn.server.timeline.TimelineDataManager.postEntities(TimelineDataManager.java:330)
>         at 
> org.apache.hadoop.yarn.server.timeline.webapp.TimelineWebServices.postEntities(TimelineWebServices.java:260)
> {code}
> triggered by 
> {code}
> entity.getRelatedEntities();
> ...
>             } else {
>               byte[] domainIdBytes = db.get(createDomainIdKey(
>                   relatedEntityId, relatedEntityType, 
> relatedEntityStartTime));
>               // This is the existing entity
>               String domainId = new String(domainIdBytes);
>               if (!domainId.equals(entity.getDomainId())) {
> {code}
> The new String(domainIdBytes); throws an NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to