Jackie-Jiang commented on a change in pull request #6994:
URL: https://github.com/apache/incubator-pinot/pull/6994#discussion_r643325326



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java
##########
@@ -60,20 +61,19 @@
 
   /**
    * Initializes the Segment Processor framework with input segments, output 
path and processing config
-   * @param inputSegmentsDir directory containing the input segments. These 
can be tarred or untarred.
+   * @param inputSegments list of input segments. These can be tarred or 
untarred.
    * @param segmentProcessorConfig config for segment processing
    * @param outputSegmentsDir directory for placing the resulting segments. 
This should already exist.
    */
-  public SegmentProcessorFramework(File inputSegmentsDir, 
SegmentProcessorConfig segmentProcessorConfig,
-      File outputSegmentsDir) {
+  public SegmentProcessorFramework(List<File> inputSegments, 
SegmentProcessorConfig segmentProcessorConfig,
+                                   File outputSegmentsDir) {

Review comment:
       Please follow the code style: 
https://docs.pinot.apache.org/developers/developers-and-contributors/code-setup

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java
##########
@@ -107,15 +107,14 @@ public void processSegments()
       throws Exception {
 
     // Check for input segments
-    File[] segmentFiles = _inputSegmentsDir.listFiles();
-    if (segmentFiles.length == 0) {
-      throw new IllegalStateException("No segments found in input dir: " + 
_inputSegmentsDir.getAbsolutePath()
+    if (_inputSegments.size() == 0) {

Review comment:
       Move this check to the constructor




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

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