abhioncbr commented on a change in pull request #673: Hudi-96: Command line 
options instead of positional arguments
URL: https://github.com/apache/incubator-hudi/pull/673#discussion_r287575347
 
 

 ##########
 File path: 
hoodie-cli/src/main/java/com/uber/hoodie/cli/commands/CompactionCommand.java
 ##########
 @@ -193,8 +199,18 @@ public String scheduleCompact(
       String sparkPropertiesPath = Utils.getDefaultPropertiesFile(
           
scala.collection.JavaConversions.propertiesAsScalaMap(System.getProperties()));
       SparkLauncher sparkLauncher = 
SparkUtil.initLauncher(sparkPropertiesPath);
-      sparkLauncher.addAppArgs(SparkCommand.COMPACT_SCHEDULE.toString(), 
HoodieCLI.tableMetadata.getBasePath(),
-          HoodieCLI.tableMetadata.getTableConfig().getTableName(), 
compactionInstantTime, sparkMemory);
+
+      HoodieCompactorJobConfig config = new HoodieCompactorJobConfig();
+      config.basePath = HoodieCLI.tableMetadata.getBasePath();
+      config.tableName = 
HoodieCLI.tableMetadata.getTableConfig().getTableName();
+      config.compactionInstantTime = compactionInstantTime;
+      //should be either from cli option or default value will be ""
+      config.schemaFile = "";
 
 Review comment:
   done.

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