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.hbase.classification.InterfaceAudience;
23  import org.apache.hadoop.hbase.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  import org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas;
35  
36  import java.io.IOException;
37  import java.util.List;
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 preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
156       TableName tableName, HColumnDescriptor column) throws IOException {
157   }
158 
159   @Override
160   public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
161       TableName tableName, HColumnDescriptor column) throws IOException {
162   }
163 
164   @Override
165   public void preAddColumnHandler(
166       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
167       HColumnDescriptor column) throws IOException {
168   }
169 
170   @Override
171   public void postAddColumnHandler(
172       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
173       HColumnDescriptor column) throws IOException {
174   }
175 
176   @Override
177   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
178       TableName tableName, HColumnDescriptor descriptor) throws IOException {
179   }
180 
181   @Override
182   public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
183       TableName tableName, HColumnDescriptor descriptor) throws IOException {
184   }
185 
186   @Override
187   public void preModifyColumnHandler(
188       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
189       HColumnDescriptor descriptor) throws IOException {
190   }
191 
192   @Override
193   public void postModifyColumnHandler(
194       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
195       HColumnDescriptor descriptor) throws IOException {
196   }
197 
198   @Override
199   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
200       TableName tableName, byte[] c) throws IOException {
201   }
202 
203   @Override
204   public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
205       TableName tableName, byte[] c) throws IOException {
206   }
207 
208   @Override
209   public void preDeleteColumnHandler(
210       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
211       byte[] c) throws IOException {
212   }
213 
214   @Override
215   public void postDeleteColumnHandler(
216       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
217       byte[] c) throws IOException {
218   }
219 
220 
221   @Override
222   public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
223       TableName tableName) throws IOException {
224   }
225 
226   @Override
227   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
228       TableName tableName) throws IOException {
229   }
230 
231   @Override
232   public void preEnableTableHandler(
233       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
234       throws IOException {
235   }
236 
237   @Override
238   public void postEnableTableHandler(
239       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
240       throws IOException {
241   }
242 
243   @Override
244   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
245       TableName tableName) throws IOException {
246   }
247 
248   @Override
249   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
250       TableName tableName) throws IOException {
251   }
252 
253   @Override
254   public void preDisableTableHandler(
255       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
256       throws IOException {
257   }
258 
259   @Override
260   public void postDisableTableHandler(
261       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
262       throws IOException {
263   }
264 
265   @Override
266   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
267       HRegionInfo regionInfo) throws IOException {
268   }
269 
270   @Override
271   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
272       HRegionInfo regionInfo) throws IOException {
273   }
274 
275   @Override
276   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
277       HRegionInfo regionInfo, boolean force) throws IOException {
278   }
279 
280   @Override
281   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
282       HRegionInfo regionInfo, boolean force) throws IOException {
283   }
284 
285   @Override
286   public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
287     HRegionInfo regionInfo) throws IOException {
288   }
289 
290   @Override
291   public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
292     HRegionInfo regionInfo) throws IOException {
293   }
294 
295   @Override
296   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
297       throws IOException {
298   }
299 
300   @Override
301   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
302       throws IOException {
303   }
304 
305   @Override
306   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
307       boolean b) throws IOException {
308     return b;
309   }
310 
311   @Override
312   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
313       boolean oldValue, boolean newValue) throws IOException {
314   }
315 
316   @Override
317   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
318       throws IOException {
319   }
320 
321   @Override
322   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
323       throws IOException {
324   }
325 
326   @Override
327   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
328       throws IOException {
329   }
330 
331   @Override
332   public void preMasterInitialization(
333       ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
334   }
335 
336   @Override
337   public void start(CoprocessorEnvironment ctx) throws IOException {
338   }
339 
340   @Override
341   public void stop(CoprocessorEnvironment ctx) throws IOException {
342   }
343 
344   @Override
345   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
346       HRegionInfo region, ServerName srcServer, ServerName destServer)
347   throws IOException {
348   }
349 
350   @Override
351   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
352       HRegionInfo region, ServerName srcServer, ServerName destServer)
353   throws IOException {
354   }
355 
356   @Override
357   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
358       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
359       throws IOException {
360   }
361 
362   @Override
363   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
364       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
365       throws IOException {
366   }
367 
368   @Override
369   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
370       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
371       throws IOException {
372   }
373 
374   @Override
375   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
376       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
377       throws IOException {
378   }
379 
380   @Override
381   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
382       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
383       throws IOException {
384   }
385 
386   @Override
387   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
388       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
389       throws IOException {
390   }
391 
392   @Override
393   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
394       final SnapshotDescription snapshot) throws IOException {
395   }
396 
397   @Override
398   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
399       final SnapshotDescription snapshot) throws IOException {
400   }
401 
402   @Override
403   public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
404       List<TableName> tableNamesList, List<HTableDescriptor> descriptors)
405       throws IOException {
406   }
407 
408   @Override
409   public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
410       List<HTableDescriptor> descriptors) throws IOException {
411   }
412 
413   @Override
414   public void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
415       TableName tableName) throws IOException {
416   }
417 
418   @Override
419   public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
420       TableName tableName) throws IOException {
421   }
422 
423   @Override
424   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
425       final String userName, final Quotas quotas) throws IOException {
426   }
427 
428   @Override
429   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
430       final String userName, final Quotas quotas) throws IOException {
431   }
432 
433   @Override
434   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
435       final String userName, final TableName tableName, final Quotas quotas) throws IOException {
436   }
437 
438   @Override
439   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
440       final String userName, final TableName tableName, final Quotas quotas) throws IOException {
441   }
442 
443   @Override
444   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
445       final String userName, final String namespace, final Quotas quotas) throws IOException {
446   }
447 
448   @Override
449   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
450       final String userName, final String namespace, final Quotas quotas) throws IOException {
451   }
452 
453   @Override
454   public void preSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
455       final TableName tableName, final Quotas quotas) throws IOException {
456   }
457 
458   @Override
459   public void postSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
460       final TableName tableName, final Quotas quotas) throws IOException {
461   }
462 
463   @Override
464   public void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
465       final String namespace, final Quotas quotas) throws IOException {
466   }
467 
468   @Override
469   public void postSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
470       final String namespace, final Quotas quotas) throws IOException {
471   }
472 }