View Javadoc

1   /*
2    *
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   * http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.hadoop.hbase.coprocessor;
21  
22  import org.apache.hadoop.classification.InterfaceAudience;
23  import org.apache.hadoop.classification.InterfaceStability;
24  import org.apache.hadoop.hbase.HBaseInterfaceAudience;
25  import org.apache.hadoop.hbase.TableName;
26  import org.apache.hadoop.hbase.HColumnDescriptor;
27  import org.apache.hadoop.hbase.HRegionInfo;
28  import org.apache.hadoop.hbase.CoprocessorEnvironment;
29  import org.apache.hadoop.hbase.HTableDescriptor;
30  import org.apache.hadoop.hbase.NamespaceDescriptor;
31  import org.apache.hadoop.hbase.ServerName;
32  import org.apache.hadoop.hbase.master.RegionPlan;
33  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
34  
35  import java.io.IOException;
36  import java.util.List;
37  
38  @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
39  @InterfaceStability.Evolving
40  public class BaseMasterObserver implements MasterObserver {
41    @Override
42    public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
43        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
44    }
45  
46    @Override
47    public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
48        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
49    }
50  
51    @Override
52    public void preCreateTableHandler(
53        final ObserverContext<MasterCoprocessorEnvironment> ctx,
54        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
55    }
56  
57    @Override
58    public void postCreateTableHandler(
59        final ObserverContext<MasterCoprocessorEnvironment> ctx,
60        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
61    }
62  
63    @Override
64    public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
65        TableName tableName) throws IOException {
66    }
67  
68    @Override
69    public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
70        TableName tableName) throws IOException {
71    }
72  
73    @Override
74    public void preDeleteTableHandler(
75        final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
76        throws IOException{
77    }
78  
79    @Override
80    public void postDeleteTableHandler(
81        final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
82        throws IOException {
83    }
84  
85    @Override
86    public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
87        TableName tableName, HTableDescriptor htd) throws IOException {
88    }
89  
90    @Override
91    public void postModifyTableHandler(
92        ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
93        HTableDescriptor htd) throws IOException {
94    }
95  
96    @Override
97    public void preModifyTableHandler(
98        ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
99        HTableDescriptor htd) throws IOException {
100   }
101 
102   @Override
103   public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
104       TableName tableName, HTableDescriptor htd) throws IOException {
105   }
106 
107   @Override
108   public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
109   }
110 
111   @Override
112   public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
113   }
114 
115   @Override
116   public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
117   }
118 
119   @Override
120   public void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
121   }
122 
123   @Override
124   public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
125   }
126 
127   @Override
128   public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
129   }
130 
131   @Override
132   public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
133       TableName tableName, HColumnDescriptor column) throws IOException {
134   }
135 
136   @Override
137   public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
138       TableName tableName, HColumnDescriptor column) throws IOException {
139   }
140 
141   @Override
142   public void preAddColumnHandler(
143       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
144       HColumnDescriptor column) throws IOException {
145   }
146 
147   @Override
148   public void postAddColumnHandler(
149       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
150       HColumnDescriptor column) throws IOException {
151   }
152 
153   @Override
154   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
155       TableName tableName, HColumnDescriptor descriptor) throws IOException {
156   }
157 
158   @Override
159   public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
160       TableName tableName, HColumnDescriptor descriptor) throws IOException {
161   }
162 
163   @Override
164   public void preModifyColumnHandler(
165       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
166       HColumnDescriptor descriptor) throws IOException {
167   }
168 
169   @Override
170   public void postModifyColumnHandler(
171       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
172       HColumnDescriptor descriptor) throws IOException {
173   }
174 
175   @Override
176   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
177       TableName tableName, byte[] c) throws IOException {
178   }
179 
180   @Override
181   public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
182       TableName tableName, byte[] c) throws IOException {
183   }
184 
185   @Override
186   public void preDeleteColumnHandler(
187       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
188       byte[] c) throws IOException {
189   }
190 
191   @Override
192   public void postDeleteColumnHandler(
193       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
194       byte[] c) throws IOException {
195   }
196 
197 
198   @Override
199   public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
200       TableName tableName) throws IOException {
201   }
202 
203   @Override
204   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
205       TableName tableName) throws IOException {
206   }
207 
208   @Override
209   public void preEnableTableHandler(
210       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
211       throws IOException {
212   }
213 
214   @Override
215   public void postEnableTableHandler(
216       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
217       throws IOException {
218   }
219 
220   @Override
221   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
222       TableName tableName) throws IOException {
223   }
224 
225   @Override
226   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
227       TableName tableName) throws IOException {
228   }
229 
230   @Override
231   public void preDisableTableHandler(
232       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
233       throws IOException {
234   }
235 
236   @Override
237   public void postDisableTableHandler(
238       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
239       throws IOException {
240   }
241 
242   @Override
243   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
244       HRegionInfo regionInfo) throws IOException {
245   }
246 
247   @Override
248   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
249       HRegionInfo regionInfo) throws IOException {
250   }
251 
252   @Override
253   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
254       HRegionInfo regionInfo, boolean force) throws IOException {
255   }
256 
257   @Override
258   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
259       HRegionInfo regionInfo, boolean force) throws IOException {
260   }
261 
262   @Override
263   public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
264     HRegionInfo regionInfo) throws IOException {
265   }
266 
267   @Override
268   public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
269     HRegionInfo regionInfo) throws IOException {
270   }
271 
272   @Override
273   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
274       throws IOException {
275   }
276 
277   @Override
278   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
279       throws IOException {
280   }
281 
282   @Override
283   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
284       boolean b) throws IOException {
285     return b;
286   }
287 
288   @Override
289   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
290       boolean oldValue, boolean newValue) throws IOException {
291   }
292 
293   @Override
294   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
295       throws IOException {
296   }
297 
298   @Override
299   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
300       throws IOException {
301   }
302 
303   @Override
304   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
305       throws IOException {
306   }
307 
308   @Override
309   public void preMasterInitialization(
310       ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
311   }
312   
313   @Override
314   public void start(CoprocessorEnvironment ctx) throws IOException {
315   }
316 
317   @Override
318   public void stop(CoprocessorEnvironment ctx) throws IOException {
319   }
320 
321   @Override
322   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
323       HRegionInfo region, ServerName srcServer, ServerName destServer)
324   throws IOException {
325   }
326 
327   @Override
328   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
329       HRegionInfo region, ServerName srcServer, ServerName destServer)
330   throws IOException {
331   }
332 
333   @Override
334   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
335       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
336       throws IOException {
337   }
338 
339   @Override
340   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
341       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
342       throws IOException {
343   }
344 
345   @Override
346   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
347       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
348       throws IOException {
349   }
350 
351   @Override
352   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
353       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
354       throws IOException {
355   }
356 
357   @Override
358   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
359       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
360       throws IOException {
361   }
362 
363   @Override
364   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
365       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
366       throws IOException {
367   }
368 
369   @Override
370   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
371       final SnapshotDescription snapshot) throws IOException {
372   }
373 
374   @Override
375   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
376       final SnapshotDescription snapshot) throws IOException {
377   }
378 
379   @Override
380   public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
381       List<TableName> tableNamesList, List<HTableDescriptor> descriptors)
382       throws IOException {
383   }
384 
385   @Override
386   public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
387       List<HTableDescriptor> descriptors) throws IOException {
388   }
389 
390 }