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 java.io.IOException;
23  import java.util.List;
24  
25  import org.apache.hadoop.hbase.CoprocessorEnvironment;
26  import org.apache.hadoop.hbase.HBaseInterfaceAudience;
27  import org.apache.hadoop.hbase.HColumnDescriptor;
28  import org.apache.hadoop.hbase.HRegionInfo;
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.TableName;
33  import org.apache.hadoop.hbase.classification.InterfaceAudience;
34  import org.apache.hadoop.hbase.classification.InterfaceStability;
35  import org.apache.hadoop.hbase.master.RegionPlan;
36  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
37  import org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas;
38  
39  @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.CONFIG})
40  @InterfaceStability.Evolving
41  public class BaseMasterObserver implements MasterObserver {
42    @Override
43    public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
44        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
45    }
46  
47    @Override
48    public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
49        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
50    }
51  
52    @Override
53    public void preCreateTableHandler(
54        final ObserverContext<MasterCoprocessorEnvironment> ctx,
55        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
56    }
57  
58    @Override
59    public void postCreateTableHandler(
60        final ObserverContext<MasterCoprocessorEnvironment> ctx,
61        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
62    }
63  
64    @Override
65    public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
66        TableName tableName) throws IOException {
67    }
68  
69    @Override
70    public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
71        TableName tableName) throws IOException {
72    }
73  
74    @Override
75    public void preDeleteTableHandler(
76        final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
77        throws IOException{
78    }
79  
80    @Override
81    public void postDeleteTableHandler(
82        final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
83        throws IOException {
84    }
85  
86    @Override
87    public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
88        TableName tableName) throws IOException {
89    }
90  
91    @Override
92    public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
93        TableName tableName) throws IOException {
94    }
95  
96    @Override
97    public void preTruncateTableHandler(
98        final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
99        throws IOException {
100   }
101 
102   @Override
103   public void postTruncateTableHandler(
104       final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
105       throws IOException {
106   }
107 
108   @Override
109   public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
110       TableName tableName, HTableDescriptor htd) throws IOException {
111   }
112 
113   @Override
114   public void postModifyTableHandler(
115       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
116       HTableDescriptor htd) throws IOException {
117   }
118 
119   @Override
120   public void preModifyTableHandler(
121       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
122       HTableDescriptor htd) throws IOException {
123   }
124 
125   @Override
126   public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
127       TableName tableName, HTableDescriptor htd) throws IOException {
128   }
129 
130   @Override
131   public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
132   }
133 
134   @Override
135   public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
136   }
137 
138   @Override
139   public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
140   }
141 
142   @Override
143   public void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
144   }
145 
146   @Override
147   public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
148   }
149 
150   @Override
151   public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
152   }
153 
154   @Override
155   public void preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
156       String namespace) throws IOException {
157   }
158 
159   @Override
160   public void postGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
161       NamespaceDescriptor ns) throws IOException {
162   }
163 
164   @Override
165   public void preListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
166       List<NamespaceDescriptor> descriptors) throws IOException {
167   }
168 
169   @Override
170   public void postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
171       List<NamespaceDescriptor> descriptors) throws IOException {
172   }
173 
174   @Override
175   public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
176       TableName tableName, HColumnDescriptor column) throws IOException {
177   }
178 
179   @Override
180   public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
181       TableName tableName, HColumnDescriptor column) throws IOException {
182   }
183 
184   @Override
185   public void preAddColumnHandler(
186       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
187       HColumnDescriptor column) throws IOException {
188   }
189 
190   @Override
191   public void postAddColumnHandler(
192       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
193       HColumnDescriptor column) throws IOException {
194   }
195 
196   @Override
197   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
198       TableName tableName, HColumnDescriptor descriptor) throws IOException {
199   }
200 
201   @Override
202   public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
203       TableName tableName, HColumnDescriptor descriptor) throws IOException {
204   }
205 
206   @Override
207   public void preModifyColumnHandler(
208       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
209       HColumnDescriptor descriptor) throws IOException {
210   }
211 
212   @Override
213   public void postModifyColumnHandler(
214       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
215       HColumnDescriptor descriptor) throws IOException {
216   }
217 
218   @Override
219   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
220       TableName tableName, byte[] c) throws IOException {
221   }
222 
223   @Override
224   public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
225       TableName tableName, byte[] c) throws IOException {
226   }
227 
228   @Override
229   public void preDeleteColumnHandler(
230       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
231       byte[] c) throws IOException {
232   }
233 
234   @Override
235   public void postDeleteColumnHandler(
236       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
237       byte[] c) throws IOException {
238   }
239 
240 
241   @Override
242   public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
243       TableName tableName) throws IOException {
244   }
245 
246   @Override
247   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
248       TableName tableName) throws IOException {
249   }
250 
251   @Override
252   public void preEnableTableHandler(
253       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
254       throws IOException {
255   }
256 
257   @Override
258   public void postEnableTableHandler(
259       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
260       throws IOException {
261   }
262 
263   @Override
264   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
265       TableName tableName) throws IOException {
266   }
267 
268   @Override
269   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
270       TableName tableName) throws IOException {
271   }
272 
273   @Override
274   public void preDisableTableHandler(
275       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
276       throws IOException {
277   }
278 
279   @Override
280   public void postDisableTableHandler(
281       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
282       throws IOException {
283   }
284 
285   @Override
286   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
287       HRegionInfo regionInfo) throws IOException {
288   }
289 
290   @Override
291   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
292       HRegionInfo regionInfo) throws IOException {
293   }
294 
295   @Override
296   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
297       HRegionInfo regionInfo, boolean force) throws IOException {
298   }
299 
300   @Override
301   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
302       HRegionInfo regionInfo, boolean force) throws IOException {
303   }
304 
305   @Override
306   public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
307     HRegionInfo regionInfo) throws IOException {
308   }
309 
310   @Override
311   public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
312     HRegionInfo regionInfo) throws IOException {
313   }
314 
315   @Override
316   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
317       throws IOException {
318   }
319 
320   @Override
321   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
322       throws IOException {
323   }
324 
325   @Override
326   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
327       boolean b) throws IOException {
328     return b;
329   }
330 
331   @Override
332   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
333       boolean oldValue, boolean newValue) throws IOException {
334   }
335 
336   @Override
337   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
338       throws IOException {
339   }
340 
341   @Override
342   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
343       throws IOException {
344   }
345 
346   @Override
347   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
348       throws IOException {
349   }
350 
351   @Override
352   public void preMasterInitialization(
353       ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
354   }
355 
356   @Override
357   public void start(CoprocessorEnvironment ctx) throws IOException {
358   }
359 
360   @Override
361   public void stop(CoprocessorEnvironment ctx) throws IOException {
362   }
363 
364   @Override
365   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
366       HRegionInfo region, ServerName srcServer, ServerName destServer)
367   throws IOException {
368   }
369 
370   @Override
371   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
372       HRegionInfo region, ServerName srcServer, ServerName destServer)
373   throws IOException {
374   }
375 
376   @Override
377   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
378       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
379       throws IOException {
380   }
381 
382   @Override
383   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
384       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
385       throws IOException {
386   }
387 
388   @Override
389   public void preListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
390       final SnapshotDescription snapshot) throws IOException {
391   }
392 
393   @Override
394   public void postListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
395       final SnapshotDescription snapshot) throws IOException {
396   }
397 
398   @Override
399   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
400       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
401       throws IOException {
402   }
403 
404   @Override
405   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
406       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
407       throws IOException {
408   }
409 
410   @Override
411   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
412       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
413       throws IOException {
414   }
415 
416   @Override
417   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
418       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
419       throws IOException {
420   }
421 
422   @Override
423   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
424       final SnapshotDescription snapshot) throws IOException {
425   }
426 
427   @Override
428   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
429       final SnapshotDescription snapshot) throws IOException {
430   }
431 
432   @Override
433   public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
434       List<TableName> tableNamesList, List<HTableDescriptor> descriptors, String regex)
435       throws IOException {
436   }
437 
438   @Override
439   public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
440       List<TableName> tableNamesList, List<HTableDescriptor> descriptors,
441       String regex) throws IOException {
442   }
443 
444   @Override
445   public void preGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
446       List<HTableDescriptor> descriptors, String regex) throws IOException {
447   }
448 
449   @Override
450   public void postGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
451       List<HTableDescriptor> descriptors, String regex) throws IOException {
452   }
453 
454   @Override
455   public void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
456       TableName tableName) throws IOException {
457   }
458 
459   @Override
460   public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
461       TableName tableName) throws IOException {
462   }
463 
464   @Override
465   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
466       final String userName, final Quotas quotas) throws IOException {
467   }
468 
469   @Override
470   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
471       final String userName, final Quotas quotas) throws IOException {
472   }
473 
474   @Override
475   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
476       final String userName, final TableName tableName, final Quotas quotas) throws IOException {
477   }
478 
479   @Override
480   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
481       final String userName, final TableName tableName, final Quotas quotas) throws IOException {
482   }
483 
484   @Override
485   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
486       final String userName, final String namespace, final Quotas quotas) throws IOException {
487   }
488 
489   @Override
490   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
491       final String userName, final String namespace, final Quotas quotas) throws IOException {
492   }
493 
494   @Override
495   public void preSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
496       final TableName tableName, final Quotas quotas) throws IOException {
497   }
498 
499   @Override
500   public void postSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
501       final TableName tableName, final Quotas quotas) throws IOException {
502   }
503 
504   @Override
505   public void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
506       final String namespace, final Quotas quotas) throws IOException {
507   }
508 
509   @Override
510   public void postSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
511       final String namespace, final Quotas quotas) throws IOException {
512   }
513 }