@@ -220,8 +220,7 @@ public OHTable(Configuration configuration, String tableName) throws IOException
220
220
DEFAULT_HBASE_HTABLE_THREAD_KEEP_ALIVE_TIME );
221
221
this .executePool = createDefaultThreadPoolExecutor (1 , maxThreads , keepAliveTime );
222
222
OHConnectionConfiguration ohConnectionConf = new OHConnectionConfiguration (configuration );
223
- int numRetries = configuration .getInt (HConstants .HBASE_CLIENT_RETRIES_NUMBER ,
224
- HConstants .DEFAULT_HBASE_CLIENT_RETRIES_NUMBER );
223
+ int numRetries = ohConnectionConf .getNumRetries ();
225
224
this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
226
225
this .tableNameString , ohConnectionConf ));
227
226
this .obTableClient .setRpcExecuteTimeout (ohConnectionConf .getRpcTimeout ());
@@ -273,8 +272,7 @@ public OHTable(Configuration configuration, final byte[] tableName,
273
272
this .executePool = executePool ;
274
273
this .cleanupPoolOnClose = false ;
275
274
OHConnectionConfiguration ohConnectionConf = new OHConnectionConfiguration (configuration );
276
- int numRetries = configuration .getInt (HConstants .HBASE_CLIENT_RETRIES_NUMBER ,
277
- HConstants .DEFAULT_HBASE_CLIENT_RETRIES_NUMBER );
275
+ int numRetries = ohConnectionConf .getNumRetries ();
278
276
this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
279
277
this .tableNameString , ohConnectionConf ));
280
278
this .obTableClient .setRpcExecuteTimeout (ohConnectionConf .getRpcTimeout ());
@@ -345,8 +343,7 @@ public OHTable(TableName tableName, Connection connection,
345
343
DEFAULT_HBASE_HTABLE_PUT_WRITE_BUFFER_CHECK );
346
344
this .writeBufferSize = connectionConfig .getWriteBufferSize ();
347
345
this .tableName = tableName .getName ();
348
- int numRetries = configuration .getInt (HConstants .HBASE_CLIENT_RETRIES_NUMBER ,
349
- HConstants .DEFAULT_HBASE_CLIENT_RETRIES_NUMBER );
346
+ int numRetries = connectionConfig .getNumRetries ();
350
347
this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
351
348
this .tableNameString , connectionConfig ));
352
349
this .obTableClient .setRpcExecuteTimeout (rpcTimeout );
@@ -389,8 +386,7 @@ public OHTable(Connection connection, ObTableBuilderBase builder,
389
386
this .putWriteBufferCheck = this .configuration .getInt (HBASE_HTABLE_PUT_WRITE_BUFFER_CHECK ,
390
387
DEFAULT_HBASE_HTABLE_PUT_WRITE_BUFFER_CHECK );
391
388
this .writeBufferSize = connectionConfig .getWriteBufferSize ();
392
- int numRetries = configuration .getInt (HConstants .HBASE_CLIENT_RETRIES_NUMBER ,
393
- HConstants .DEFAULT_HBASE_CLIENT_RETRIES_NUMBER );
389
+ int numRetries = connectionConfig .getNumRetries ();
394
390
this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
395
391
this .tableNameString , connectionConfig ));
396
392
this .obTableClient .setRpcExecuteTimeout (rpcTimeout );
@@ -462,7 +458,7 @@ private void finishSetUp() {
462
458
WRITE_BUFFER_SIZE_DEFAULT );
463
459
}
464
460
465
- private OHConnectionConfiguration setUserDefinedNamespace (String tableNameString ,
461
+ public static OHConnectionConfiguration setUserDefinedNamespace (String tableNameString ,
466
462
OHConnectionConfiguration ohConnectionConf )
467
463
throws IllegalArgumentException {
468
464
if (tableNameString .indexOf (':' ) != -1 ) {
0 commit comments