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 com.google.common.net.HostAndPort;
23  
24  import java.io.IOException;
25  import java.util.List;
26  import java.util.Set;
27  
28  import org.apache.hadoop.hbase.CoprocessorEnvironment;
29  import org.apache.hadoop.hbase.HBaseInterfaceAudience;
30  import org.apache.hadoop.hbase.HColumnDescriptor;
31  import org.apache.hadoop.hbase.HRegionInfo;
32  import org.apache.hadoop.hbase.HTableDescriptor;
33  import org.apache.hadoop.hbase.NamespaceDescriptor;
34  import org.apache.hadoop.hbase.ProcedureInfo;
35  import org.apache.hadoop.hbase.ServerName;
36  import org.apache.hadoop.hbase.TableName;
37  import org.apache.hadoop.hbase.classification.InterfaceAudience;
38  import org.apache.hadoop.hbase.classification.InterfaceStability;
39  import org.apache.hadoop.hbase.client.MasterSwitchType;
40  import org.apache.hadoop.hbase.master.RegionPlan;
41  import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
42  import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
43  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
44  import org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas;
45  
46  @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.CONFIG})
47  @InterfaceStability.Evolving
48  public class BaseMasterObserver implements MasterObserver {
49    @Override
50    public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
51        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
52    }
53  
54    @Override
55    public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
56        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
57    }
58  
59    /**
60     * Called before a new table is created by
61     * {@link org.apache.hadoop.hbase.master.HMaster}.  Called as part of create
62     * table handler and it is async to the create RPC call.
63     * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
64     * @param ctx the environment to interact with the framework and master
65     * @param desc the HTableDescriptor for the table
66     * @param regions the initial regions created for the table
67     * @throws IOException if something went wrong
68     * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
69     *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
70     *     Use {@link #preCreateTableAction(ObserverContext, HTableDescriptor, HRegionInfo[])}.
71     */
72    @Deprecated
73    @Override
74    public void preCreateTableHandler(
75        final ObserverContext<MasterCoprocessorEnvironment> ctx,
76        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
77    }
78
79    @Override
80    public void preCreateTableAction(
81        final ObserverContext<MasterCoprocessorEnvironment> ctx,
82        final HTableDescriptor desc,
83        final HRegionInfo[] regions) throws IOException {
84    }
85  
86    /**
87     * Called after the createTable operation has been requested.  Called as part
88     * of create table RPC call.  Called as part of create table handler and
89     * it is async to the create RPC call.
90     * @param ctx the environment to interact with the framework and master
91     * @param desc the HTableDescriptor for the table
92     * @param regions the initial regions created for the table
93     * @throws IOException if something went wrong
94     * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
95     *   (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
96     *   Use {@link #postCompletedCreateTableAction(ObserverContext, HTableDescriptor, HRegionInfo[])}
97     */
98    @Deprecated
99    @Override
100   public void postCreateTableHandler(
101       final ObserverContext<MasterCoprocessorEnvironment> ctx,
102       HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
103   }
104
105   @Override
106   public void postCompletedCreateTableAction(
107       final ObserverContext<MasterCoprocessorEnvironment> ctx,
108       final HTableDescriptor desc,
109       final HRegionInfo[] regions) throws IOException {
110   }
111
112   @Override
113   public void preDispatchMerge(final ObserverContext<MasterCoprocessorEnvironment> ctx,
114       HRegionInfo regionA, HRegionInfo regionB) throws IOException {
115   }
116
117   @Override
118   public void postDispatchMerge(final ObserverContext<MasterCoprocessorEnvironment> ctx,
119       HRegionInfo regionA, HRegionInfo regionB) throws IOException {
120   }
121
122   @Override
123   public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
124       TableName tableName) throws IOException {
125   }
126
127   @Override
128   public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
129       TableName tableName) throws IOException {
130   }
131
132   /**
133    * Called before {@link org.apache.hadoop.hbase.master.HMaster} deletes a
134    * table.  Called as part of delete table handler and
135    * it is async to the delete RPC call.
136    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
137    * @param ctx the environment to interact with the framework and master
138    * @param tableName the name of the table
139    * @throws IOException if something went wrong
140    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
141    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
142    *     Use {@link #preDeleteTableAction(ObserverContext, TableName)}.
143    */
144   @Deprecated
145   @Override
146   public void preDeleteTableHandler(
147       final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
148       throws IOException{
149   }
150
151   @Override
152   public void preDeleteTableAction(
153       final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
154       throws IOException{
155   }
156
157   /**
158    * Called after {@link org.apache.hadoop.hbase.master.HMaster} deletes a
159    * table.  Called as part of delete table handler and it is async to the
160    * delete RPC call.
161    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
162    * @param ctx the environment to interact with the framework and master
163    * @param tableName the name of the table
164    * @throws IOException if something went wrong
165    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
166    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
167    *     Use {@link #postCompletedDeleteTableAction(ObserverContext, TableName)}.
168    */
169   @Deprecated
170   @Override
171   public void postDeleteTableHandler(
172       final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
173       throws IOException {
174   }
175
176   @Override
177   public void postCompletedDeleteTableAction(
178       final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
179       throws IOException {
180   }
181
182   @Override
183   public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
184       TableName tableName) throws IOException {
185   }
186
187   @Override
188   public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
189       TableName tableName) throws IOException {
190   }
191
192   /**
193    * Called before {@link org.apache.hadoop.hbase.master.HMaster} truncates a
194    * table.  Called as part of truncate table handler and it is sync
195    * to the truncate RPC call.
196    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
197    * @param ctx the environment to interact with the framework and master
198    * @param tableName the name of the table
199    * @throws IOException if something went wrong
200    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
201    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
202    *     Use {@link #preTruncateTableAction(ObserverContext, TableName)}.
203    */
204   @Deprecated
205   @Override
206   public void preTruncateTableHandler(
207       final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
208       throws IOException {
209   }
210
211   @Override
212   public void preTruncateTableAction(
213       final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
214       throws IOException {
215   }
216
217   /**
218    * Called after {@link org.apache.hadoop.hbase.master.HMaster} truncates a
219    * table.  Called as part of truncate table handler and it is sync to the
220    * truncate RPC call.
221    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
222    * @param ctx the environment to interact with the framework and master
223    * @param tableName the name of the table
224    * @throws IOException if something went wrong
225    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
226    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
227    *     Use {@link #postCompletedTruncateTableAction(ObserverContext, TableName)}.
228    */
229   @Deprecated
230   @Override
231   public void postTruncateTableHandler(
232       final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
233       throws IOException {
234   }
235 
236   @Override
237   public void postCompletedTruncateTableAction(
238       final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
239       throws IOException {
240   }
241
242   @Override
243   public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
244       TableName tableName, HTableDescriptor htd) throws IOException {
245   }
246
247   @Override
248   public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
249       TableName tableName, HTableDescriptor htd) throws IOException {
250   }
251
252   /**
253    * Called prior to modifying a table's properties.  Called as part of modify
254    * table handler and it is async to the modify table RPC call.
255    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
256    * @param ctx the environment to interact with the framework and master
257    * @param tableName the name of the table
258    * @param htd the HTableDescriptor
259    * @throws IOException if something went wrong
260    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
261    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
262    *     Use {@link #preModifyTableAction(ObserverContext, TableName, HTableDescriptor)}.
263    */
264   @Deprecated
265   @Override
266   public void preModifyTableHandler(
267       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
268       HTableDescriptor htd) throws IOException {
269   }
270 
271   @Override
272   public void preModifyTableAction(
273       final ObserverContext<MasterCoprocessorEnvironment> ctx,
274       final TableName tableName,
275       final HTableDescriptor htd) throws IOException {
276   }
277 
278   /**
279    * Called after to modifying a table's properties.  Called as part of modify
280    * table handler and it is async to the modify table RPC call.
281    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
282    * @param ctx the environment to interact with the framework and master
283    * @param tableName the name of the table
284    * @param htd the HTableDescriptor
285    * @throws IOException if something went wrong
286    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
287    *     (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
288    *     Use {@link #postCompletedModifyTableAction(ObserverContext, TableName, HTableDescriptor)}.
289    */
290   @Deprecated
291   @Override
292   public void postModifyTableHandler(
293       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
294       HTableDescriptor htd) throws IOException {
295   }
296 
297   @Override
298   public void postCompletedModifyTableAction(
299       final ObserverContext<MasterCoprocessorEnvironment> ctx,
300       final TableName tableName,
301       final HTableDescriptor htd) throws IOException {
302   }
303
304   @Override
305   public void preCreateNamespace(
306       ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
307           throws IOException {
308   }
309
310   @Override
311   public void postCreateNamespace(
312       ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
313           throws IOException {
314   }
315
316   @Override
317   public void preDeleteNamespace(
318       ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
319   }
320
321   @Override
322   public void postDeleteNamespace(
323       ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
324   }
325 
326   @Override
327   public void preModifyNamespace(
328       ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
329           throws IOException {
330   }
331 
332   @Override
333   public void postModifyNamespace(
334       ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
335           throws IOException {
336   }
337
338   @Override
339   public void preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
340       String namespace) throws IOException {
341   }
342
343   @Override
344   public void postGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
345       NamespaceDescriptor ns) throws IOException {
346   }
347
348   @Override
349   public void preListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
350       List<NamespaceDescriptor> descriptors) throws IOException {
351   }
352
353   @Override
354   public void postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
355       List<NamespaceDescriptor> descriptors) throws IOException {
356   }
357
358   /**
359    * Called prior to adding a new column family to the table.  Called as part of
360    * add column RPC call.
361    * @param ctx the environment to interact with the framework and master
362    * @param tableName the name of the table
363    * @param columnFamily the HColumnDescriptor
364    * @throws IOException if something went wrong
365    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
366    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
367    *             Use {@link #preAddColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
368    */
369   @Deprecated
370   @Override
371   public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
372       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
373   }
374
375   @Override
376   public void preAddColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
377       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
378   }
379
380   /**
381    * Called after the new column family has been created.  Called as part of
382    * add column RPC call.
383    * @param ctx the environment to interact with the framework and master
384    * @param tableName the name of the table
385    * @param columnFamily the HColumnDescriptor
386    * @throws IOException if something went wrong
387    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
388    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
389    *             Use {@link #postAddColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
390    */
391   @Deprecated
392   @Override
393   public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
394       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
395   }
396 
397   @Override
398   public void postAddColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
399       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
400   }
401 
402   /**
403    * Called prior to adding a new column family to the table.  Called as part of
404    * add column handler.
405    * @param ctx the environment to interact with the framework and master
406    * @param tableName the name of the table
407    * @param columnFamily the HColumnDescriptor
408    * @throws IOException if something went wrong
409    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
410    *          (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>). Use
411    *          {@link #preAddColumnFamilyAction(ObserverContext, TableName, HColumnDescriptor)}.
412    */
413   @Deprecated
414   @Override
415   public void preAddColumnHandler(
416       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
417       HColumnDescriptor columnFamily) throws IOException {
418   }
419
420   @Override
421   public void preAddColumnFamilyAction(
422       final ObserverContext<MasterCoprocessorEnvironment> ctx,
423       final TableName tableName,
424       final HColumnDescriptor columnFamily) throws IOException {
425   }
426
427   /**
428    * Called after the new column family has been created.  Called as part of
429    * add column handler.
430    * @param ctx the environment to interact with the framework and master
431    * @param tableName the name of the table
432    * @param columnFamily the HColumnDescriptor
433    * @throws IOException if something went wrong
434    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
435    *     (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>). Use
436    *     {@link #postCompletedAddColumnFamilyAction(ObserverContext, TableName, HColumnDescriptor)}.
437    */
438   @Deprecated
439   @Override
440   public void postAddColumnHandler(
441       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
442       HColumnDescriptor columnFamily) throws IOException {
443   }
444
445   @Override
446   public void postCompletedAddColumnFamilyAction(
447       final ObserverContext<MasterCoprocessorEnvironment> ctx,
448       final TableName tableName,
449       final HColumnDescriptor columnFamily) throws IOException {
450   }
451
452   /**
453    * Called prior to modifying a column family's attributes.  Called as part of
454    * modify column RPC call.
455    * @param ctx the environment to interact with the framework and master
456    * @param tableName the name of the table
457    * @param columnFamily the HColumnDescriptor
458    * @throws IOException if something went wrong
459    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
460    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
461    *             Use {@link #preModifyColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
462    */
463   @Deprecated
464   @Override
465   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
466       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
467   }
468
469   @Override
470   public void preModifyColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
471       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
472   }
473
474   /**
475    * Called after the column family has been updated.  Called as part of modify
476    * column RPC call.
477    * @param ctx the environment to interact with the framework and master
478    * @param tableName the name of the table
479    * @param columnFamily the HColumnDescriptor
480    * @throws IOException if something went wrong
481    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
482    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
483    *             Use {@link #postModifyColumnFamily(ObserverContext, TableName, HColumnDescriptor)}.
484    */
485   @Deprecated
486   @Override
487   public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
488       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
489   }
490
491   @Override
492   public void postModifyColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
493       TableName tableName, HColumnDescriptor columnFamily) throws IOException {
494   }
495
496   /**
497    * Called prior to modifying a column family's attributes.  Called as part of
498    * modify column handler.
499    * @param ctx the environment to interact with the framework and master
500    * @param tableName the name of the table
501    * @param columnFamily the HColumnDescriptor
502    * @throws IOException if something went wrong
503    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
504    *     (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
505    *     Use {@link #preModifyColumnFamilyAction(ObserverContext, TableName, HColumnDescriptor)}.
506    */
507   @Deprecated
508   @Override
509   public void preModifyColumnHandler(
510       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
511       HColumnDescriptor columnFamily) throws IOException {
512   }
513
514   @Override
515   public void preModifyColumnFamilyAction(
516       final ObserverContext<MasterCoprocessorEnvironment> ctx,
517       final TableName tableName,
518       final HColumnDescriptor columnFamily) throws IOException {
519   }
520 
521   /**
522    * Called after the column family has been updated.  Called as part of modify
523    * column handler.
524    * @param ctx the environment to interact with the framework and master
525    * @param tableName the name of the table
526    * @param columnFamily the HColumnDescriptor
527    * @throws IOException if something went wrong
528    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
529    *   (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>). Use
530    *   {@link #postCompletedModifyColumnFamilyAction(ObserverContext,TableName,HColumnDescriptor)}.
531    */
532   @Deprecated
533   @Override
534   public void postModifyColumnHandler(
535       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
536       HColumnDescriptor columnFamily) throws IOException {
537   }
538
539   @Override
540   public void postCompletedModifyColumnFamilyAction(
541       final ObserverContext<MasterCoprocessorEnvironment> ctx,
542       final TableName tableName,
543       final HColumnDescriptor columnFamily) throws IOException {
544   }
545
546   /**
547    * Called prior to deleting the entire column family.  Called as part of
548    * delete column RPC call.
549    * @param ctx the environment to interact with the framework and master
550    * @param tableName the name of the table
551    * @param columnFamily the column family
552    * @throws IOException if something went wrong
553    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
554    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
555    *             Use {@link #preDeleteColumnFamily(ObserverContext, TableName, byte[])}.
556    */
557   @Deprecated
558   @Override
559   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
560       TableName tableName, byte[] columnFamily) throws IOException {
561   }
562
563   @Override
564   public void preDeleteColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
565       TableName tableName, byte[] columnFamily) throws IOException {
566   }
567
568   /**
569    * Called after the column family has been deleted.  Called as part of delete
570    * column RPC call.
571    * @param ctx the environment to interact with the framework and master
572    * @param tableName the name of the table
573    * @param columnFamily the column family
574    * @throws IOException if something went wrong
575    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
576    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
577    *             Use {@link #postDeleteColumnFamily(ObserverContext, TableName, byte[])}.
578    */
579   @Deprecated
580   @Override
581   public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
582       TableName tableName, byte[] columnFamily) throws IOException {
583   }
584
585   @Override
586   public void postDeleteColumnFamily(ObserverContext<MasterCoprocessorEnvironment> ctx,
587       TableName tableName, byte[] columnFamily) throws IOException {
588   }
589
590   /**
591    * Called prior to deleting the entire column family.  Called as part of
592    * delete column handler.
593    * @param ctx the environment to interact with the framework and master
594    * @param tableName the name of the table
595    * @param columnFamily the column family
596    * @throws IOException if something went wrong
597    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
598    *             (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
599    *             Use {@link #preDeleteColumnFamilyAction(ObserverContext, TableName, byte[])}.
600    */
601   @Deprecated
602   @Override
603   public void preDeleteColumnHandler(
604       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
605       byte[] columnFamily) throws IOException {
606   }
607 
608   @Override
609   public void preDeleteColumnFamilyAction(
610       final ObserverContext<MasterCoprocessorEnvironment> ctx,
611       final TableName tableName,
612       final byte[] columnFamily) throws IOException {
613   }
614
615   /**
616    * Called after the column family has been deleted.  Called as part of
617    * delete column handler.
618    * @param ctx the environment to interact with the framework and master
619    * @param tableName the name of the table
620    * @param columnFamily the column family
621    * @throws IOException if something went wrong
622    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
623    *         (<a href="https://issues.apache.org/jira/browse/HBASE-13645">HBASE-13645</a>).
624    *         Use {@link #postCompletedDeleteColumnFamilyAction(ObserverContext, TableName, byte[])}.
625    */
626   @Deprecated
627   @Override
628   public void postDeleteColumnHandler(
629       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
630       byte[] columnFamily) throws IOException {
631   }
632 
633   @Override
634   public void postCompletedDeleteColumnFamilyAction(
635       final ObserverContext<MasterCoprocessorEnvironment> ctx,
636       final TableName tableName,
637       final byte[] columnFamily) throws IOException {
638   }
639
640
641   @Override
642   public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
643       TableName tableName) throws IOException {
644   }
645
646   @Override
647   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
648       TableName tableName) throws IOException {
649   }
650
651   /**
652    * Called prior to enabling a table.  Called as part of enable table handler
653    * and it is async to the enable table RPC call.
654    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
655    * @param ctx the environment to interact with the framework and master
656    * @param tableName the name of the table
657    * @throws IOException if something went wrong
658    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
659    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
660    *     Use {@link #preEnableTableAction(ObserverContext, TableName)}.
661    */
662   @Deprecated
663   @Override
664   public void preEnableTableHandler(
665       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
666       throws IOException {
667   }
668
669   @Override
670   public void preEnableTableAction(
671       ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
672       throws IOException {
673   }
674
675   /**
676    * Called after the enableTable operation has been requested.  Called as part
677    * of enable table handler and it is async to the enable table RPC call.
678    * @param ctx the environment to interact with the framework and master
679    * @param tableName the name of the table
680    * @throws IOException if something went wrong
681    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
682    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
683    *     Use {@link #postCompletedEnableTableAction(ObserverContext, TableName)}.
684    */
685   @Deprecated
686   @Override
687   public void postEnableTableHandler(
688       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
689       throws IOException {
690   }
691
692   @Override
693   public void postCompletedEnableTableAction(
694       ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
695       throws IOException {
696   }
697
698   @Override
699   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
700       TableName tableName) throws IOException {
701   }
702
703   @Override
704   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
705       TableName tableName) throws IOException {
706   }
707
708   /**
709    * Called prior to disabling a table.  Called as part of disable table handler
710    * and it is asyn to the disable table RPC call.
711    * It can't bypass the default action, e.g., ctx.bypass() won't have effect.
712    * @param ctx the environment to interact with the framework and master
713    * @param tableName the name of the table
714    * @throws IOException if something went wrong
715    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
716    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
717    *     Use {@link #preDisableTableAction(ObserverContext, TableName)}.
718    */
719   @Deprecated
720   @Override
721   public void preDisableTableHandler(
722       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
723       throws IOException {
724   }
725
726   @Override
727   public void preDisableTableAction(
728       ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
729       throws IOException {
730   }
731
732   /**
733    * Called after the disableTable operation has been requested.  Called as part
734    * of disable table handler and it is asyn to the disable table RPC call.
735    * @param ctx the environment to interact with the framework and master
736    * @param tableName the name of the table
737    * @throws IOException if something went wrong
738    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
739    *     (<a href="https://issues.apache.org/jira/browse/HBASE-15575">HBASE-15575</a>).
740    *     Use {@link #postCompletedDisableTableAction(ObserverContext, TableName)}.
741    */
742   @Deprecated
743   @Override
744   public void postDisableTableHandler(
745       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
746       throws IOException {
747   }
748
749   @Override
750   public void postCompletedDisableTableAction(
751       ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName)
752       throws IOException {
753   }
754
755   @Override
756   public void preAbortProcedure(
757       ObserverContext<MasterCoprocessorEnvironment> ctx,
758       final ProcedureExecutor<MasterProcedureEnv> procEnv,
759       final long procId) throws IOException {
760   }
761
762   @Override
763   public void postAbortProcedure(ObserverContext<MasterCoprocessorEnvironment> ctx)
764       throws IOException {
765   }
766
767   @Override
768   public void preListProcedures(ObserverContext<MasterCoprocessorEnvironment> ctx)
769       throws IOException {
770   }
771
772   @Override
773   public void postListProcedures(
774       ObserverContext<MasterCoprocessorEnvironment> ctx,
775       List<ProcedureInfo> procInfoList) throws IOException {
776   }
777
778   @Override
779   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
780       HRegionInfo regionInfo) throws IOException {
781   }
782
783   @Override
784   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
785       HRegionInfo regionInfo) throws IOException {
786   }
787
788   @Override
789   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
790       HRegionInfo regionInfo, boolean force) throws IOException {
791   }
792
793   @Override
794   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
795       HRegionInfo regionInfo, boolean force) throws IOException {
796   }
797
798   @Override
799   public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
800     HRegionInfo regionInfo) throws IOException {
801   }
802
803   @Override
804   public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
805     HRegionInfo regionInfo) throws IOException {
806   }
807
808   @Override
809   public boolean preSetSplitOrMergeEnabled(final ObserverContext<MasterCoprocessorEnvironment> ctx,
810       final boolean newValue, final MasterSwitchType switchType) throws IOException {
811     return false;
812   }
813
814   @Override
815   public void postSetSplitOrMergeEnabled(final ObserverContext<MasterCoprocessorEnvironment> ctx,
816       final boolean newValue, final MasterSwitchType switchType) throws IOException {
817   }
818
819   @Override
820   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
821       throws IOException {
822   }
823
824   @Override
825   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
826       throws IOException {
827   }
828
829   @Override
830   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
831       boolean b) throws IOException {
832     return b;
833   }
834
835   @Override
836   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
837       boolean oldValue, boolean newValue) throws IOException {
838   }
839
840   @Override
841   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
842       throws IOException {
843   }
844
845   @Override
846   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
847       throws IOException {
848   }
849
850   @Override
851   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
852       throws IOException {
853   }
854
855   @Override
856   public void preMasterInitialization(
857       ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
858   }
859
860   @Override
861   public void start(CoprocessorEnvironment ctx) throws IOException {
862   }
863
864   @Override
865   public void stop(CoprocessorEnvironment ctx) throws IOException {
866   }
867
868   @Override
869   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
870       HRegionInfo region, ServerName srcServer, ServerName destServer)
871   throws IOException {
872   }
873
874   @Override
875   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
876       HRegionInfo region, ServerName srcServer, ServerName destServer)
877   throws IOException {
878   }
879
880   @Override
881   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
882       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
883       throws IOException {
884   }
885
886   @Override
887   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
888       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
889       throws IOException {
890   }
891
892   @Override
893   public void preListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
894       final SnapshotDescription snapshot) throws IOException {
895   }
896
897   @Override
898   public void postListSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
899       final SnapshotDescription snapshot) throws IOException {
900   }
901
902   @Override
903   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
904       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
905       throws IOException {
906   }
907
908   @Override
909   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
910       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
911       throws IOException {
912   }
913
914   @Override
915   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
916       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
917       throws IOException {
918   }
919
920   @Override
921   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
922       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
923       throws IOException {
924   }
925
926   @Override
927   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
928       final SnapshotDescription snapshot) throws IOException {
929   }
930
931   @Override
932   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
933       final SnapshotDescription snapshot) throws IOException {
934   }
935
936   @Override
937   public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
938       List<TableName> tableNamesList, List<HTableDescriptor> descriptors, String regex)
939       throws IOException {
940   }
941
942   @Override
943   public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
944       List<TableName> tableNamesList, List<HTableDescriptor> descriptors,
945       String regex) throws IOException {
946   }
947
948   @Override
949   public void preGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
950       List<HTableDescriptor> descriptors, String regex) throws IOException {
951   }
952
953   @Override
954   public void postGetTableNames(ObserverContext<MasterCoprocessorEnvironment> ctx,
955       List<HTableDescriptor> descriptors, String regex) throws IOException {
956   }
957
958   @Override
959   public void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
960       TableName tableName) throws IOException {
961   }
962
963   @Override
964   public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
965       TableName tableName) throws IOException {
966   }
967
968   @Override
969   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
970       final String userName, final Quotas quotas) throws IOException {
971   }
972
973   @Override
974   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
975       final String userName, final Quotas quotas) throws IOException {
976   }
977
978   @Override
979   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
980       final String userName, final TableName tableName, final Quotas quotas) throws IOException {
981   }
982
983   @Override
984   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
985       final String userName, final TableName tableName, final Quotas quotas) throws IOException {
986   }
987
988   @Override
989   public void preSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
990       final String userName, final String namespace, final Quotas quotas) throws IOException {
991   }
992
993   @Override
994   public void postSetUserQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
995       final String userName, final String namespace, final Quotas quotas) throws IOException {
996   }
997
998   @Override
999   public void preSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
1000       final TableName tableName, final Quotas quotas) throws IOException {
1001   }
1002
1003   @Override
1004   public void postSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
1005       final TableName tableName, final Quotas quotas) throws IOException {
1006   }
1007
1008   @Override
1009   public void preSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
1010       final String namespace, final Quotas quotas) throws IOException {
1011   }
1012
1013   @Override
1014   public void postSetNamespaceQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,
1015       final String namespace, final Quotas quotas) throws IOException {
1016   }
1017
1018   @Override
1019   public void preMoveServers(ObserverContext<MasterCoprocessorEnvironment> ctx, Set<HostAndPort>
1020       servers, String targetGroup) throws IOException {
1021   }
1022
1023   @Override
1024   public void postMoveServers(ObserverContext<MasterCoprocessorEnvironment> ctx, Set<HostAndPort>
1025       servers, String targetGroup) throws IOException {
1026   }
1027
1028   @Override
1029   public void preMoveTables(ObserverContext<MasterCoprocessorEnvironment> ctx, Set<TableName>
1030       tables, String targetGroup) throws IOException {
1031   }
1032
1033   @Override
1034   public void postMoveTables(ObserverContext<MasterCoprocessorEnvironment> ctx,
1035       Set<TableName> tables, String targetGroup) throws IOException {
1036   }
1037
1038   @Override
1039   public void preAddRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
1040       throws IOException {
1041   }
1042
1043   @Override
1044   public void postAddRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
1045       throws IOException {
1046   }
1047
1048   @Override
1049   public void preRemoveRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
1050       throws IOException {
1051
1052   }
1053
1054   @Override
1055   public void postRemoveRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String name)
1056       throws IOException {
1057   }
1058
1059   @Override
1060   public void preBalanceRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx, String groupName)
1061       throws IOException {
1062   }
1063
1064   @Override
1065   public void postBalanceRSGroup(ObserverContext<MasterCoprocessorEnvironment> ctx,
1066                                  String groupName, boolean balancerRan) throws IOException {
1067   }
1068 }