slfan1989 commented on code in PR #7453:
URL: https://github.com/apache/hadoop/pull/7453#discussion_r1980303206


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timelineservice/TimelineEntity.java:
##########
@@ -150,7 +152,7 @@ public boolean equals(Object obj) {
   private NavigableSet<TimelineEvent> events = new TreeSet<>();
   private HashMap<String, Set<String>> isRelatedToEntities = new HashMap<>();
   private HashMap<String, Set<String>> relatesToEntities = new HashMap<>();
-  private Long createdTime;
+  private Long createdTime = Instant.EPOCH.toEpochMilli();

Review Comment:
   Thank you for reviewing this PR! We encountered a NullPointerException 
during unit testing. For the creation time, we need to set a default value, and 
I chose Instant.EPOCH over Instant.Min. In order to explain the issue clearly, 
we need to mention Jersey. I will provide a detailed explanation in response to 
your third question.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to