1
0

[HUDI-1764] Add Hudi-CLI support for clustering (#2773)

* tmp base

* update

* update unit test

* update

* update

* update CLI parameters

* linting

* update doSchedule in HoodieClusteringJob

* update

* update diff according to comments
This commit is contained in:
Jintao Guan
2021-04-20 09:46:42 -07:00
committed by GitHub
parent d6d52c6063
commit 3253079507
3 changed files with 153 additions and 2 deletions

View File

@@ -164,7 +164,10 @@ public class HoodieClusteringJob {
String schemaStr = getSchemaFromLatestInstant();
SparkRDDWriteClient client =
UtilHelpers.createHoodieClient(jsc, cfg.basePath, schemaStr, cfg.parallelism, Option.empty(), props);
if (cfg.clusteringInstantTime != null) {
client.scheduleClusteringAtInstant(cfg.clusteringInstantTime, Option.empty());
return Option.of(cfg.clusteringInstantTime);
}
return client.scheduleClustering(Option.empty());
}
}