37
37
import java .util .concurrent .ExecutorService ;
38
38
import java .util .concurrent .locks .ReentrantLock ;
39
39
40
- public class OHTableClient implements HTableInterface , Lifecycle {
40
+ public class OHTableClient implements Table , Lifecycle {
41
41
private byte [] tableName ;
42
42
private String tableNameString ;
43
43
private ReentrantLock lock = new ReentrantLock ();
@@ -140,36 +140,6 @@ private void checkStatus() throws IllegalStateException {
140
140
}
141
141
}
142
142
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
-
173
143
@ Override
174
144
public <R extends Message > Map <byte [], R > batchCoprocessorService (Descriptors .MethodDescriptor methodDescriptor ,
175
145
Message request ,
@@ -227,11 +197,6 @@ public int getRpcTimeout() {
227
197
return ohTable .getRpcTimeout ();
228
198
}
229
199
230
- @ Override
231
- public byte [] getTableName () {
232
- return tableName ;
233
- }
234
-
235
200
@ Override
236
201
public TableName getName () {
237
202
return ohTable .getName ();
@@ -250,6 +215,11 @@ public HTableDescriptor getTableDescriptor() throws IOException {
250
215
return ohTable .getTableDescriptor ();
251
216
}
252
217
218
+ @ Override
219
+ public TableDescriptor getDescriptor () throws IOException {
220
+ return null ;
221
+ }
222
+
253
223
@ Override
254
224
public boolean exists (Get get ) throws IOException {
255
225
checkStatus ();
@@ -263,7 +233,7 @@ public boolean[] existsAll(List<Get> list) throws IOException {
263
233
}
264
234
265
235
@ Override
266
- public Boolean [] exists (List <Get > gets ) throws IOException {
236
+ public boolean [] exists (List <Get > gets ) throws IOException {
267
237
checkStatus ();
268
238
return ohTable .exists (gets );
269
239
}
@@ -276,13 +246,6 @@ public void batch(List<? extends Row> actions, Object[] results) throws IOExcept
276
246
ohTable .batch (actions , results );
277
247
}
278
248
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
-
286
249
@ Override
287
250
public <R > void batchCallback (List <? extends Row > actions , Object [] results ,
288
251
Batch .Callback <R > callback ) throws IOException ,
@@ -291,14 +254,6 @@ public <R> void batchCallback(List<? extends Row> actions, Object[] results,
291
254
ohTable .batchCallback (actions , results , callback );
292
255
}
293
256
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
-
302
257
@ Override
303
258
public Result get (Get get ) throws IOException {
304
259
checkStatus ();
@@ -311,13 +266,6 @@ public Result[] get(List<Get> gets) throws IOException {
311
266
return ohTable .get (gets );
312
267
}
313
268
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
-
321
269
@ Override
322
270
public ResultScanner getScanner (Scan scan ) throws IOException {
323
271
checkStatus ();
@@ -423,25 +371,6 @@ public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, lo
423
371
return ohTable .incrementColumnValue (row , family , qualifier , amount , durability );
424
372
}
425
373
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
-
445
374
public String getTableNameString () {
446
375
return tableNameString ;
447
376
}
0 commit comments