You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "vvivekiyer (via GitHub)" <gi...@apache.org> on 2023/07/19 18:00:10 UTC

[GitHub] [pinot] vvivekiyer commented on a diff in pull request #11131: Fix bug in reload segment when one or more indexes are removed.

vvivekiyer commented on code in PR #11131:
URL: https://github.com/apache/pinot/pull/11131#discussion_r1268451707


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/inv/geospatial/BaseH3IndexCreator.java:
##########
@@ -157,9 +157,12 @@ void generateIndexFile()
         FileChannel bitmapOffsetFileChannel = new RandomAccessFile(_bitmapOffsetFile, "r").getChannel();
         FileChannel bitmapValueFileChannel = new RandomAccessFile(_bitmapValueFile, "r").getChannel()) {
       indexFileChannel.write(headerBuffer);
-      dictionaryFileChannel.transferTo(0, _dictionaryFile.length(), indexFileChannel);
-      bitmapOffsetFileChannel.transferTo(0, _bitmapOffsetFile.length(), indexFileChannel);
-      bitmapValueFileChannel.transferTo(0, _bitmapValueFile.length(), indexFileChannel);
+      org.apache.pinot.common.utils.FileUtils.transferBytes(dictionaryFileChannel, 0, _dictionaryFile.length(),

Review Comment:
   We have another FileUtils in `org.apache.commons.io.FileUtils`. Hence used the full path here. 
   Having different class names could be a separate effort.



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