View Javadoc

1   /*
2    * Copyright 2010 The Apache Software Foundation
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   * http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package org.apache.hadoop.hbase.coprocessor;
22  
23  import org.apache.hadoop.hbase.HColumnDescriptor;
24  import org.apache.hadoop.hbase.HRegionInfo;
25  import org.apache.hadoop.hbase.CoprocessorEnvironment;
26  import org.apache.hadoop.hbase.HTableDescriptor;
27  import org.apache.hadoop.hbase.ServerName;
28  import org.apache.hadoop.hbase.UnknownRegionException;
29  import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
30  
31  import java.io.IOException;
32  import java.util.List;
33  
34  public class BaseMasterObserver implements MasterObserver {
35    @Override
36    public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
37        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
38    }
39  
40    @Override
41    public void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
42        HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
43    }
44  
45    @Override
46    public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
47        byte[] tableName) throws IOException {
48    }
49  
50    @Override
51    public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
52        byte[] tableName) throws IOException {
53    }
54  
55    @Override
56    public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
57        byte[] tableName, HTableDescriptor htd) throws IOException {
58    }
59  
60    @Override
61    public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
62        byte[] tableName, HTableDescriptor htd) throws IOException {
63    }
64  
65    @Override
66    public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
67        byte[] tableName, HColumnDescriptor column) throws IOException {
68    }
69  
70    @Override
71    public void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
72        byte[] tableName, HColumnDescriptor column) throws IOException {
73    }
74  
75    @Override
76    public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
77        byte[] tableName, HColumnDescriptor descriptor) throws IOException {
78    }
79  
80    @Override
81    public void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
82        byte[] tableName, HColumnDescriptor descriptor) throws IOException {
83    }
84  
85    @Override
86    public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
87        byte[] tableName, byte[] c) throws IOException {
88    }
89  
90    @Override
91    public void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
92        byte[] tableName, byte[] c) throws IOException {
93    }
94  
95    @Override
96    public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
97        byte[] tableName) throws IOException {
98    }
99  
100   @Override
101   public void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
102       byte[] tableName) throws IOException {
103   }
104 
105   @Override
106   public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
107       byte[] tableName) throws IOException {
108   }
109 
110   @Override
111   public void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
112       byte[] tableName) throws IOException {
113   }
114 
115   @Override
116   public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
117       HRegionInfo regionInfo) throws IOException {
118   }
119   
120   @Override
121   public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
122       HRegionInfo regionInfo) throws IOException {
123   }
124 
125   @Override
126   public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
127       HRegionInfo regionInfo, boolean force) throws IOException {
128   }
129 
130   @Override
131   public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
132       HRegionInfo regionInfo, boolean force) throws IOException {
133   }
134 
135   @Override
136   public void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
137       throws IOException {
138   }
139 
140   @Override
141   public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
142       throws IOException {
143   }
144 
145   @Override
146   public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
147       boolean b) throws IOException {
148     return b;
149   }
150 
151   @Override
152   public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
153       boolean oldValue, boolean newValue) throws IOException {
154   }
155 
156   @Override
157   public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
158       throws IOException {
159   }
160 
161   @Override
162   public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
163       throws IOException {
164   }
165 
166   @Override
167   public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
168       throws IOException {
169   }
170 
171   @Override
172   public void start(CoprocessorEnvironment ctx) throws IOException {
173   }
174 
175   @Override
176   public void stop(CoprocessorEnvironment ctx) throws IOException {
177   }
178 
179   @Override
180   public void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
181       HRegionInfo region, ServerName srcServer, ServerName destServer)
182   throws IOException {
183   }
184 
185   @Override
186   public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
187       HRegionInfo region, ServerName srcServer, ServerName destServer)
188   throws IOException {
189   }
190 
191   @Override
192   public void preSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
193       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
194       throws IOException {
195   }
196 
197   @Override
198   public void postSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
199       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
200       throws IOException {
201   }
202 
203   @Override
204   public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
205       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
206       throws IOException {
207   }
208 
209   @Override
210   public void postCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
211       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
212       throws IOException {
213   }
214 
215   @Override
216   public void preRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
217       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
218       throws IOException {
219   }
220 
221   @Override
222   public void postRestoreSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
223       final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor)
224       throws IOException {
225   }
226 
227   @Override
228   public void preDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
229       final SnapshotDescription snapshot) throws IOException {
230   }
231 
232   @Override
233   public void postDeleteSnapshot(final ObserverContext<MasterCoprocessorEnvironment> ctx,
234       final SnapshotDescription snapshot) throws IOException {
235   }
236 
237   @Override
238   public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
239       List<String> tableNamesList, List<HTableDescriptor> descriptors) throws IOException {
240   }
241 
242   @Override
243   public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
244       List<HTableDescriptor> descriptors) throws IOException {
245   }
246 }