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


##########
indexing-hadoop/src/main/java/org/apache/druid/indexer/HadoopIngestionSpec.java:
##########
@@ -69,6 +73,7 @@ public HadoopIngestionSpec(
     this.ioConfig = ioConfig;
     this.tuningConfig = tuningConfig == null ? 
HadoopTuningConfig.makeDefaultTuningConfig() : tuningConfig;
     this.uniqueId = uniqueId == null ? UUIDUtils.generateUuid() : uniqueId;
+    this.context = context == null ? new HashMap<>() : new HashMap<>(context);

Review Comment:
   If the context is not set by the user then we set it to mutable empty 
hashmap. This allow downstream (internal Druid code) to set the context if 
needed. For example, in batch ingestion (non-hadoop) even if context is not set 
by the user, we set it to a mutable empty hashmap. This allow downstream 
processing to determine contexts like forceTimeChunkLock and set it 
appropriately to the context map.



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