bvaradar commented on a change in pull request #1869:
URL: https://github.com/apache/hudi/pull/1869#discussion_r467133890
##########
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:
@zhedoubushishi : Can you instead copy the code from the PR
https://github.com/apache/hudi/pull/1933. This is essentially the same thing I
fixed. I did not realize you have tried to address the issue here. IMO, PR 1933
is more cleaner
----------------------------------------------------------------
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]