fx19880617 commented on a change in pull request #4888: Refactor file format 
based RecordReader constructors
URL: https://github.com/apache/incubator-pinot/pull/4888#discussion_r354718122
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/creator/impl/SegmentIndexCreationDriverImpl.java
 ##########
 @@ -105,7 +106,45 @@
   @Override
   public void init(SegmentGeneratorConfig config)
       throws Exception {
-    init(config, RecordReaderFactory.getRecordReader(config));
+    init(config, getRecordReader(config));
+  }
+
+  private RecordReader getRecordReader(SegmentGeneratorConfig 
segmentGeneratorConfig)
+      throws Exception {
+    File dataFile = new File(segmentGeneratorConfig.getInputFilePath());
+    Preconditions.checkState(dataFile.exists(), "Input file: " + 
dataFile.getAbsolutePath() + " does not exist");
+
+    Schema schema = segmentGeneratorConfig.getSchema();
+    FileFormat fileFormat = segmentGeneratorConfig.getFormat();
+    String recordReaderPath = segmentGeneratorConfig.getRecordReaderPath();
 
 Review comment:
   Done

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to