umehrot2 commented on a change in pull request #1869:
URL: https://github.com/apache/hudi/pull/1869#discussion_r466248630



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/bootstrap/index/HFileBootstrapIndex.java
##########
@@ -240,13 +240,21 @@ private HoodieBootstrapIndexInfo 
fetchBootstrapIndexInfo() throws IOException {
     @Override
     public List<String> getIndexedPartitionPaths() {
       HFileScanner scanner = partitionIndexReader().getScanner(true, true);
-      return getAllKeys(scanner);
+      List<String> cellKeys = getAllKeys(scanner);
+      // cellKey is in this format:
+      // part=datestr=2452537//LATEST_TIMESTAMP/Put/vlen=2405/seqid=0
+      return cellKeys.stream().map(key -> key.split("//")[0].substring(5))
+          .distinct().collect(Collectors.toList());
     }
 
     @Override
     public List<String> getIndexedFileIds() {
       HFileScanner scanner = fileIdIndexReader().getScanner(true, true);
-      return getAllKeys(scanner);
+      List<String> cellKeys = getAllKeys(scanner);
+      // cellKey is in this format:
+      // 
part=datestr=2452537;fileid=baab9c50-c35e-49d1-b928-695aa7e37833//LATEST_TIMESTAMP/Put/vlen=2312/seqid=0
+      return cellKeys.stream().map(key -> 
key.split("//")[0].split(";")[1].split("=")[1])

Review comment:
       I have this question too, but IIUC this code path was probably not being 
used till now. @zhedoubushishi can confirm.




----------------------------------------------------------------
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:
[email protected]


Reply via email to