hmatu 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_r374445307
 
 

 ##########
 File path: 
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ArchivedCommitsCommand.java
 ##########
 @@ -63,10 +63,7 @@ public String showArchivedCommits(
       throws IOException {
     System.out.println("===============> Showing only " + limit + " archived 
commits <===============");
     String basePath = HoodieCLI.getTableMetaClient().getBasePath();
-    Path archivePath = new Path(basePath + "/.hoodie/.commits_.archive*");
-    if (folder != null && !folder.isEmpty()) {
-      archivePath = new Path(basePath + "/.hoodie/" + folder);
-    }
+    Path archivePath = new 
Path(HoodieCLI.getTableMetaClient().getArchivePath() + "/.commits_.archive*");
 
 Review comment:
   ```
   public String getArchivePath() {
     String archiveFolder = tableConfig.getArchivelogFolder();
     if (archiveFolder.equals(HoodieTableConfig.DEFAULT_ARCHIVELOG_FOLDER)) {
       return getMetaPath();
     } else {
       return getMetaPath() + "/" + archiveFolder;
     }
   }
   ```

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to