You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/09/23 16:44:59 UTC

[GitHub] [pinot] klsince commented on a change in pull request #7473: Revert back to use BatchIngestionConfig parameter

klsince commented on a change in pull request #7473:
URL: https://github.com/apache/pinot/pull/7473#discussion_r714976261



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/IngestionUtils.java
##########
@@ -88,20 +87,23 @@ private IngestionUtils() {
    */
   public static SegmentGeneratorConfig generateSegmentGeneratorConfig(TableConfig tableConfig, Schema schema)
       throws IOException, ClassNotFoundException {
-    return generateSegmentGeneratorConfig(tableConfig, schema, Collections.emptyMap());
+    Preconditions.checkNotNull(tableConfig.getIngestionConfig(),
+        "Must provide ingestionConfig in tableConfig for table: %s, for generating SegmentGeneratorConfig",
+        tableConfig.getTableName());
+    Preconditions.checkNotNull(tableConfig.getIngestionConfig().getBatchIngestionConfig(),

Review comment:
       nit: this check might be saved, as it's checked in the method call L96? 

##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/IngestionUtils.java
##########
@@ -110,8 +112,6 @@ public static SegmentGeneratorConfig generateSegmentGeneratorConfig(TableConfig
 
     // apply config override provided by user.
     Map<String, String> batchConfigMap = new HashMap<>(batchIngestionConfig.getBatchConfigMaps().get(0));

Review comment:
       Q: is this defensive copy needed? I found the old code didn't do the copy.




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org