maytasm commented on code in PR #16613:
URL: https://github.com/apache/druid/pull/16613#discussion_r1640832843


##########
processing/src/main/java/org/apache/druid/java/util/emitter/service/SegmentMetadataEvent.java:
##########
@@ -85,7 +86,7 @@ public SegmentMetadataEvent(
   )
   {
     this.dataSource = dataSource;
-    this.createdTime = createdTime;
+    this.createdTime = createdTime != null ? createdTime : DateTimes.nowUtc();

Review Comment:
   Yes. It is never passed as null right now. The current and only caller of 
the SegmentMetadataEvent.create pass DateTimes.nowUtc() but I want to be extra 
safe. This is in case some new user comes along and call  
SegmentMetadataEvent.create without setting the createdTime (either though 
using the SegmentMetadataEvent.create without passing eventTime or calling the 
SegmentMetadataEvent constructor without setting createdTime. 



-- 
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