Repository: hbase Updated Branches: refs/heads/branch-1.2 4b9f8f44f -> e15389fda
HBASE-15099 Move RegionStateListener class out of quotas package Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e15389fd Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e15389fd Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e15389fd Branch: refs/heads/branch-1.2 Commit: e15389fda1147e9d6dd93666893f2f06955328cb Parents: 4b9f8f4 Author: tedyu <yuzhih...@gmail.com> Authored: Wed Jan 13 15:22:02 2016 -0800 Committer: tedyu <yuzhih...@gmail.com> Committed: Wed Jan 13 15:22:02 2016 -0800 ---------------------------------------------------------------------- .../hadoop/hbase/RegionStateListener.java | 53 ++++++++++++++++++++ .../hadoop/hbase/master/AssignmentManager.java | 2 +- .../org/apache/hadoop/hbase/master/HMaster.java | 2 +- .../hadoop/hbase/quotas/MasterQuotaManager.java | 1 + .../hbase/quotas/RegionStateListener.java | 44 ---------------- 5 files changed, 56 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/e15389fd/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionStateListener.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionStateListener.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionStateListener.java new file mode 100644 index 0000000..22725ec --- /dev/null +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionStateListener.java @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase; + +import java.io.IOException; + +import org.apache.hadoop.hbase.classification.InterfaceAudience; + +/** + * The listener interface for receiving region state events. + */ +@InterfaceAudience.Private +public interface RegionStateListener { + + /** + * Process region split event. + * + * @param hri An instance of HRegionInfo + * @throws IOException + */ + void onRegionSplit(HRegionInfo hri) throws IOException; + + /** + * Process region split reverted event. + * + * @param hri An instance of HRegionInfo + * @throws IOException Signals that an I/O exception has occurred. + */ + void onRegionSplitReverted(HRegionInfo hri) throws IOException; + + /** + * Process region merge event. + * + * @param hri An instance of HRegionInfo + * @throws IOException + */ + void onRegionMerged(HRegionInfo hri) throws IOException; +} http://git-wip-us.apache.org/repos/asf/hbase/blob/e15389fd/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 83f9d72..7833985 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -57,6 +57,7 @@ import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.MetaTableAccessor; import org.apache.hadoop.hbase.NotServingRegionException; import org.apache.hadoop.hbase.RegionLocations; +import org.apache.hadoop.hbase.RegionStateListener; import org.apache.hadoop.hbase.RegionTransition; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; @@ -88,7 +89,6 @@ import org.apache.hadoop.hbase.master.handler.OpenedRegionHandler; import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode; import org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos; -import org.apache.hadoop.hbase.quotas.RegionStateListener; import org.apache.hadoop.hbase.regionserver.RegionAlreadyInTransitionException; import org.apache.hadoop.hbase.regionserver.RegionOpeningState; import org.apache.hadoop.hbase.regionserver.RegionServerAbortedException; http://git-wip-us.apache.org/repos/asf/hbase/blob/e15389fd/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 0303618..4b43185 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -64,6 +64,7 @@ import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.NamespaceNotFoundException; import org.apache.hadoop.hbase.PleaseHoldException; import org.apache.hadoop.hbase.ProcedureInfo; +import org.apache.hadoop.hbase.RegionStateListener; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerLoad; import org.apache.hadoop.hbase.ServerName; @@ -122,7 +123,6 @@ import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionServerInfo; import org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos; import org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode; import org.apache.hadoop.hbase.quotas.MasterQuotaManager; -import org.apache.hadoop.hbase.quotas.RegionStateListener; import org.apache.hadoop.hbase.regionserver.DefaultStoreEngine; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.regionserver.HStore; http://git-wip-us.apache.org/repos/asf/hbase/blob/e15389fd/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java index 65759e8..2442498 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java @@ -20,6 +20,7 @@ import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.MetaTableAccessor; import org.apache.hadoop.hbase.NamespaceDescriptor; +import org.apache.hadoop.hbase.RegionStateListener; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceStability; http://git-wip-us.apache.org/repos/asf/hbase/blob/e15389fd/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java deleted file mode 100644 index 7d4ad19..0000000 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more contributor license - * agreements. See the NOTICE file distributed with this work for additional information regarding - * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable - * law or agreed to in writing, software distributed under the License is distributed on an "AS IS" - * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License - * for the specific language governing permissions and limitations under the License. - */ -package org.apache.hadoop.hbase.quotas; - -import java.io.IOException; - -import org.apache.hadoop.hbase.HRegionInfo; -import org.apache.hadoop.hbase.classification.InterfaceAudience; - -/** - * The listener interface for receiving region state events. - */ -@InterfaceAudience.Private -public interface RegionStateListener { - - /** - * Process region split event. - * @param hri An instance of HRegionInfo - * @throws IOException - */ - void onRegionSplit(HRegionInfo hri) throws IOException; - - /** - * Process region split reverted event. - * @param hri An instance of HRegionInfo - * @throws IOException Signals that an I/O exception has occurred. - */ - void onRegionSplitReverted(HRegionInfo hri) throws IOException; - - /** - * Process region merge event. - * @param hri An instance of HRegionInfo - * @throws IOException - */ - void onRegionMerged(HRegionInfo hri) throws IOException; -}