pradeepgv42 commented on a change in pull request #6120:
URL: https://github.com/apache/incubator-pinot/pull/6120#discussion_r524457761



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/index/converter/SegmentV1V2ToV3FormatConverter.java
##########
@@ -225,9 +227,26 @@ private void copyCreationMetadataIfExists(File currentDir, 
File v3Dir)
     }
   }
 
+  private void copyLuceneFSTIndexFiles(File segmentDirectory, File v3Dir) 
throws IOException {
+    File[] fstIndexFiles = segmentDirectory.listFiles(new FilenameFilter() {
+      @Override
+      public boolean accept(File dir, String name) {
+        return name.endsWith(LuceneFSTIndexCreator.FST_INDEX_FILE_EXTENSION);
+      }
+    });
+
+    for (File fstIndexFile : fstIndexFiles) {
+      File v3File = new File(v3Dir, fstIndexFile.getName());
+      LOGGER.info("Copying {} to {}", fstIndexFile.toPath(), v3File.toPath());
+      Files.copy(fstIndexFile.toPath(), v3File.toPath());
+    }
+  }
+
   private void copyLuceneTextIndexIfExists(File segmentDirectory, File v3Dir)
       throws IOException {
     // TODO: see if this can be done by reusing some existing methods
+

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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to