zhongqishang commented on code in PR #3233:
URL: https://github.com/apache/amoro/pull/3233#discussion_r1793381361
##########
amoro-common/src/main/java/org/apache/amoro/Action.java:
##########
@@ -18,62 +18,43 @@
package org.apache.amoro;
-import org.apache.amoro.process.TableProcess;
-import org.apache.amoro.process.TableProcessState;
-import org.apache.amoro.shade.guava32.com.google.common.collect.Sets;
+public class Action {
-import java.util.Collections;
-import java.util.Set;
-
-public enum Action {
- MINOR_OPTIMIZING("minor-optimizing", 0),
- MAJOR_OPTIMIZING("major-optimizing", 1),
- EXTERNAL_OPTIMIZING("external-optimizing", 2),
- // refresh all metadata including snapshots, watermark, configurations,
schema, etc.
- REFRESH_METADATA("refresh-metadata", 10),
- // expire all metadata and data files necessarily.
- EXPIRE_DATA("expire-data", 11),
- DELETE_ORPHAN_FILES("delete-orphan-files", 12),
- SYNC_HIVE_COMMIT("sync-hive-commit", 13);
+ private final TableFormat[] formats;
+ private final int code;
+ private final int weight;
+ private final String desc;
/**
- * Arbitrary actions are actions that can be handled by a single optimizer.
The processes they
- * related to like refreshing, expiring, cleaning and syncing all share the
same basic
- * implementations which are {@link TableProcess} and {@link
TableProcessState} and they won't
- * have any spitted stages like optimizing processes(plan, execute, commit),
so they can be easily
- * triggered and managed. If you want to add a new action which is handled
stand-alone, you should
- * add it to this set, and you would find it's easy to implement the process
and state.
+ * Create a new action
+ *
+ * @param formats supported table formats of this action
+ * @param code storage code of this action, normally this code should be
identical within
+ * supported formats
+ * @param weight the weight number of this action, the bigger the weight
number, the higher
+ * positions of schedulers or front pages
+ * @param desc description of this action, will be shown in front pages
Review Comment:
We usually put comments before class and variables.
--
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]