stream2000 commented on code in PR #7304:
URL: https://github.com/apache/hudi/pull/7304#discussion_r1032567110
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieClusteringConfig.java:
##########
@@ -713,5 +713,48 @@ public static LayoutOptimizationStrategy fromValue(String
value) {
return enumValue;
}
+
+ public String getValue() {
+ return value;
+ }
+ }
+
+ public enum ClusteringOperator {
+
+ SCHEDULE("schedule"),
+
+ EXECUTE("execute"),
+
+ SCHEDULEANDEXECUTE("scheduleandexecute");
+
+ private static final Map<String, ClusteringOperator> VALUE_TO_ENUM_MAP =
+ TypeUtils.getValueToEnumMap(ClusteringOperator.class, e ->
e.value);
+
+ private final String value;
+
+ ClusteringOperator(String value) {
+ this.value = value;
+ }
+
+ @Nonnull
+ public static ClusteringOperator fromValue(String value) {
+ ClusteringOperator enumValue = VALUE_TO_ENUM_MAP.get(value);
+ if (enumValue == null) {
+ throw new HoodieException(String.format("Invalid value (%s)", value));
+ }
+ return enumValue;
+ }
+
+ public boolean isSchedule() {
Review Comment:
Maybe we can change [SCHEDULE, EXECUTE, SCHEDULEANDEXECUTE] to
[SCHDULE_ONLY, EXECUTE_ONLY, SCHEDULE_SCHEDULE_AND_EXECUTE]? So when can know
from the name that when SCHDULE_ONLY is set we won't execute the clustering.
EXECUTE_ONLY is the same.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]