hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] hddong commented on a change in pull request #1242: [HUDI-544] Adjust the read and write path of archive
Date Thu, 06 Feb 2020 02:02:25 GMT
hddong commented on a change in pull request #1242: [HUDI-544] Adjust the read and write path
of archive
URL: https://github.com/apache/incubator-hudi/pull/1242#discussion_r375606750
 
 

 ##########
 File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/ArchivedCommitsCommand.java
 ##########
 @@ -138,9 +139,11 @@ public String showCommits(
       throws IOException {
 
     System.out.println("===============> Showing only " + limit + " archived commits <===============");
-    String basePath = HoodieCLI.getTableMetaClient().getBasePath();
+    HoodieTableMetaClient metaClient = HoodieCLI.getTableMetaClient();
+    String basePath = metaClient.getBasePath();
+    Path archivePath = new Path(metaClient.getArchivePath() + "/.commits_.archive*");
     FileStatus[] fsStatuses =
-        FSUtils.getFs(basePath, HoodieCLI.conf).globStatus(new Path(basePath + "/.hoodie/.commits_.archive*"));
+        FSUtils.getFs(basePath, HoodieCLI.conf).globStatus(archivePath);
 
 Review comment:
   @hmatu @n3nash  It return `/table/.hoodie/.commits_archive*` if old tables use `DEFAULT`
`''` and return `/table/.hoodie/archived/.commits_.archive*` if old tables use path `archived`
to archive. So it will return the correct path with archive path stored in .hoodie.
   On the other hand´╝î`archiveFolderPattern` `allow for users to be able to provide a full
path of the files under the archive folder and read it`.
   

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


With regards,
Apache Git Services

Mime
View raw message