You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "swaminathanmanish (via GitHub)" <gi...@apache.org> on 2023/06/08 14:17:41 UTC

[GitHub] [pinot] swaminathanmanish opened a new pull request, #10874: Making segmentMapper do the init and cleanup of RecordReader (WIP)

swaminathanmanish opened a new pull request, #10874:
URL: https://github.com/apache/pinot/pull/10874

   **Problem**:
   RecordReaders are used to iterate over the source/input files, in order to ingest data/create segments. Although we iterate one row at at time from a file, we have readers (like ParquetRecordReader) that allocate a rowGroup (collection of rows) for better read throughput, while reading from Parquet files. This uses up heap memory. The SegmentProcessesorFramework takes in N RecordReaders. Users of this framework allocate N RecordReaders using getRecordReader factory, which also initializes the reader. Depending on how many readers are created, there's a possibility of running out of heap space due to eager allocation/initialization.
   
   **Solution**:
   Provide the flexibility to pass the info required to initialize and clean up record reader in the mapper, where it is used. This will ensure that the readers use memory only when being iterated in the mapper and we don't eagerly allocate memory.
   


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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1227206422


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {
+      RecordReader recordReader = recordReaderFileConfig._recordReader;
+      if (recordReader == null) {
+        recordReader =
+            RecordReaderFactory.getRecordReader(recordReaderFileConfig._fileFormat, recordReaderFileConfig._dataFile,
+                recordReaderFileConfig._fieldsToRead, recordReaderFileConfig._recordReaderConfig);
+        inited = true;
+      }
+      mapAndTransformRow(recordReader, reuse, observer, count, totalCount);

Review Comment:
   Yes makes sense. I'll add the try block. 



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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
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: 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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1227354592


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/RecordReaderFileConfig.java:
##########
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.spi.data.readers;
+
+import java.io.File;
+import java.util.Set;
+import javax.annotation.Nullable;
+
+
+/**
+ * Wraps RecordReader info to instantiate a reader. Users can either pass in the
+ * RecordReader instance directly or the info required to initialize the RecordReader, so that the
+ * RecordReader can be initialized just when its about to be used, which avoids early/eager
+ * initialization/memory allocation.
+ */
+public class RecordReaderFileConfig {

Review Comment:
   Resolved offline that we will keep the same name.



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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1224345854


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {

Review Comment:
   Both are related :).
   I initially did not have RecordReader in RecordReaderFileConfig, but noticed that callers passed in OSS RecordReaders as well custom RecordReaders.  I wanted to have the flexibility to support both these usages using the same wrapper/container 'RecordReaderFileConfig'. Its better for the caller not to differentiate between when to use List of RecordReaders Vs  List of RecordReaderFileConfigs. They only use RecordReaderFileConfig. The constructors for RecordReaderFileConfig makes it clear how it should be used (either pass in info to initialize the reader or the reader instance itself).  
   The other parameter List<RecordReader> is kept only for backwards compatibility. 
   
   



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


[GitHub] [pinot] snleee commented on pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee commented on PR #10874:
URL: https://github.com/apache/pinot/pull/10874#issuecomment-1590409301

   Thank you for addressing comments quickly!


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


[GitHub] [pinot] swaminathanmanish commented on pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on PR #10874:
URL: https://github.com/apache/pinot/pull/10874#issuecomment-1583342815

   @snleee , @rajagopr - Please take a look.


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


[GitHub] [pinot] rajagopr commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "rajagopr (via GitHub)" <gi...@apache.org>.
rajagopr commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1226682325


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {
+      RecordReader recordReader = recordReaderFileConfig._recordReader;
+      if (recordReader == null) {
+        recordReader =
+            RecordReaderFactory.getRecordReader(recordReaderFileConfig._fileFormat, recordReaderFileConfig._dataFile,
+                recordReaderFileConfig._fieldsToRead, recordReaderFileConfig._recordReaderConfig);
+        inited = true;
+      }
+      mapAndTransformRow(recordReader, reuse, observer, count, totalCount);

Review Comment:
   Should this not be inside `try {...} finally{...}` to ensure close of record readers?



##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -97,10 +104,25 @@ public SegmentMapper(List<RecordReader> recordReaders, SegmentProcessorConfig pr
     }
     // Time partition + partition from partitioners
     _partitionsBuffer = new String[numPartitioners + 1];
+
+    if (_recordReaders != null) {
+      Preconditions.checkState(_recordReaderFileConfigs == null, "Cannot populate both "
+          + "ReaderReaders and RecordReaderFileConfigs");

Review Comment:
   nit: `RecordReaders`



##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {
+      RecordReader recordReader = recordReaderFileConfig._recordReader;
+      if (recordReader == null) {
+        recordReader =
+            RecordReaderFactory.getRecordReader(recordReaderFileConfig._fileFormat, recordReaderFileConfig._dataFile,
+                recordReaderFileConfig._fieldsToRead, recordReaderFileConfig._recordReaderConfig);
+        inited = true;

Review Comment:
   we can get rid of this variable. 
   
   ```
         try {
           mapAndTransformRow(recordReader, reuse, observer, count, totalCount);
         } finally {
           recordReader.close();
         }
   ```



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


[GitHub] [pinot] snleee commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1223747098


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java:
##########
@@ -72,11 +74,30 @@ 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;
+    _recordReaderFileConfigs = null;
+    _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,

Review Comment:
   Lets put `recordReaderFileConfigs` first to keep the ordering convention with the existing constructor.



##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/RecordReaderFileConfig.java:
##########
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.spi.data.readers;
+
+import java.io.File;
+import java.util.Set;
+import javax.annotation.Nullable;
+
+
+/**
+ * Wraps RecordReader info to instantiate a reader. Users can either pass in the
+ * RecordReader instance directly or the info required to initialize the RecordReader, so that the
+ * RecordReader can be initialized just when its about to be used, which avoids early/eager
+ * initialization/memory allocation.
+ */
+public class RecordReaderFileConfig {

Review Comment:
   `RecordReaderFactoryConfig` may be slightly better? :P 



##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {

Review Comment:
   I think that it may be simpler to understand if we split the logic for `recordReaderFileConfig & recordReaders`?
   
   I initially had the questions like:
   
   1. why can't we directly do
   ```
   for readerFileConfig
      initialize record reader
      read...
      close
   ```
   
   2. I also had a question on why recordReaderFileConfig contains `RecordReader`.
   
   Both are needed because we are trying to combine the logic here. 
   
   
   How do you think?



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


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1228656776


##########
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:
   (nit) Make `recordReaderFileConfigs` the first argument



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

Review Comment:
   We may introduce a helper method to convert `List<RecordReader>` to `List<RecordReaderFileConfig> recordReaderFileConfigs` and directly call the other 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.

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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1228678255


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

Review Comment:
   Makes sense. 



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


[GitHub] [pinot] codecov-commenter commented on pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10874:
URL: https://github.com/apache/pinot/pull/10874#issuecomment-1583443145

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/10874?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#10874](https://app.codecov.io/gh/apache/pinot/pull/10874?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (2930539) into [master](https://app.codecov.io/gh/apache/pinot/commit/26e5952d75ff5accedd05c5eb9812cf900d3f413?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (26e5952) will **decrease** coverage by `0.12%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10874      +/-   ##
   ==========================================
   - Coverage    0.11%    0.00%   -0.12%     
   ==========================================
     Files        2186     2171      -15     
     Lines      117358   116974     -384     
     Branches    17732    17683      -49     
   ==========================================
   - Hits          137        0     -137     
   + Misses     117201   116974     -227     
   + Partials       20        0      -20     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1temurin11 | `?` | |
   | integration1temurin17 | `?` | |
   | integration1temurin20 | `0.00% <0.00%> (?)` | |
   | unittests1temurin11 | `?` | |
   | unittests1temurin17 | `?` | |
   | unittests1temurin20 | `0.00% <0.00%> (ø)` | |
   | unittests2temurin11 | `?` | |
   | unittests2temurin17 | `?` | |
   | unittests2temurin20 | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/pinot/pull/10874?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...rocessing/framework/SegmentProcessorFramework.java](https://app.codecov.io/gh/apache/pinot/pull/10874?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvZnJhbWV3b3JrL1NlZ21lbnRQcm9jZXNzb3JGcmFtZXdvcmsuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../core/segment/processing/mapper/SegmentMapper.java](https://app.codecov.io/gh/apache/pinot/pull/10874?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvbWFwcGVyL1NlZ21lbnRNYXBwZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...pinot/spi/data/readers/RecordReaderFileConfig.java](https://app.codecov.io/gh/apache/pinot/pull/10874?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9yZWFkZXJzL1JlY29yZFJlYWRlckZpbGVDb25maWcuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   
   ... and [18 files with indirect coverage changes](https://app.codecov.io/gh/apache/pinot/pull/10874/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1224345854


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {

Review Comment:
   Both are related :).
   I initially did not have RecordReader in RecordReaderFileConfig, but noticed that callers passed in OSS RecordReaders as well custom RecordReaders.  I wanted to have the flexibility to support both these usages using the same wrapper/container 'RecordReaderFileConfig'. Its better for the caller not to differentiate between when to use List<RecordReader> Vs  List<RecordReaderFileConfig>. They only use RecordReaderFileConfig. The constructors for RecordReaderFileConfig makes it clear how it should be used (either pass in info to initialize the reader or the reader instance itself).  
   The other parameter List<RecordReader> is kept only for backwards compatibility. 
   
   



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


[GitHub] [pinot] snleee commented on pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee commented on PR #10874:
URL: https://github.com/apache/pinot/pull/10874#issuecomment-1588556003

   @Jackie-Jiang Removing the constructor for record reader will cause backward incompatibility for many external code base that is using segment processing framework?


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


[GitHub] [pinot] snleee merged pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee merged PR #10874:
URL: https://github.com/apache/pinot/pull/10874


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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1224350081


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/RecordReaderFileConfig.java:
##########
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.spi.data.readers;
+
+import java.io.File;
+import java.util.Set;
+import javax.annotation.Nullable;
+
+
+/**
+ * Wraps RecordReader info to instantiate a reader. Users can either pass in the
+ * RecordReader instance directly or the info required to initialize the RecordReader, so that the
+ * RecordReader can be initialized just when its about to be used, which avoids early/eager
+ * initialization/memory allocation.
+ */
+public class RecordReaderFileConfig {

Review Comment:
   Im fine with the name `RecordReaderFactoryConfig`, but factory means it should create/initialize something right? Here its just a container/holder for recordReader info. is that ok? or we add a create method to this class and call it factory. 
   



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


[GitHub] [pinot] swaminathanmanish commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1224336596


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java:
##########
@@ -72,11 +74,30 @@ 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;
+    _recordReaderFileConfigs = null;
+    _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,

Review Comment:
   Yes thats what I did initially :), but java's type erasure shows that the 2 constructors clash, since the have the same arguments in the same order (1st one being List<?>). And I would really like to have 2 constructors for this, to make the usage explicit. 
   



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


[GitHub] [pinot] snleee commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1226944233


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/mapper/SegmentMapper.java:
##########
@@ -122,32 +144,23 @@ public Map<String, GenericRowFileManager> map()
   private Map<String, GenericRowFileManager> doMap()
       throws Exception {
     Consumer<Object> observer = _processorConfig.getProgressObserver();
-    int totalCount = _recordReaders.size();
+    int totalCount = _recordReaderFileConfigs.size();
     int count = 1;
     GenericRow reuse = new GenericRow();
-    for (RecordReader recordReader : _recordReaders) {
-      observer.accept(String.format("Doing map phase on data from RecordReader (%d out of %d)", count++, totalCount));
-      while (recordReader.hasNext()) {
-        reuse = recordReader.next(reuse);
-
-        // TODO: Add ComplexTypeTransformer here. Currently it is not idempotent so cannot add it
-
-        if (reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY) != null) {
-          //noinspection unchecked
-          for (GenericRow row : (Collection<GenericRow>) reuse.getValue(GenericRow.MULTIPLE_RECORDS_KEY)) {
-            GenericRow transformedRow = _recordTransformer.transform(row);
-            if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-              writeRecord(transformedRow);
-            }
-          }
-        } else {
-          GenericRow transformedRow = _recordTransformer.transform(reuse);
-          if (transformedRow != null && IngestionUtils.shouldIngestRow(transformedRow)) {
-            writeRecord(transformedRow);
-          }
-        }
-
-        reuse.clear();
+    boolean inited = false;
+    for (RecordReaderFileConfig recordReaderFileConfig : _recordReaderFileConfigs) {
+      RecordReader recordReader = recordReaderFileConfig._recordReader;
+      if (recordReader == null) {
+        recordReader =
+            RecordReaderFactory.getRecordReader(recordReaderFileConfig._fileFormat, recordReaderFileConfig._dataFile,
+                recordReaderFileConfig._fieldsToRead, recordReaderFileConfig._recordReaderConfig);
+        inited = true;
+      }
+      mapAndTransformRow(recordReader, reuse, observer, count, totalCount);

Review Comment:
   or we can also do
   ```
   try(RecordReader recordReader = RecordReaderFactory.getRecordReader()) {
   ...
   }
   
   ```



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


[GitHub] [pinot] swaminathanmanish commented on pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "swaminathanmanish (via GitHub)" <gi...@apache.org>.
swaminathanmanish commented on PR #10874:
URL: https://github.com/apache/pinot/pull/10874#issuecomment-1589897248

   > Since we are modifying this, I'd suggest just cleaning up the old code and always open and close the file within the segment mapper. Keeping both constructors adds a lot of code management overhead
   
   Got rid of the _recordReaders field from mapper code, but kept top level constructor for SegmentProcessorFramework.
   cc @snleee 
   


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


[GitHub] [pinot] snleee commented on a diff in pull request #10874: Making segmentMapper do the init and cleanup of RecordReader

Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee commented on code in PR #10874:
URL: https://github.com/apache/pinot/pull/10874#discussion_r1228654274


##########
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:
   Let's add `@deprecated` annotation and add the comment that we prefer the other constructor over this.



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