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 2022/10/11 21:16:37 UTC

[GitHub] [pinot] jackjlli commented on a diff in pull request #9550: Adding SegmentNameGenerator type inference if not explicitly set in config

jackjlli commented on code in PR #9550:
URL: https://github.com/apache/pinot/pull/9550#discussion_r992741488


##########
pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-common/src/main/java/org/apache/pinot/plugin/ingestion/batch/common/SegmentGenerationTaskRunner.java:
##########
@@ -143,12 +144,12 @@ private SegmentNameGenerator getSegmentNameGenerator()
         Boolean.parseBoolean(segmentNameGeneratorConfigs.get(APPEND_UUID_TO_SEGMENT_NAME));
 
     switch (segmentNameGeneratorType) {
-      case FIXED_SEGMENT_NAME_GENERATOR:
+      case BatchConfigProperties.SegmentNameGeneratorType.FIXED:

Review Comment:
   nit: you can clean up the static constants between Line 51 and Line 53.



##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java:
##########
@@ -127,15 +127,9 @@ public List<File> process()
     SegmentGeneratorConfig generatorConfig = new SegmentGeneratorConfig(tableConfig, schema);
     generatorConfig.setOutDir(_segmentsOutputDir.getPath());
 
-    if (tableConfig.getIndexingConfig().getSegmentNameGeneratorType() != null) {
-      generatorConfig.setSegmentNameGenerator(SegmentNameGeneratorFactory
-          .createSegmentNameGenerator(tableConfig, schema, segmentNamePrefix, segmentNamePostfix, fixedSegmentName,
-              false));
-    } else {
-      // SimpleSegmentNameGenerator is used by default.
-      generatorConfig.setSegmentNamePrefix(segmentNamePrefix);

Review Comment:
   Shouldn't we keep these two lines?



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