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 preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
87        TableName tableName) throws IOException {
88    }
89  
90    @Override
91    public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
92        TableName tableName) throws IOException {
93    }
94  
95    @Override
96    public void preTruncateTableHandler(
97        final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
98        throws IOException {
99    }
100 
101   @Override
102   public void postTruncateTableHandler(
103       final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
104       throws IOException {
105   }
106 
107   @Override
108   public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
109       TableName tableName, HTableDescriptor htd) throws IOException {
110   }
111 
112   @Override
113   public void postModifyTableHandler(
114       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
115       HTableDescriptor htd) throws IOException {
116   }
117 
118   @Override
119   public void preModifyTableHandler(
120       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
121       HTableDescriptor htd) throws IOException {
122   }
123 
124   @Override
125   public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
126       TableName tableName, HTableDescriptor htd) throws IOException {
127   }
128 
129   @Override
130   public void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
131   }
132 
133   @Override
134   public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
135   }
136 
137   @Override
138   public void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
139   }
140 
141   @Override
142   public void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOException {
143   }
144 
145   @Override
146   public void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
147   }
148 
149   @Override
150   public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns) throws IOException {
151   }
152 
153   @Override
154   public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
155       TableName tableName, HColumnDescriptor column) throws IOException {
156   }
157 
158   @Override
159   public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
160       TableName tableName, HColumnDescriptor column) throws IOException {
161   }
162 
163   @Override
164   public void preAddColumnHandler(
165       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
166       HColumnDescriptor column) throws IOException {
167   }
168 
169   @Override
170   public void postAddColumnHandler(
171       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
172       HColumnDescriptor column) throws IOException {
173   }
174 
175   @Override
176   public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
177       TableName tableName, HColumnDescriptor descriptor) throws IOException {
178   }
179 
180   @Override
181   public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
182       TableName tableName, HColumnDescriptor descriptor) throws IOException {
183   }
184 
185   @Override
186   public void preModifyColumnHandler(
187       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
188       HColumnDescriptor descriptor) throws IOException {
189   }
190 
191   @Override
192   public void postModifyColumnHandler(
193       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
194       HColumnDescriptor descriptor) throws IOException {
195   }
196 
197   @Override
198   public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
199       TableName tableName, byte[] c) throws IOException {
200   }
201 
202   @Override
203   public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
204       TableName tableName, byte[] c) throws IOException {
205   }
206 
207   @Override
208   public void preDeleteColumnHandler(
209       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
210       byte[] c) throws IOException {
211   }
212 
213   @Override
214   public void postDeleteColumnHandler(
215       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName,
216       byte[] c) throws IOException {
217   }
218 
219 
220   @Override
221   public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
222       TableName tableName) throws IOException {
223   }
224 
225   @Override
226   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
227       TableName tableName) throws IOException {
228   }
229 
230   @Override
231   public void preEnableTableHandler(
232       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
233       throws IOException {
234   }
235 
236   @Override
237   public void postEnableTableHandler(
238       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
239       throws IOException {
240   }
241 
242   @Override
243   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
244       TableName tableName) throws IOException {
245   }
246 
247   @Override
248   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
249       TableName tableName) throws IOException {
250   }
251 
252   @Override
253   public void preDisableTableHandler(
254       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
255       throws IOException {
256   }
257 
258   @Override
259   public void postDisableTableHandler(
260       ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
261       throws IOException {
262   }
263 
264   @Override
265   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
266       HRegionInfo regionInfo) throws IOException {
267   }
268 
269   @Override
270   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
271       HRegionInfo regionInfo) throws IOException {
272   }
273 
274   @Override
275   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
276       HRegionInfo regionInfo, boolean force) throws IOException {
277   }
278 
279   @Override
280   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
281       HRegionInfo regionInfo, boolean force) throws IOException {
282   }
283 
284   @Override
285   public void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
286     HRegionInfo regionInfo) throws IOException {
287   }
288 
289   @Override
290   public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
291     HRegionInfo regionInfo) throws IOException {
292   }
293 
294   @Override
295   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
296       throws IOException {
297   }
298 
299   @Override
300   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
301       throws IOException {
302   }
303 
304   @Override
305   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
306       boolean b) throws IOException {
307     return b;
308   }
309 
310   @Override
311   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
312       boolean oldValue, boolean newValue) throws IOException {
313   }
314 
315   @Override
316   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
317       throws IOException {
318   }
319 
320   @Override
321   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
322       throws IOException {
323   }
324 
325   @Override
326   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
327       throws IOException {
328   }
329 
330   @Override
331   public void preMasterInitialization(
332       ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException {
333   }
334   
335   @Override
336   public void start(CoprocessorEnvironment ctx) throws IOException {
337   }
338 
339   @Override
340   public void stop(CoprocessorEnvironment ctx) throws IOException {
341   }
342 
343   @Override
344   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
345       HRegionInfo region, ServerName srcServer, ServerName destServer)
346   throws IOException {
347   }
348 
349   @Override
350   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
351       HRegionInfo region, ServerName srcServer, ServerName destServer)
352   throws IOException {
353   }
354 
355   @Override
356   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
357       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
358       throws IOException {
359   }
360 
361   @Override
362   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
363       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
364       throws IOException {
365   }
366 
367   @Override
368   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
369       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
370       throws IOException {
371   }
372 
373   @Override
374   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
375       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
376       throws IOException {
377   }
378 
379   @Override
380   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
381       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
382       throws IOException {
383   }
384 
385   @Override
386   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
387       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
388       throws IOException {
389   }
390 
391   @Override
392   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
393       final SnapshotDescription snapshot) throws IOException {
394   }
395 
396   @Override
397   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
398       final SnapshotDescription snapshot) throws IOException {
399   }
400 
401   @Override
402   public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
403       List<TableName> tableNamesList, List<HTableDescriptor> descriptors)
404       throws IOException {
405   }
406 
407   @Override
408   public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
409       List<HTableDescriptor> descriptors) throws IOException {
410   }
411 
412   @Override
413   public void preTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
414       TableName tableName) throws IOException {
415   }
416 
417   @Override
418   public void postTableFlush(ObserverContext<MasterCoprocessorEnvironment> ctx,
419       TableName tableName) throws IOException {
420   }
421 
422 }