diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java index 4e373e7..f36b49d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java @@ -55,7 +55,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param desc the HTableDescriptor for the table * @param regions the initial regions created for the table - * @throws IOException + * @throws IOException if an IO error occurs */ void preCreateTable(final ObserverContext ctx, HTableDescriptor desc, HRegionInfo[] regions) throws IOException; @@ -66,7 +66,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param desc the HTableDescriptor for the table * @param regions the initial regions created for the table - * @throws IOException + * @throws IOException if an IO error occurs */ void postCreateTable(final ObserverContext ctx, HTableDescriptor desc, HRegionInfo[] regions) throws IOException; @@ -78,7 +78,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param desc the HTableDescriptor for the table * @param regions the initial regions created for the table - * @throws IOException + * @throws IOException if an IO error occurs */ void preCreateTableHandler(final ObserverContext ctx, HTableDescriptor desc, HRegionInfo[] regions) throws IOException; @@ -90,7 +90,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param desc the HTableDescriptor for the table * @param regions the initial regions created for the table - * @throws IOException + * @throws IOException if an IO error occurs */ void postCreateTableHandler(final ObserverContext ctx, HTableDescriptor desc, HRegionInfo[] regions) throws IOException; @@ -101,6 +101,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preDeleteTable(final ObserverContext ctx, TableName tableName) throws IOException; @@ -110,6 +111,7 @@ public interface MasterObserver extends Coprocessor { * of delete table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postDeleteTable(final ObserverContext ctx, TableName tableName) throws IOException; @@ -121,6 +123,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preDeleteTableHandler( final ObserverContext ctx, TableName tableName) @@ -133,6 +136,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postDeleteTableHandler( final ObserverContext ctx, TableName tableName) @@ -145,6 +149,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preTruncateTable(final ObserverContext ctx, TableName tableName) throws IOException; @@ -156,6 +161,7 @@ public interface MasterObserver extends Coprocessor { * truncate operation is terminated. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postTruncateTable(final ObserverContext ctx, TableName tableName) throws IOException; @@ -167,6 +173,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preTruncateTableHandler( final ObserverContext ctx, TableName tableName) @@ -179,6 +186,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postTruncateTableHandler( final ObserverContext ctx, TableName tableName) @@ -191,6 +199,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param htd the HTableDescriptor + * @throws IOException if an IO error occurs */ void preModifyTable(final ObserverContext ctx, final TableName tableName, HTableDescriptor htd) throws IOException; @@ -201,6 +210,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param htd the HTableDescriptor + * @throws IOException if an IO error occurs */ void postModifyTable(final ObserverContext ctx, final TableName tableName, HTableDescriptor htd) throws IOException; @@ -212,6 +222,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param htd the HTableDescriptor + * @throws IOException if an IO error occurs */ void preModifyTableHandler( final ObserverContext ctx, @@ -224,6 +235,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param htd the HTableDescriptor + * @throws IOException if an IO error occurs */ void postModifyTableHandler( final ObserverContext ctx, @@ -235,6 +247,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param column the HColumnDescriptor + * @throws IOException if an IO error occurs */ void preAddColumn(final ObserverContext ctx, TableName tableName, HColumnDescriptor column) throws IOException; @@ -245,6 +258,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param column the HColumnDescriptor + * @throws IOException if an IO error occurs */ void postAddColumn(final ObserverContext ctx, TableName tableName, HColumnDescriptor column) throws IOException; @@ -255,6 +269,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param column the HColumnDescriptor + * @throws IOException if an IO error occurs */ void preAddColumnHandler( final ObserverContext ctx, @@ -266,6 +281,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param column the HColumnDescriptor + * @throws IOException if an IO error occurs */ void postAddColumnHandler( final ObserverContext ctx, @@ -277,6 +293,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param descriptor the HColumnDescriptor + * @throws IOException if an IO error occurs */ void preModifyColumn(final ObserverContext ctx, TableName tableName, HColumnDescriptor descriptor) throws IOException; @@ -287,6 +304,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param descriptor the HColumnDescriptor + * @throws IOException if an IO error occurs */ void postModifyColumn(final ObserverContext ctx, TableName tableName, HColumnDescriptor descriptor) throws IOException; @@ -297,6 +315,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param descriptor the HColumnDescriptor + * @throws IOException if an IO error occurs */ void preModifyColumnHandler( final ObserverContext ctx, @@ -308,6 +327,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param descriptor the HColumnDescriptor + * @throws IOException if an IO error occurs */ void postModifyColumnHandler( final ObserverContext ctx, @@ -320,6 +340,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param c the column + * @throws IOException if an IO error occurs */ void preDeleteColumn(final ObserverContext ctx, final TableName tableName, final byte[] c) throws IOException; @@ -330,6 +351,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param c the column + * @throws IOException if an IO error occurs */ void postDeleteColumn(final ObserverContext ctx, final TableName tableName, final byte[] c) throws IOException; @@ -340,6 +362,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param c the column + * @throws IOException if an IO error occurs */ void preDeleteColumnHandler( final ObserverContext ctx, @@ -351,6 +374,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param c the column + * @throws IOException if an IO error occurs */ void postDeleteColumnHandler( final ObserverContext ctx, @@ -361,6 +385,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preEnableTable(final ObserverContext ctx, final TableName tableName) throws IOException; @@ -370,6 +395,7 @@ public interface MasterObserver extends Coprocessor { * of enable table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postEnableTable(final ObserverContext ctx, final TableName tableName) throws IOException; @@ -380,6 +406,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preEnableTableHandler( final ObserverContext ctx, @@ -390,6 +417,7 @@ public interface MasterObserver extends Coprocessor { * of enable table handler and it is async to the enable table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postEnableTableHandler( final ObserverContext ctx, @@ -401,6 +429,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preDisableTable(final ObserverContext ctx, final TableName tableName) throws IOException; @@ -410,6 +439,7 @@ public interface MasterObserver extends Coprocessor { * of disable table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postDisableTable(final ObserverContext ctx, final TableName tableName) throws IOException; @@ -420,6 +450,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void preDisableTableHandler( final ObserverContext ctx, @@ -430,6 +461,7 @@ public interface MasterObserver extends Coprocessor { * of disable table handler and it is asyn to the disable table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table + * @throws IOException if an IO error occurs */ void postDisableTableHandler( final ObserverContext ctx, @@ -441,6 +473,7 @@ public interface MasterObserver extends Coprocessor { * @param region the HRegionInfo * @param srcServer the source ServerName * @param destServer the destination ServerName + * @throws IOException if an IO error occurs */ void preMove(final ObserverContext ctx, final HRegionInfo region, final ServerName srcServer, @@ -453,6 +486,7 @@ public interface MasterObserver extends Coprocessor { * @param region the HRegionInfo * @param srcServer the source ServerName * @param destServer the destination ServerName + * @throws IOException if an IO error occurs */ void postMove(final ObserverContext ctx, final HRegionInfo region, final ServerName srcServer, @@ -462,7 +496,7 @@ public interface MasterObserver extends Coprocessor { /** * Called before a abortProcedure request has been processed. * @param ctx the environment to interact with the framework and master - * @throws IOException + * @throws IOException if an IO error occurs */ public void preAbortProcedure( ObserverContext ctx, @@ -472,6 +506,7 @@ public interface MasterObserver extends Coprocessor { /** * Called after a abortProcedure request has been processed. * @param ctx the environment to interact with the framework and master + * @throws IOException if an IO error occurs */ public void postAbortProcedure(ObserverContext ctx) throws IOException; @@ -479,7 +514,7 @@ public interface MasterObserver extends Coprocessor { /** * Called before a listProcedures request has been processed. * @param ctx the environment to interact with the framework and master - * @throws IOException + * @throws IOException if an IO error occurs */ void preListProcedures(ObserverContext ctx) throws IOException; @@ -488,6 +523,7 @@ public interface MasterObserver extends Coprocessor { * Called after a listProcedures request has been processed. * @param ctx the environment to interact with the framework and master * @param procInfoList the list of procedures about to be returned + * @throws IOException if an IO error occurs */ void postListProcedures( ObserverContext ctx, @@ -497,6 +533,7 @@ public interface MasterObserver extends Coprocessor { * Called prior to assigning a specific region. * @param ctx the environment to interact with the framework and master * @param regionInfo the regionInfo of the region + * @throws IOException if an IO error occurs */ void preAssign(final ObserverContext ctx, final HRegionInfo regionInfo) throws IOException; @@ -505,6 +542,7 @@ public interface MasterObserver extends Coprocessor { * Called after the region assignment has been requested. * @param ctx the environment to interact with the framework and master * @param regionInfo the regionInfo of the region + * @throws IOException if an IO error occurs */ void postAssign(final ObserverContext ctx, final HRegionInfo regionInfo) throws IOException; @@ -514,6 +552,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param regionInfo * @param force whether to force unassignment or not + * @throws IOException if an IO error occurs */ void preUnassign(final ObserverContext ctx, final HRegionInfo regionInfo, final boolean force) throws IOException; @@ -523,6 +562,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param regionInfo * @param force whether to force unassignment or not + * @throws IOException if an IO error occurs */ void postUnassign(final ObserverContext ctx, final HRegionInfo regionInfo, final boolean force) throws IOException; @@ -532,6 +572,7 @@ public interface MasterObserver extends Coprocessor { * impact on this hook. * @param ctx the environment to interact with the framework and master * @param regionInfo + * @throws IOException if an IO error occurs */ void preRegionOffline(final ObserverContext ctx, final HRegionInfo regionInfo) throws IOException; @@ -540,6 +581,7 @@ public interface MasterObserver extends Coprocessor { * Called after the region has been marked offline. * @param ctx the environment to interact with the framework and master * @param regionInfo + * @throws IOException if an IO error occurs */ void postRegionOffline(final ObserverContext ctx, final HRegionInfo regionInfo) throws IOException; @@ -548,6 +590,7 @@ public interface MasterObserver extends Coprocessor { * Called prior to requesting rebalancing of the cluster regions, though after * the initial checks for regions in transition and the balance switch flag. * @param ctx the environment to interact with the framework and master + * @throws IOException if an IO error occurs */ void preBalance(final ObserverContext ctx) throws IOException; @@ -558,6 +601,7 @@ public interface MasterObserver extends Coprocessor { * @param plans the RegionPlans which master has executed. RegionPlan serves as hint * as for the final destination for the underlying region but may not represent the * final state of assignment + * @throws IOException if an IO error occurs */ void postBalance(final ObserverContext ctx, List plans) throws IOException; @@ -566,6 +610,7 @@ public interface MasterObserver extends Coprocessor { * Called prior to modifying the flag used to enable/disable region balancing. * @param ctx the coprocessor instance's environment * @param newValue the new flag value submitted in the call + * @throws IOException if an IO error occurs */ boolean preBalanceSwitch(final ObserverContext ctx, final boolean newValue) throws IOException; @@ -575,6 +620,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the coprocessor instance's environment * @param oldValue the previously set balanceSwitch value * @param newValue the newly set balanceSwitch value + * @throws IOException if an IO error occurs */ void postBalanceSwitch(final ObserverContext ctx, final boolean oldValue, final boolean newValue) throws IOException; @@ -582,6 +628,8 @@ public interface MasterObserver extends Coprocessor { /** * Called prior to shutting down the full HBase cluster, including this * {@link org.apache.hadoop.hbase.master.HMaster} process. + * @param ctx the coprocessor instance's environment + * @throws IOException if an IO error occurs */ void preShutdown(final ObserverContext ctx) throws IOException; @@ -590,6 +638,8 @@ public interface MasterObserver extends Coprocessor { /** * Called immediately prior to stopping this * {@link org.apache.hadoop.hbase.master.HMaster} process. + * @param ctx the coprocessor instance's environment + * @throws IOException if an IO error occurs */ void preStopMaster(final ObserverContext ctx) throws IOException; @@ -598,6 +648,8 @@ public interface MasterObserver extends Coprocessor { * Called immediately after an active master instance has completed * initialization. Will not be called on standby master instances unless * they take over the active role. + * @param ctx the coprocessor instance's environment + * @throws IOException if an IO error occurs */ void postStartMaster(final ObserverContext ctx) throws IOException; @@ -605,6 +657,8 @@ public interface MasterObserver extends Coprocessor { /** * Call before the master initialization is set to true. * {@link org.apache.hadoop.hbase.master.HMaster} process. + * @param ctx the coprocessor instance's environment + * @throws IOException if an IO error occurs */ void preMasterInitialization(final ObserverContext ctx) throws IOException; @@ -616,7 +670,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param hTableDescriptor the hTableDescriptor of the table to snapshot - * @throws IOException + * @throws IOException if an IO error occurs */ void preSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) @@ -628,7 +682,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param hTableDescriptor the hTableDescriptor of the table to snapshot - * @throws IOException + * @throws IOException if an IO error occurs */ void postSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) @@ -639,7 +693,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor of the snapshot to list - * @throws IOException + * @throws IOException if an IO error occurs */ void preListSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot) throws IOException; @@ -649,7 +703,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor of the snapshot to list - * @throws IOException + * @throws IOException if an IO error occurs */ void postListSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot) throws IOException; @@ -661,7 +715,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param hTableDescriptor the hTableDescriptor of the table to create - * @throws IOException + * @throws IOException if an IO error occurs */ void preCloneSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) @@ -673,7 +727,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param hTableDescriptor the hTableDescriptor of the table to create - * @throws IOException + * @throws IOException if an IO error occurs */ void postCloneSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) @@ -686,7 +740,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param hTableDescriptor the hTableDescriptor of the table to restore - * @throws IOException + * @throws IOException if an IO error occurs */ void preRestoreSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) @@ -698,7 +752,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor for the snapshot * @param hTableDescriptor the hTableDescriptor of the table to restore - * @throws IOException + * @throws IOException if an IO error occurs */ void postRestoreSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) @@ -710,7 +764,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor of the snapshot to delete - * @throws IOException + * @throws IOException if an IO error occurs */ void preDeleteSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot) throws IOException; @@ -720,7 +774,7 @@ public interface MasterObserver extends Coprocessor { * Called as part of deleteSnapshot RPC call. * @param ctx the environment to interact with the framework and master * @param snapshot the SnapshotDescriptor of the snapshot to delete - * @throws IOException + * @throws IOException if an IO error occurs */ void postDeleteSnapshot(final ObserverContext ctx, final SnapshotDescription snapshot) throws IOException; @@ -730,7 +784,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableNamesList the list of table names, or null if querying for all * @param descriptors an empty list, can be filled with what to return if bypassing - * @throws IOException + * @throws IOException if an IO error occurs * @deprecated Use preGetTableDescriptors with regex instead. */ @Deprecated @@ -741,7 +795,7 @@ public interface MasterObserver extends Coprocessor { * Called after a getTableDescriptors request has been processed. * @param ctx the environment to interact with the framework and master * @param descriptors the list of descriptors about to be returned - * @throws IOException + * @throws IOException if an IO error occurs * @deprecated Use postGetTableDescriptors with regex instead. */ @Deprecated @@ -754,7 +808,7 @@ public interface MasterObserver extends Coprocessor { * @param tableNamesList the list of table names, or null if querying for all * @param descriptors an empty list, can be filled with what to return if bypassing * @param regex regular expression used for filtering the table names - * @throws IOException + * @throws IOException if an IO error occurs */ void preGetTableDescriptors(ObserverContext ctx, List tableNamesList, List descriptors, @@ -766,7 +820,7 @@ public interface MasterObserver extends Coprocessor { * @param tableNamesList the list of table names, or null if querying for all * @param descriptors the list of descriptors about to be returned * @param regex regular expression used for filtering the table names - * @throws IOException + * @throws IOException if an IO error occurs */ void postGetTableDescriptors(ObserverContext ctx, List tableNamesList, List descriptors, @@ -777,7 +831,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param descriptors an empty list, can be filled with what to return if bypassing * @param regex regular expression used for filtering the table names - * @throws IOException + * @throws IOException if an IO error occurs */ void preGetTableNames(ObserverContext ctx, List descriptors, String regex) throws IOException; @@ -787,7 +841,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param descriptors the list of descriptors about to be returned * @param regex regular expression used for filtering the table names - * @throws IOException + * @throws IOException if an IO error occurs */ void postGetTableNames(ObserverContext ctx, List descriptors, String regex) throws IOException; @@ -798,7 +852,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param ns the NamespaceDescriptor for the table - * @throws IOException + * @throws IOException if an IO error occurs */ void preCreateNamespace(final ObserverContext ctx, NamespaceDescriptor ns) throws IOException; @@ -806,7 +860,7 @@ public interface MasterObserver extends Coprocessor { * Called after the createNamespace operation has been requested. * @param ctx the environment to interact with the framework and master * @param ns the NamespaceDescriptor for the table - * @throws IOException + * @throws IOException if an IO error occurs */ void postCreateNamespace(final ObserverContext ctx, NamespaceDescriptor ns) throws IOException; @@ -817,6 +871,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace + * @throws IOException if an IO error occurs */ void preDeleteNamespace(final ObserverContext ctx, String namespace) throws IOException; @@ -825,6 +880,7 @@ public interface MasterObserver extends Coprocessor { * Called after the deleteNamespace operation has been requested. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace + * @throws IOException if an IO error occurs */ void postDeleteNamespace(final ObserverContext ctx, String namespace) throws IOException; @@ -834,6 +890,7 @@ public interface MasterObserver extends Coprocessor { * It can't bypass the default action, e.g., ctx.bypass() won't have effect. * @param ctx the environment to interact with the framework and master * @param ns the NamespaceDescriptor + * @throws IOException if an IO error occurs */ void preModifyNamespace(final ObserverContext ctx, NamespaceDescriptor ns) throws IOException; @@ -842,6 +899,7 @@ public interface MasterObserver extends Coprocessor { * Called after the modifyNamespace operation has been requested. * @param ctx the environment to interact with the framework and master * @param ns the NamespaceDescriptor + * @throws IOException if an IO error occurs */ void postModifyNamespace(final ObserverContext ctx, NamespaceDescriptor ns) throws IOException; @@ -850,7 +908,7 @@ public interface MasterObserver extends Coprocessor { * Called before a getNamespaceDescriptor request has been processed. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace - * @throws IOException + * @throws IOException if an IO error occurs */ void preGetNamespaceDescriptor(ObserverContext ctx, String namespace) throws IOException; @@ -859,7 +917,7 @@ public interface MasterObserver extends Coprocessor { * Called after a getNamespaceDescriptor request has been processed. * @param ctx the environment to interact with the framework and master * @param ns the NamespaceDescriptor - * @throws IOException + * @throws IOException if an IO error occurs */ void postGetNamespaceDescriptor(ObserverContext ctx, NamespaceDescriptor ns) throws IOException; @@ -868,7 +926,7 @@ public interface MasterObserver extends Coprocessor { * Called before a listNamespaceDescriptors request has been processed. * @param ctx the environment to interact with the framework and master * @param descriptors an empty list, can be filled with what to return if bypassing - * @throws IOException + * @throws IOException if an IO error occurs */ void preListNamespaceDescriptors(ObserverContext ctx, List descriptors) throws IOException; @@ -877,7 +935,7 @@ public interface MasterObserver extends Coprocessor { * Called after a listNamespaceDescriptors request has been processed. * @param ctx the environment to interact with the framework and master * @param descriptors the list of descriptors about to be returned - * @throws IOException + * @throws IOException if an IO error occurs */ void postListNamespaceDescriptors(ObserverContext ctx, List descriptors) throws IOException; @@ -887,7 +945,7 @@ public interface MasterObserver extends Coprocessor { * Called before the table memstore is flushed to disk. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table - * @throws IOException + * @throws IOException if an IO error occurs */ void preTableFlush(final ObserverContext ctx, final TableName tableName) throws IOException; @@ -896,7 +954,7 @@ public interface MasterObserver extends Coprocessor { * Called after the table memstore is flushed to disk. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table - * @throws IOException + * @throws IOException if an IO error occurs */ void postTableFlush(final ObserverContext ctx, final TableName tableName) throws IOException; @@ -906,7 +964,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param userName the name of user * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void preSetUserQuota(final ObserverContext ctx, final String userName, final Quotas quotas) throws IOException; @@ -916,7 +974,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param userName the name of user * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void postSetUserQuota(final ObserverContext ctx, final String userName, final Quotas quotas) throws IOException; @@ -927,7 +985,7 @@ public interface MasterObserver extends Coprocessor { * @param userName the name of user * @param tableName the name of the table * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void preSetUserQuota(final ObserverContext ctx, final String userName, final TableName tableName, final Quotas quotas) throws IOException; @@ -938,7 +996,7 @@ public interface MasterObserver extends Coprocessor { * @param userName the name of user * @param tableName the name of the table * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void postSetUserQuota(final ObserverContext ctx, final String userName, final TableName tableName, final Quotas quotas) throws IOException; @@ -949,7 +1007,7 @@ public interface MasterObserver extends Coprocessor { * @param userName the name of user * @param namespace the name of the namespace * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void preSetUserQuota(final ObserverContext ctx, final String userName, final String namespace, final Quotas quotas) throws IOException; @@ -960,7 +1018,7 @@ public interface MasterObserver extends Coprocessor { * @param userName the name of user * @param namespace the name of the namespace * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void postSetUserQuota(final ObserverContext ctx, final String userName, final String namespace, final Quotas quotas) throws IOException; @@ -970,7 +1028,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void preSetTableQuota(final ObserverContext ctx, final TableName tableName, final Quotas quotas) throws IOException; @@ -980,7 +1038,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void postSetTableQuota(final ObserverContext ctx, final TableName tableName, final Quotas quotas) throws IOException; @@ -990,7 +1048,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void preSetNamespaceQuota(final ObserverContext ctx, final String namespace, final Quotas quotas) throws IOException; @@ -1000,7 +1058,7 @@ public interface MasterObserver extends Coprocessor { * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace * @param quotas the quota settings - * @throws IOException + * @throws IOException if an IO error occurs */ void postSetNamespaceQuota(final ObserverContext ctx, final String namespace, final Quotas quotas) throws IOException; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/MasterProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/MasterProcedureManager.java index e5257e5..2728e7b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/MasterProcedureManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/MasterProcedureManager.java @@ -60,9 +60,10 @@ public abstract class MasterProcedureManager extends ProcedureManager implements * Initialize a globally barriered procedure for master. * * @param master Master service interface - * @throws KeeperException - * @throws IOException - * @throws UnsupportedOperationException + * @param metricsMaster Master metrics + * @throws KeeperException if an unexpected zk error occurs + * @throws IOException if an unexpected IO error occurs + * @throws UnsupportedOperationException if the operation is not supported */ public abstract void initialize(MasterServices master, MetricsMaster metricsMaster) throws KeeperException, IOException, UnsupportedOperationException; @@ -71,7 +72,7 @@ public abstract class MasterProcedureManager extends ProcedureManager implements * Execute a distributed procedure on cluster * * @param desc Procedure description - * @throws IOException + * @throws IOException if an unexpected IO error occurs */ public void execProcedure(ProcedureDescription desc) throws IOException { @@ -82,7 +83,7 @@ public abstract class MasterProcedureManager extends ProcedureManager implements * * @param desc Procedure description * @return data returned from the procedure execution, null if no data - * @throws IOException + * @throws IOException if an unexpected IO error occurs */ public byte[] execProcedureWithRet(ProcedureDescription desc) throws IOException { @@ -94,7 +95,7 @@ public abstract class MasterProcedureManager extends ProcedureManager implements * * @param desc Procedure description * @return true if the specified procedure is finished successfully - * @throws IOException + * @throws IOException if an unexpected IO error occurs */ public abstract boolean isProcedureDone(ProcedureDescription desc) throws IOException; } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java index 198bcdd..6ee8a16 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java @@ -239,7 +239,7 @@ public class Procedure implements Callable, ForeignExceptionListener { /** * Sends a message to Members to create a new {@link Subprocedure} for this Procedure and execute * the {@link Subprocedure#acquireBarrier} step. - * @throws ForeignException + * @throws ForeignException if the procedure was already marked as failed */ public void sendGlobalBarrierStart() throws ForeignException { // start the procedure @@ -260,7 +260,7 @@ public class Procedure implements Callable, ForeignExceptionListener { * should only be executed after all members have completed its * {@link Subprocedure#acquireBarrier()} call successfully. This triggers the member * {@link Subprocedure#insideBarrier} method. - * @throws ForeignException + * @throws ForeignException if we can't reach the remote notification mechanism */ public void sendGlobalBarrierReached() throws ForeignException { try { @@ -291,7 +291,7 @@ public class Procedure implements Callable, ForeignExceptionListener { /** * Call back triggered by an individual member upon successful local barrier acquisition - * @param member + * @param member name of the member that acquired */ public void barrierAcquiredByMember(String member) { LOG.debug("member: '" + member + "' joining acquired barrier for procedure '" + procName @@ -313,8 +313,8 @@ public class Procedure implements Callable, ForeignExceptionListener { /** * Call back triggered by a individual member upon successful local in-barrier execution and * release - * @param member - * @param dataFromMember + * @param member name of the member that executed and released its barrier + * @param dataFromMember the data that the member returned along with the notification */ public void barrierReleasedByMember(String member, byte[] dataFromMember) { boolean removed = false; @@ -339,8 +339,8 @@ public class Procedure implements Callable, ForeignExceptionListener { * Waits until the entire procedure has globally completed, or has been aborted. If an * exception is thrown the procedure may or not have run cleanup to trigger the completion latch * yet. - * @throws ForeignException - * @throws InterruptedException + * @throws ForeignException type of error the monitor can throw, if the task fails + * @throws InterruptedException if we are interrupted while waiting on latch */ public void waitForCompleted() throws ForeignException, InterruptedException { waitForLatch(completedLatch, monitor, wakeFrequency, procName + " completed"); @@ -351,8 +351,8 @@ public class Procedure implements Callable, ForeignExceptionListener { * exception is thrown the procedure may or not have run cleanup to trigger the completion latch * yet. * @return data returned from procedure members upon successfully completing subprocedure. - * @throws ForeignException - * @throws InterruptedException + * @throws ForeignException type of error the monitor can throw, if the task fails + * @throws InterruptedException if we are interrupted while waiting */ public HashMap waitForCompletedWithRet() throws ForeignException, InterruptedException { waitForCompleted(); @@ -361,7 +361,8 @@ public class Procedure implements Callable, ForeignExceptionListener { /** * Check if the entire procedure has globally completed, or has been aborted. - * @throws ForeignException + * @return true if the entire procedure complete + * @throws ForeignException exceptions to re-throw if any */ public boolean isCompleted() throws ForeignException { // Rethrow exception if any diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java index d55fc85..4066187 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinator.java @@ -67,7 +67,7 @@ public class ProcedureCoordinator { * The rpc object registers the ProcedureCoordinator and starts any threads in this * constructor. * - * @param rpcs + * @param rpcs RPCs to the coordinate * @param pool Used for executing procedures. */ public ProcedureCoordinator(ProcedureCoordinatorRpcs rpcs, ThreadPoolExecutor pool) { @@ -80,9 +80,10 @@ public class ProcedureCoordinator { * The rpc object registers the ProcedureCoordinator and starts any threads in * this constructor. * - * @param rpcs + * @param rpcs RPCs to the coordinate * @param pool Used for executing procedures. - * @param timeoutMillis + * @param timeoutMillis timeout in milliseconds + * @param wakeTimeMillis wake time in milliseconds */ public ProcedureCoordinator(ProcedureCoordinatorRpcs rpcs, ThreadPoolExecutor pool, long timeoutMillis, long wakeTimeMillis) { @@ -96,8 +97,9 @@ public class ProcedureCoordinator { /** * Default thread pool for the procedure * - * @param coordName + * @param coordName name of the procedure coordinator * @param opThreads the maximum number of threads to allow in the pool + * @return the default thread pool */ public static ThreadPoolExecutor defaultPool(String coordName, int opThreads) { return defaultPool(coordName, opThreads, KEEP_ALIVE_MILLIS_DEFAULT); @@ -106,9 +108,10 @@ public class ProcedureCoordinator { /** * Default thread pool for the procedure * - * @param coordName + * @param coordName name of the procedure coordinator * @param opThreads the maximum number of threads to allow in the pool * @param keepAliveMillis the maximum time (ms) that excess idle threads will wait for new tasks + * @return the default thread pool */ public static ThreadPoolExecutor defaultPool(String coordName, int opThreads, long keepAliveMillis) { @@ -119,7 +122,7 @@ public class ProcedureCoordinator { /** * Shutdown the thread pools and release rpc resources - * @throws IOException + * @throws IOException if an IO error occurs */ public void close() throws IOException { // have to use shutdown now to break any latch waiting @@ -240,6 +243,7 @@ public class ProcedureCoordinator { /** * Kick off the named procedure * Currently only one procedure with the same type and name is allowed to run at a time. + * @param fed state holding entity for foreign error handling * @param procName name of the procedure to start * @param procArgs arguments for the procedure * @param expectedMembers expected members to start diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinatorRpcs.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinatorRpcs.java index 631c270..ffcb76f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinatorRpcs.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureCoordinatorRpcs.java @@ -34,7 +34,7 @@ public interface ProcedureCoordinatorRpcs extends Closeable { /** * Initialize and start threads necessary to connect an implementation's rpc mechanisms. - * @param listener + * @param listener the coordinator for procedure * @return true if succeed, false if encountered initialization errors. */ boolean start(final ProcedureCoordinator listener); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManager.java index 128d965..c4aa392 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManager.java @@ -28,6 +28,7 @@ public abstract class ProcedureManager { * Return the unique signature of the procedure. This signature uniquely * identifies the procedure. By default, this signature is the string used in * the procedure controller (i.e., the root ZK node name for the procedure) + * @return unique signature of the procedure */ public abstract String getProcedureSignature(); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManagerHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManagerHost.java index e06c9ef..4f390e0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManagerHost.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureManagerHost.java @@ -51,6 +51,8 @@ public abstract class ProcedureManagerHost { /** * Load system procedures. Read the class names from configuration. * Called by constructor. + * @param conf the given Configuration instance + * @param confKey configuration key to get class names */ protected void loadUserProcedures(Configuration conf, String confKey) { Class implClass = null; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMember.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMember.java index 1f22022..224fe79 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMember.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMember.java @@ -69,8 +69,9 @@ public class ProcedureMember implements Closeable { /** * Default thread pool for the procedure * - * @param memberName + * @param memberName name of the member * @param procThreads the maximum number of threads to allow in the pool + * @return the thread pool for procedure */ public static ThreadPoolExecutor defaultPool(String memberName, int procThreads) { return defaultPool(memberName, procThreads, KEEP_ALIVE_MILLIS_DEFAULT); @@ -79,9 +80,10 @@ public class ProcedureMember implements Closeable { /** * Default thread pool for the procedure * - * @param memberName + * @param memberName name of the member * @param procThreads the maximum number of threads to allow in the pool * @param keepAliveMillis the maximum time (ms) that excess idle threads will wait for new tasks + * @return the thread pool for procedure */ public static ThreadPoolExecutor defaultPool(String memberName, int procThreads, long keepAliveMillis) { @@ -104,8 +106,8 @@ public class ProcedureMember implements Closeable { * This is separated from execution so that we can detect and handle the case where the * subprocedure is invalid and inactionable due to bad info (like DISABLED snapshot type being * sent here) - * @param opName - * @param data + * @param opName name of the procedure + * @param data arguments about the procedure * @return subprocedure */ public Subprocedure createSubprocedure(String opName, byte[] data) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMemberRpcs.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMemberRpcs.java index 96c22b0..83abd7f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMemberRpcs.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ProcedureMemberRpcs.java @@ -32,6 +32,8 @@ public interface ProcedureMemberRpcs extends Closeable { /** * Initialize and start any threads or connections the member needs. + * @param memberName name of the member + * @param member the ProcedureMember instance */ void start(final String memberName, final ProcedureMember member); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/RegionServerProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/RegionServerProcedureManager.java index 95c3ffe..ad110ed 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/RegionServerProcedureManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/RegionServerProcedureManager.java @@ -35,7 +35,7 @@ public abstract class RegionServerProcedureManager extends ProcedureManager { * Initialize a globally barriered procedure for region servers. * * @param rss Region Server service interface - * @throws KeeperException + * @throws KeeperException if an unexpected zk error occurs */ public abstract void initialize(RegionServerServices rss) throws KeeperException; @@ -48,7 +48,7 @@ public abstract class RegionServerProcedureManager extends ProcedureManager { * Close this and all running procedure tasks * * @param force forcefully stop all running tasks - * @throws IOException + * @throws IOException if an unexpected IO error occurs */ public abstract void stop(boolean force) throws IOException; } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java index 8927338..d28c443 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java @@ -240,7 +240,7 @@ abstract public class Subprocedure implements Callable { * Users should override this method. If a quiescent is not required, this is overkill but * can still be used to execute a procedure on all members and to propagate any exceptions. * - * @throws ForeignException + * @throws ForeignException if error occurs */ abstract public void acquireBarrier() throws ForeignException; @@ -253,7 +253,7 @@ abstract public class Subprocedure implements Callable { * to the coordinator upon successful completion. * Users should override this method. * @return the data the subprocedure wants to return to coordinator side. - * @throws ForeignException + * @throws ForeignException if error occurs */ abstract public byte[] insideBarrier() throws ForeignException; @@ -261,13 +261,14 @@ abstract public class Subprocedure implements Callable { * Users should override this method. This implementation of this method should rollback and * cleanup any temporary or partially completed state that the {@link #acquireBarrier()} may have * created. - * @param e + * @param e the error occurred during the process */ abstract public void cleanup(Exception e); /** * Method to cancel the Subprocedure by injecting an exception from and external source. - * @param cause + * @param msg error message to log + * @param cause cause of the error */ public void cancel(String msg, Throwable cause) { LOG.error(msg, cause); @@ -307,8 +308,8 @@ abstract public class Subprocedure implements Callable { /** * Waits until the entire procedure has globally completed, or has been aborted. - * @throws ForeignException - * @throws InterruptedException + * @throws ForeignException type of error the monitor can throw, if the task fails + * @throws InterruptedException if we are interrupted while waiting on latch */ public void waitForLocallyCompleted() throws ForeignException, InterruptedException { Procedure.waitForLatch(releasedLocalBarrier, monitor, wakeFrequency, diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureUtil.java index 8171218..485ca4c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureUtil.java @@ -226,6 +226,8 @@ public abstract class ZKProcedureUtil /** * Is this in the procedure barrier abort znode path + * @param path znode path to check + * @return true if the given path is an abort path */ public boolean isAbortPathNode(String path) { return path.startsWith(this.abortZnode) && !path.equals(abortZnode); @@ -253,6 +255,8 @@ public abstract class ZKProcedureUtil /** * Helper method to print the current state of the ZK tree. + * @param root name of the root directory in zk to print + * @param prefix prefix added to the message before log * @see #logZKTree(String) * @throws KeeperException if an unexpected exception occurs */ diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java index a441a6b..3d34603 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java @@ -107,7 +107,7 @@ public class RegionServerFlushTableProcedureManager extends RegionServerProcedur /** * Close this and all running tasks * @param force forcefully stop all running tasks - * @throws IOException + * @throws IOException if an IO error occurs */ @Override public void stop(boolean force) throws IOException { @@ -127,7 +127,7 @@ public class RegionServerFlushTableProcedureManager extends RegionServerProcedur * Because this gets the local list of regions to flush and not the set the master had, * there is a possibility of a race where regions may be missed. * - * @param table + * @param table name of the table to flush * @return Subprocedure to submit to the ProcedureMemeber. */ public Subprocedure buildSubprocedure(String table) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ScanLabelGenerator.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ScanLabelGenerator.java index e2425a6..59faf2f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ScanLabelGenerator.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ScanLabelGenerator.java @@ -35,8 +35,8 @@ public interface ScanLabelGenerator extends Configurable { /** * Helps to get a list of lables associated with an UGI - * @param user - * @param authorizations + * @param user User who called the RPC method + * @param authorizations Authorizations for the request * @return The labels */ public List getLabels(User user, Authorizations authorizations); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityLabelService.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityLabelService.java index 1ef1253..51d9ad2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityLabelService.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityLabelService.java @@ -42,6 +42,7 @@ public interface VisibilityLabelService extends Configurable { * any initialization logic. * @param e * the region coprocessor env + * @throws IOException if an IO error occurs */ void init(RegionCoprocessorEnvironment e) throws IOException; @@ -50,6 +51,7 @@ public interface VisibilityLabelService extends Configurable { * @param labels * Labels to add to the system. * @return OperationStatus for each of the label addition + * @throws IOException if an IO error occurs */ OperationStatus[] addLabels(List labels) throws IOException; @@ -60,6 +62,7 @@ public interface VisibilityLabelService extends Configurable { * @param authLabels * Labels which are getting authorized for the user * @return OperationStatus for each of the label auth addition + * @throws IOException if an IO error occurs */ OperationStatus[] setAuths(byte[] user, List authLabels) throws IOException; @@ -70,6 +73,7 @@ public interface VisibilityLabelService extends Configurable { * @param authLabels * Labels which are getting removed from authorization set * @return OperationStatus for each of the label auth removal + * @throws IOException if an IO error occurs */ OperationStatus[] clearAuths(byte[] user, List authLabels) throws IOException; @@ -80,6 +84,7 @@ public interface VisibilityLabelService extends Configurable { * @param systemCall * Whether a system or user originated call. * @return Visibility labels authorized for the given user. + * @throws IOException if an IO error occurs * @deprecated Use {@link #getUserAuths(byte[], boolean)} */ @Deprecated @@ -92,6 +97,7 @@ public interface VisibilityLabelService extends Configurable { * @param systemCall * Whether a system or user originated call. * @return Visibility labels authorized for the given user. + * @throws IOException if an IO error occurs */ List getUserAuths(byte[] user, boolean systemCall) throws IOException; @@ -102,6 +108,7 @@ public interface VisibilityLabelService extends Configurable { * @param systemCall * Whether a system or user originated call. * @return Visibility labels authorized for the given group. + * @throws IOException if an IO error occurs */ List getGroupAuths(String[] groups, boolean systemCall) throws IOException; @@ -109,6 +116,7 @@ public interface VisibilityLabelService extends Configurable { * Retrieve the list of visibility labels defined in the system. * @param regex The regular expression to filter which labels are returned. * @return List of visibility labels + * @throws IOException if an IO error occurs */ List listLabels(String regex) throws IOException; @@ -125,6 +133,7 @@ public interface VisibilityLabelService extends Configurable { * global auth label. * @return The list of tags corresponds to the visibility expression. These tags will be stored * along with the Cells. + * @throws IOException if an IO error occurs */ List createVisibilityExpTags(String visExpression, boolean withSerializationFormat, boolean checkAuths) throws IOException; @@ -136,6 +145,7 @@ public interface VisibilityLabelService extends Configurable { * @param authorizations * Authorizations for the read request * @return The VisibilityExpEvaluator corresponding to the given set of authorization labels. + * @throws IOException if an IO error occurs */ VisibilityExpEvaluator getVisibilityExpEvaluator(Authorizations authorizations) throws IOException; @@ -147,6 +157,7 @@ public interface VisibilityLabelService extends Configurable { * @param user * User for whom system auth check to be done. * @return true if the given user is having system/super auth + * @throws IOException if an IO error occurs * @deprecated Use {@link #havingSystemAuth(User)} */ @Deprecated @@ -159,6 +170,7 @@ public interface VisibilityLabelService extends Configurable { * @param user * User for whom system auth check to be done. * @return true if the given user is having system/super auth + * @throws IOException if an IO error occurs */ boolean havingSystemAuth(User user) throws IOException; @@ -180,6 +192,7 @@ public interface VisibilityLabelService extends Configurable { * this format means the tags are written with unsorted label ordinals * @return true if matching tags are found * @see VisibilityConstants#SORTED_ORDINAL_SERIALIZATION_FORMAT + * @throws IOException if an IO error occurs */ boolean matchVisibility(List putVisTags, Byte putVisTagFormat, List deleteVisTags, Byte deleteVisTagFormat) throws IOException; @@ -199,7 +212,7 @@ public interface VisibilityLabelService extends Configurable { * @param serializationFormat * the serialization format associated with the tag * @return the modified visibility expression in the form of byte[] - * @throws IOException + * @throws IOException if an IO error occurs */ byte[] encodeVisibilityForReplication(final List visTags, final Byte serializationFormat) throws IOException;