swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1228679056
##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java:
##########
@@ -72,11 +73,34 @@ public SegmentProcessorFramework(List<RecordReader>
recordReaders, SegmentProces
File workingDir)
throws IOException {
Preconditions.checkState(!recordReaders.isEmpty(), "No record reader is
provided");
-
LOGGER.info("Initializing SegmentProcessorFramework with {} record
readers, config: {}, working dir: {}",
recordReaders.size(), segmentProcessorConfig,
workingDir.getAbsolutePath());
- _recordReaders = recordReaders;
+ // Populate the RecordReaderFileConfig (container for input), so that we
deal with just one data structure.
+ _recordReaderFileConfigs = new ArrayList<>();
+ for (RecordReader recordReader : recordReaders) {
+ _recordReaderFileConfigs.add(new RecordReaderFileConfig(recordReader));
+ }
+
+ _segmentProcessorConfig = segmentProcessorConfig;
+
+ _mapperOutputDir = new File(workingDir, "mapper_output");
+ FileUtils.forceMkdir(_mapperOutputDir);
+ _reducerOutputDir = new File(workingDir, "reducer_output");
+ FileUtils.forceMkdir(_reducerOutputDir);
+ _segmentsOutputDir = new File(workingDir, "segments_output");
+ FileUtils.forceMkdir(_segmentsOutputDir);
+ }
+
+ public SegmentProcessorFramework(SegmentProcessorConfig
segmentProcessorConfig, File workingDir,
+ List<RecordReaderFileConfig> recordReaderFileConfigs)
Review Comment:
We have java's type erasure that complains if the constructors have the same
signature (1st argument being List<?>). Thats why this order.
##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java:
##########
@@ -72,11 +73,34 @@ public SegmentProcessorFramework(List<RecordReader>
recordReaders, SegmentProces
File workingDir)
Review Comment:
Added
--
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]