3737import java .util .concurrent .ExecutorService ;
3838import java .util .concurrent .locks .ReentrantLock ;
3939
40- public class OHTableClient implements HTableInterface , Lifecycle {
40+ public class OHTableClient implements Table , Lifecycle {
4141 private byte [] tableName ;
4242 private String tableNameString ;
4343 private ReentrantLock lock = new ReentrantLock ();
@@ -140,36 +140,6 @@ private void checkStatus() throws IllegalStateException {
140140 }
141141 }
142142
143- @ Override
144- public void setAutoFlush (boolean autoFlush ) {
145- checkStatus ();
146- ohTable .setAutoFlush (autoFlush );
147- }
148-
149- @ Override
150- public void setAutoFlush (boolean autoFlush , boolean clearBufferOnFail ) {
151- checkStatus ();
152- ohTable .setAutoFlush (autoFlush , clearBufferOnFail );
153- }
154-
155- @ Override
156- public void setAutoFlushTo (boolean autoFlush ) {
157- checkStatus ();
158- ohTable .setAutoFlushTo (autoFlush );
159- }
160-
161- @ Override
162- public long getWriteBufferSize () {
163- checkStatus ();
164- return ohTable .getWriteBufferSize ();
165- }
166-
167- @ Override
168- public void setWriteBufferSize (long writeBufferSize ) throws IOException {
169- checkStatus ();
170- ohTable .setWriteBufferSize (writeBufferSize );
171- }
172-
173143 @ Override
174144 public <R extends Message > Map <byte [], R > batchCoprocessorService (Descriptors .MethodDescriptor methodDescriptor ,
175145 Message request ,
@@ -227,11 +197,6 @@ public int getRpcTimeout() {
227197 return ohTable .getRpcTimeout ();
228198 }
229199
230- @ Override
231- public byte [] getTableName () {
232- return tableName ;
233- }
234-
235200 @ Override
236201 public TableName getName () {
237202 return ohTable .getName ();
@@ -250,6 +215,11 @@ public HTableDescriptor getTableDescriptor() throws IOException {
250215 return ohTable .getTableDescriptor ();
251216 }
252217
218+ @ Override
219+ public TableDescriptor getDescriptor () throws IOException {
220+ return null ;
221+ }
222+
253223 @ Override
254224 public boolean exists (Get get ) throws IOException {
255225 checkStatus ();
@@ -263,7 +233,7 @@ public boolean[] existsAll(List<Get> list) throws IOException {
263233 }
264234
265235 @ Override
266- public Boolean [] exists (List <Get > gets ) throws IOException {
236+ public boolean [] exists (List <Get > gets ) throws IOException {
267237 checkStatus ();
268238 return ohTable .exists (gets );
269239 }
@@ -276,13 +246,6 @@ public void batch(List<? extends Row> actions, Object[] results) throws IOExcept
276246 ohTable .batch (actions , results );
277247 }
278248
279- // Not support.
280- @ Override
281- public Object [] batch (List <? extends Row > actions ) throws IOException , InterruptedException {
282- checkStatus ();
283- return ohTable .batch (actions );
284- }
285-
286249 @ Override
287250 public <R > void batchCallback (List <? extends Row > actions , Object [] results ,
288251 Batch .Callback <R > callback ) throws IOException ,
@@ -291,14 +254,6 @@ public <R> void batchCallback(List<? extends Row> actions, Object[] results,
291254 ohTable .batchCallback (actions , results , callback );
292255 }
293256
294- @ Override
295- public <R > Object [] batchCallback (List <? extends Row > actions , Batch .Callback <R > callback )
296- throws IOException ,
297- InterruptedException {
298- checkStatus ();
299- return ohTable .batchCallback (actions , callback );
300- }
301-
302257 @ Override
303258 public Result get (Get get ) throws IOException {
304259 checkStatus ();
@@ -311,13 +266,6 @@ public Result[] get(List<Get> gets) throws IOException {
311266 return ohTable .get (gets );
312267 }
313268
314- // Not support.
315- @ Override
316- public Result getRowOrBefore (byte [] row , byte [] family ) throws IOException {
317- checkStatus ();
318- return ohTable .getRowOrBefore (row , family );
319- }
320-
321269 @ Override
322270 public ResultScanner getScanner (Scan scan ) throws IOException {
323271 checkStatus ();
@@ -423,25 +371,6 @@ public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, lo
423371 return ohTable .incrementColumnValue (row , family , qualifier , amount , durability );
424372 }
425373
426- @ Override
427- public long incrementColumnValue (byte [] row , byte [] family , byte [] qualifier , long amount ,
428- boolean writeToWAL ) throws IOException {
429- checkStatus ();
430- return ohTable .incrementColumnValue (row , family , qualifier , amount , writeToWAL );
431- }
432-
433- @ Override
434- public boolean isAutoFlush () {
435- checkStatus ();
436- return ohTable .isAutoFlush ();
437- }
438-
439- @ Override
440- public void flushCommits () throws IOException {
441- checkStatus ();
442- ohTable .flushCommits ();
443- }
444-
445374 public String getTableNameString () {
446375 return tableNameString ;
447376 }
0 commit comments