You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/06/29 06:18:33 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #5458: [HUDI-3984] Remove mandatory check of partiton path for cli command

yihua commented on code in PR #5458:
URL: https://github.com/apache/hudi/pull/5458#discussion_r909234735


##########
hudi-cli/src/test/java/org/apache/hudi/cli/commands/TestFileSystemViewCommand.java:
##########
@@ -59,24 +59,73 @@
 @Tag("functional")
 public class TestFileSystemViewCommand extends CLIFunctionalTestHarness {
 
+  private String unpartitionedTablePath;
+  private String partitionedTablePath;
   private String partitionPath;
-  private SyncableFileSystemView fsView;
+  private SyncableFileSystemView unpartitionedFsView;
+  private SyncableFileSystemView partitionedFsView;
 
   @BeforeEach
   public void init() throws IOException {
+    createUnpartitionedTable();
+    createPartitionedTable();
+  }
+
+  private void createUnpartitionedTable() throws IOException {
     HoodieCLI.conf = hadoopConf();
 
     // Create table and connect
-    String tableName = tableName();
-    String tablePath = tablePath(tableName);
+    String unpartitionedTableName = "unpartitioned_" + tableName();
+    unpartitionedTablePath = tablePath(unpartitionedTableName);

Review Comment:
   nit: use `non-partitioned` (`NonPartitioned`) instead of `unpartitioned`, in all appearances



##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/MetadataCommand.java:
##########
@@ -235,8 +235,13 @@ public String listFiles(
       return "[ERROR] Metadata Table not enabled/initialized\n\n";
     }
 
+    Path partitionPath = new Path(HoodieCLI.basePath);
+    if (partition.length() > 0) {

Review Comment:
   nit: use `StringUtils.isNullOrEmpty`



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org