Jackie-Jiang commented on code in PR #14105:
URL: https://github.com/apache/pinot/pull/14105#discussion_r1803846655


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/VarByteChunkForwardIndexWriterV4.java:
##########
@@ -76,11 +76,13 @@
 public class VarByteChunkForwardIndexWriterV4 implements VarByteChunkWriter {
   public static final int VERSION = 4;
 
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(VarByteChunkForwardIndexWriterV4.class);
+  // Use the run-time concrete class to retrieve the logger
+  protected final Logger _logger = LoggerFactory.getLogger(this.getClass());

Review Comment:
   ```suggestion
     protected final Logger _logger = LoggerFactory.getLogger(getClass());
   ```



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/VarByteChunkForwardIndexWriterV4.java:
##########
@@ -105,11 +107,16 @@ public VarByteChunkForwardIndexWriterV4(File file, 
ChunkCompressionType compress
     writeHeader(_chunkCompressor.compressionType(), chunkSize);
   }
 
+  // Child class must override this class instance method
+  protected int getConcreteClassVersion() {

Review Comment:
   Can we change it back to
   ```suggestion
     public int getVersion() {
   ```



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/forward/VarByteChunkForwardIndexReaderV4.java:
##########
@@ -67,8 +67,7 @@ public class VarByteChunkForwardIndexReaderV4
 
   public VarByteChunkForwardIndexReaderV4(PinotDataBuffer dataBuffer, 
FieldSpec.DataType storedType,
       boolean isSingleValue) {
-    int version = dataBuffer.getInt(0);
-    Preconditions.checkState(version == 
VarByteChunkForwardIndexWriterV4.VERSION, "Illegal index version: %s", version);
+    validateIndexVersion(dataBuffer);

Review Comment:
   We can revert this part



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/VarByteChunkForwardIndexWriterV4.java:
##########
@@ -76,11 +76,13 @@
 public class VarByteChunkForwardIndexWriterV4 implements VarByteChunkWriter {
   public static final int VERSION = 4;
 
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(VarByteChunkForwardIndexWriterV4.class);
+  // Use the run-time concrete class to retrieve the logger
+  protected final Logger _logger = LoggerFactory.getLogger(this.getClass());
+
   private static final String DATA_BUFFER_SUFFIX = ".buf";
 
   private final File _dataBuffer;
-  private final RandomAccessFile _output;
+  protected final RandomAccessFile _output;

Review Comment:
   Change seems not needed



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

Reply via email to