satishkotha commented on a change in pull request #2379: URL: https://github.com/apache/hudi/pull/2379#discussion_r552133598
########## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieClusteringJob.java ########## @@ -109,6 +111,9 @@ public static void main(String[] args) { if (result == -1) { LOG.error(resultMsg + " failed"); } else { + if (cfg.runSchedule) { + System.out.println("The schedule instant time is " + cfg.clusteringInstantTime); Review comment: Can you change this to a LOG message? ########## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieClusteringJob.java ########## @@ -153,7 +161,12 @@ private int doSchedule(JavaSparkContext jsc) throws Exception { String schemaStr = getSchemaFromLatestInstant(); SparkRDDWriteClient client = UtilHelpers.createHoodieClient(jsc, cfg.basePath, schemaStr, cfg.parallelism, Option.empty(), props); - return client.scheduleClusteringAtInstant(cfg.clusteringInstantTime, Option.empty()) ? 0 : -1; + Option<String> instantTime = client.scheduleClustering(Option.empty()); + if (instantTime.isPresent()) { + cfg.clusteringInstantTime = instantTime.get(); Review comment: changing config at this stage seems a little awkward. Do you think its better to return Option<String> instantTime from this method? Or maybe just add the log line here with instantTime? ---------------------------------------------------------------- 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: us...@infra.apache.org