View Javadoc

1   /*
2    * Copyright 2010 The Apache Software Foundation
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   * http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package org.apache.hadoop.hbase.coprocessor;
22  
23  import org.apache.hadoop.hbase.HColumnDescriptor;
24  import org.apache.hadoop.hbase.HRegionInfo;
25  import org.apache.hadoop.hbase.CoprocessorEnvironment;
26  import org.apache.hadoop.hbase.HTableDescriptor;
27  import org.apache.hadoop.hbase.ServerName;
28  import org.apache.hadoop.hbase.UnknownRegionException;
29  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
30  
31  import java.io.IOException;
32  
33  public class BaseMasterObserver implements MasterObserver {
34    @Override
35    public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
36        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
37    }
38  
39    @Override
40    public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
41        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
42    }
43  
44    @Override
45    public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
46        byte[] tableName) throws IOException {
47    }
48  
49    @Override
50    public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
51        byte[] tableName) throws IOException {
52    }
53  
54    @Override
55    public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
56        byte[] tableName, HTableDescriptor htd) throws IOException {
57    }
58  
59    @Override
60    public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
61        byte[] tableName, HTableDescriptor htd) throws IOException {
62    }
63  
64    @Override
65    public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
66        byte[] tableName, HColumnDescriptor column) throws IOException {
67    }
68  
69    @Override
70    public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
71        byte[] tableName, HColumnDescriptor column) throws IOException {
72    }
73  
74    @Override
75    public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
76        byte[] tableName, HColumnDescriptor descriptor) throws IOException {
77    }
78  
79    @Override
80    public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
81        byte[] tableName, HColumnDescriptor descriptor) throws IOException {
82    }
83  
84    @Override
85    public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
86        byte[] tableName, byte[] c) throws IOException {
87    }
88  
89    @Override
90    public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
91        byte[] tableName, byte[] c) throws IOException {
92    }
93  
94    @Override
95    public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
96        byte[] tableName) throws IOException {
97    }
98  
99    @Override
100   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
101       byte[] tableName) throws IOException {
102   }
103 
104   @Override
105   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
106       byte[] tableName) throws IOException {
107   }
108 
109   @Override
110   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
111       byte[] tableName) throws IOException {
112   }
113 
114   @Override
115   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
116       HRegionInfo regionInfo) throws IOException {
117   }
118   
119   @Override
120   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
121       HRegionInfo regionInfo) throws IOException {
122   }
123 
124   @Override
125   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
126       HRegionInfo regionInfo, boolean force) throws IOException {
127   }
128 
129   @Override
130   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
131       HRegionInfo regionInfo, boolean force) throws IOException {
132   }
133 
134   @Override
135   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
136       throws IOException {
137   }
138 
139   @Override
140   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
141       throws IOException {
142   }
143 
144   @Override
145   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
146       boolean b) throws IOException {
147     return b;
148   }
149 
150   @Override
151   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
152       boolean oldValue, boolean newValue) throws IOException {
153   }
154 
155   @Override
156   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
157       throws IOException {
158   }
159 
160   @Override
161   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
162       throws IOException {
163   }
164 
165   @Override
166   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
167       throws IOException {
168   }
169 
170   @Override
171   public void start(CoprocessorEnvironment ctx) throws IOException {
172   }
173 
174   @Override
175   public void stop(CoprocessorEnvironment ctx) throws IOException {
176   }
177 
178   @Override
179   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
180       HRegionInfo region, ServerName srcServer, ServerName destServer)
181   throws IOException {
182   }
183 
184   @Override
185   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
186       HRegionInfo region, ServerName srcServer, ServerName destServer)
187   throws IOException {
188   }
189 
190   @Override
191   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
192       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
193       throws IOException {
194   }
195 
196   @Override
197   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
198       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
199       throws IOException {
200   }
201 
202   @Override
203   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
204       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
205       throws IOException {
206   }
207 
208   @Override
209   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
210       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
211       throws IOException {
212   }
213 
214   @Override
215   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
216       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
217       throws IOException {
218   }
219 
220   @Override
221   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
222       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
223       throws IOException {
224   }
225 
226   @Override
227   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
228       final SnapshotDescription snapshot) throws IOException {
229   }
230 
231   @Override
232   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
233       final SnapshotDescription snapshot) throws IOException {
234   }
235 }