[ https://issues.apache.org/jira/browse/YARN-2819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14200687#comment-14200687 ]
Zhijie Shen commented on YARN-2819: ----------------------------------- The NPE happens because the data integrity assumes that no entity has a null domainId. However, if leveldb already contains the timeline data that are generated by prior 2.6 timeline server, the integrity is broken. Previously, the entity doesn't have the domain information. Will work on a fix to be compatible to the existing store. > 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 > Labels: Upgrade > > {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)