This is an automated email from the ASF dual-hosted git repository. jackie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push: new 27b39845cf copy native text index during format conversion (#14172) 27b39845cf is described below commit 27b39845cf90877228c31829b95b0da41c9179c1 Author: Jagannath Timma <79477943+jt-kloudf...@users.noreply.github.com> AuthorDate: Tue Oct 8 14:47:20 2024 -0700 copy native text index during format conversion (#14172) --- .../index/converter/SegmentV1V2ToV3FormatConverter.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/converter/SegmentV1V2ToV3FormatConverter.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/converter/SegmentV1V2ToV3FormatConverter.java index 0e84a4b6ad..2c1b5d75a4 100644 --- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/converter/SegmentV1V2ToV3FormatConverter.java +++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/converter/SegmentV1V2ToV3FormatConverter.java @@ -168,6 +168,7 @@ public class SegmentV1V2ToV3FormatConverter implements SegmentFormatConverter { copyLuceneTextIndexIfExists(v2Directory, v3Directory); copyVectorIndexIfExists(v2Directory, v3Directory); copyStarTreeV2(v2Directory, v3Directory); + copyNativeTextIndexIfExists(v2Directory, v3Directory); } private List<IndexType<?, ?, ?>> sortedIndexTypes() { @@ -281,6 +282,15 @@ public class SegmentV1V2ToV3FormatConverter implements SegmentFormatConverter { } } + private void copyNativeTextIndexIfExists(File segmentDirectory, File v3Dir) throws IOException { + String suffix = V1Constants.Indexes.NATIVE_TEXT_INDEX_FILE_EXTENSION; + File[] textIndexFiles = segmentDirectory.listFiles((dir, name) -> name.endsWith(suffix)); + for (File textIndexFile : textIndexFiles) { + File v3TextIndexFile = new File(v3Dir, textIndexFile.getName()); + Files.copy(textIndexFile.toPath(), v3TextIndexFile.toPath()); + } + } + private void deleteStaleConversionDirectories(File segmentDirectory) { final String prefix = segmentDirectory.getName() + V3_TEMP_DIR_SUFFIX; File[] files = segmentDirectory.listFiles(new FilenameFilter() { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org