diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java index f34cf2e360c..555d8f2c41c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/executor/EventType.java @@ -37,47 +37,198 @@ public enum EventType { // Messages originating from RS (NOTE: there is NO direct communication from // RS to Master). These are a result of RS updates into ZK. // RS_ZK_REGION_CLOSING (1), // It is replaced by M_ZK_REGION_CLOSING(HBASE-4739) - RS_ZK_REGION_CLOSED (2, ExecutorType.MASTER_CLOSE_REGION), // RS has finished closing a region - RS_ZK_REGION_OPENING (3, null), // RS is in process of opening a region - RS_ZK_REGION_OPENED (4, ExecutorType.MASTER_OPEN_REGION), // RS has finished opening a region - RS_ZK_REGION_SPLITTING (5, null), // RS has started a region split - RS_ZK_REGION_SPLIT (6, ExecutorType.MASTER_SERVER_OPERATIONS), // RS split has completed. - RS_ZK_REGION_FAILED_OPEN (7, ExecutorType.MASTER_CLOSE_REGION), // RS failed to open a region - RS_ZK_REGION_MERGING (8, null), // RS has started merging regions - RS_ZK_REGION_MERGE (9, ExecutorType.MASTER_SERVER_OPERATIONS), // RS region merge has completed. + + /** + * RS_ZK_REGION_CLOSED
+ * + * RS has finished closing a region. + */ + RS_ZK_REGION_CLOSED (2, ExecutorType.MASTER_CLOSE_REGION), + /** + * RS_ZK_REGION_OPENING
+ * + * RS is in process of opening a region. + */ + RS_ZK_REGION_OPENING (3, null), + /** + * RS_ZK_REGION_OPENED
+ * + * RS has finished opening a region. + */ + RS_ZK_REGION_OPENED (4, ExecutorType.MASTER_OPEN_REGION), + /** + * RS_ZK_REGION_SPLITTING
+ * + * RS has started a region split. + */ + RS_ZK_REGION_SPLITTING (5, null), + /** + * RS_ZK_REGION_SPLIT
+ * + * RS split has completed. + */ + RS_ZK_REGION_SPLIT (6, ExecutorType.MASTER_SERVER_OPERATIONS), + /** + * RS_ZK_REGION_FAILED_OPEN
+ * + * RS failed to open a region. + */ + RS_ZK_REGION_FAILED_OPEN (7, ExecutorType.MASTER_CLOSE_REGION), + /** + * RS_ZK_REGION_MERGING
+ * + * RS has started merging regions. + */ + RS_ZK_REGION_MERGING (8, null), + /** + * RS_ZK_REGION_MERGE
+ * + * RS region merge has completed. + */ + RS_ZK_REGION_MERGE (9, ExecutorType.MASTER_SERVER_OPERATIONS), - // Messages originating from Master to RS - M_RS_OPEN_REGION (20, ExecutorType.RS_OPEN_REGION), // Master asking RS to open a region - M_RS_OPEN_ROOT (21, ExecutorType.RS_OPEN_ROOT), // Master asking RS to open root - M_RS_OPEN_META (22, ExecutorType.RS_OPEN_META), // Master asking RS to open meta - M_RS_CLOSE_REGION (23, ExecutorType.RS_CLOSE_REGION), // Master asking RS to close a region - M_RS_CLOSE_ROOT (24, ExecutorType.RS_CLOSE_ROOT), // Master asking RS to close root - M_RS_CLOSE_META (25, ExecutorType.RS_CLOSE_META), // Master asking RS to close meta + /** + * Messages originating from Master to RS.
+ * M_RS_OPEN_REGION
+ * Master asking RS to open a region. + */ + M_RS_OPEN_REGION (20, ExecutorType.RS_OPEN_REGION), + /** + * Messages originating from Master to RS.
+ * M_RS_OPEN_ROOT
+ * Master asking RS to open root. + */ + M_RS_OPEN_ROOT (21, ExecutorType.RS_OPEN_ROOT), + /** + * Messages originating from Master to RS.
+ * M_RS_OPEN_META
+ * Master asking RS to open meta. + */ + M_RS_OPEN_META (22, ExecutorType.RS_OPEN_META), + /** + * Messages originating from Master to RS.
+ * M_RS_CLOSE_REGION
+ * Master asking RS to close a region. + */ + M_RS_CLOSE_REGION (23, ExecutorType.RS_CLOSE_REGION), + /** + * Messages originating from Master to RS.
+ * M_RS_CLOSE_ROOT
+ * Master asking RS to close root. + */ + M_RS_CLOSE_ROOT (24, ExecutorType.RS_CLOSE_ROOT), + /** + * Messages originating from Master to RS.
+ * M_RS_CLOSE_META
+ * Master asking RS to close meta. + */ + M_RS_CLOSE_META (25, ExecutorType.RS_CLOSE_META), - // Messages originating from Client to Master - C_M_MERGE_REGION (30, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to merge regions - C_M_DELETE_TABLE (40, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to delete a table - C_M_DISABLE_TABLE (41, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to disable a table - C_M_ENABLE_TABLE (42, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to enable a table - C_M_MODIFY_TABLE (43, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to modify a table - C_M_ADD_FAMILY (44, null), // Client asking Master to add family to table - C_M_DELETE_FAMILY (45, null), // Client asking Master to delete family of table - C_M_MODIFY_FAMILY (46, null), // Client asking Master to modify family of table - C_M_CREATE_TABLE (47, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to create a table - C_M_SNAPSHOT_TABLE (48, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to snapshot an offline table - C_M_RESTORE_SNAPSHOT (49, ExecutorType.MASTER_TABLE_OPERATIONS), // Client asking Master to restore a snapshot + /** + * Messages originating from Client to Master.
+ * C_M_MERGE_REGION
+ * Client asking Master to merge regions. + */ + C_M_MERGE_REGION (30, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_DELETE_TABLE
+ * Client asking Master to delete a table. + */ + C_M_DELETE_TABLE (40, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_DISABLE_TABLE
+ * Client asking Master to disable a table. + */ + C_M_DISABLE_TABLE (41, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_ENABLE_TABLE
+ * Client asking Master to enable a table. + */ + C_M_ENABLE_TABLE (42, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_MODIFY_TABLE
+ * Client asking Master to modify a table. + */ + C_M_MODIFY_TABLE (43, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_ADD_FAMILY
+ * Client asking Master to add family to table. + */ + C_M_ADD_FAMILY (44, null), + /** + * Messages originating from Client to Master.
+ * C_M_DELETE_FAMILY
+ * Client asking Master to delete family of table. + */ + C_M_DELETE_FAMILY (45, null), + /** + * Messages originating from Client to Master.
+ * C_M_MODIFY_FAMILY
+ * Client asking Master to modify family of table. + */ + C_M_MODIFY_FAMILY (46, null), + /** + * Messages originating from Client to Master.
+ * C_M_CREATE_TABLE
+ * Client asking Master to create a table. + */ + C_M_CREATE_TABLE (47, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_SNAPSHOT_TABLE
+ * Client asking Master to snapshot an offline table. + */ + C_M_SNAPSHOT_TABLE (48, ExecutorType.MASTER_TABLE_OPERATIONS), + /** + * Messages originating from Client to Master.
+ * C_M_RESTORE_SNAPSHOT
+ * Client asking Master to restore a snapshot. + */ + C_M_RESTORE_SNAPSHOT (49, ExecutorType.MASTER_TABLE_OPERATIONS), // Updates from master to ZK. This is done by the master and there is // nothing to process by either Master or RS - M_ZK_REGION_OFFLINE (50, null), // Master adds this region as offline in ZK - M_ZK_REGION_CLOSING (51, null), // Master adds this region as closing in ZK + /** + * M_ZK_REGION_OFFLINE + * Master adds this region as offline in ZK + */ + M_ZK_REGION_OFFLINE (50, null), + /** + * M_ZK_REGION_CLOSING + * Master adds this region as closing in ZK + */ + M_ZK_REGION_CLOSING (51, null), + + /** + * Master controlled events to be executed on the master + * M_SERVER_SHUTDOWN + * Master is processing shutdown of a RS + */ + M_SERVER_SHUTDOWN (70, ExecutorType.MASTER_SERVER_OPERATIONS), + /** + * Master controlled events to be executed on the master.
+ * M_META_SERVER_SHUTDOWN
+ * Master is processing shutdown of RS hosting a meta region (-ROOT- or .META.). + */ + M_META_SERVER_SHUTDOWN (72, ExecutorType.MASTER_META_SERVER_OPERATIONS), + /** + * Master controlled events to be executed on the master.
+ * + * M_MASTER_RECOVERY
+ * Master is processing recovery of regions found in ZK RIT + */ + M_MASTER_RECOVERY (73, ExecutorType.MASTER_SERVER_OPERATIONS), - // Master controlled events to be executed on the master - M_SERVER_SHUTDOWN (70, ExecutorType.MASTER_SERVER_OPERATIONS), // Master is processing shutdown of a RS - M_META_SERVER_SHUTDOWN (72, ExecutorType.MASTER_META_SERVER_OPERATIONS), // Master is processing shutdown of RS hosting a meta region (-ROOT- or .META.). - M_MASTER_RECOVERY (73, ExecutorType.MASTER_SERVER_OPERATIONS), // Master is processing recovery of regions found in ZK RIT - - // RS controlled events to be executed on the RS + /** + * RS controlled events to be executed on the RS.
+ * + * RS_PARALLEL_SEEK + */ RS_PARALLEL_SEEK (80, ExecutorType.RS_PARALLEL_SEEK); private final int code;