View Javadoc

1   /*
2    *
3    * Licensed under the Apache License, Version 2.0 (the "License");
4    * you may not use this file except in compliance with the License.
5    * You may obtain a copy of the License at
6    *
7    *     http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  
16  package org.apache.hadoop.hbase.coprocessor;
17  
18  import java.io.IOException;
19  import java.util.List;
20  
21  import org.apache.hadoop.classification.InterfaceAudience;
22  import org.apache.hadoop.classification.InterfaceStability;
23  import org.apache.hadoop.hbase.CoprocessorEnvironment;
24  import org.apache.hadoop.hbase.HBaseInterfaceAudience;
25  import org.apache.hadoop.hbase.client.Mutation;
26  import org.apache.hadoop.hbase.regionserver.HRegion;
27  
28  /**
29   * An abstract class that implements RegionServerObserver.
30   * By extending it, you can create your own region server observer without
31   * overriding all abstract methods of RegionServerObserver.
32   */
33  @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
34  @InterfaceStability.Evolving
35  public class BaseRegionServerObserver implements RegionServerObserver {
36  
37    @Override
38    public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
39        throws IOException { }
40  
41    @Override
42    public void start(CoprocessorEnvironment env) throws IOException { }
43  
44    @Override
45    public void stop(CoprocessorEnvironment env) throws IOException { }
46  
47    @Override
48    public void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA,
49        HRegion regionB) throws IOException { }
50  
51    @Override
52    public void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c, HRegion regionA,
53        HRegion regionB, HRegion mergedRegion) throws IOException { }
54  
55    @Override
56    public void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
57        HRegion regionA, HRegion regionB, List<Mutation> metaEntries) throws IOException { }
58  
59    @Override
60    public void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
61        HRegion regionA, HRegion regionB, HRegion mergedRegion) throws IOException { }
62  
63    @Override
64    public void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
65        HRegion regionA, HRegion regionB) throws IOException { }
66  
67    @Override
68    public void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
69        HRegion regionA, HRegion regionB) throws IOException { }
70  
71  }