@@ -220,8 +220,7 @@ public OHTable(Configuration configuration, String tableName) throws IOException
220220 DEFAULT_HBASE_HTABLE_THREAD_KEEP_ALIVE_TIME );
221221 this .executePool = createDefaultThreadPoolExecutor (1 , maxThreads , keepAliveTime );
222222 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 ();
225224 this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
226225 this .tableNameString , ohConnectionConf ));
227226 this .obTableClient .setRpcExecuteTimeout (ohConnectionConf .getRpcTimeout ());
@@ -273,8 +272,7 @@ public OHTable(Configuration configuration, final byte[] tableName,
273272 this .executePool = executePool ;
274273 this .cleanupPoolOnClose = false ;
275274 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 ();
278276 this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
279277 this .tableNameString , ohConnectionConf ));
280278 this .obTableClient .setRpcExecuteTimeout (ohConnectionConf .getRpcTimeout ());
@@ -345,8 +343,7 @@ public OHTable(TableName tableName, Connection connection,
345343 DEFAULT_HBASE_HTABLE_PUT_WRITE_BUFFER_CHECK );
346344 this .writeBufferSize = connectionConfig .getWriteBufferSize ();
347345 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 ();
350347 this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
351348 this .tableNameString , connectionConfig ));
352349 this .obTableClient .setRpcExecuteTimeout (rpcTimeout );
@@ -389,8 +386,7 @@ public OHTable(Connection connection, ObTableBuilderBase builder,
389386 this .putWriteBufferCheck = this .configuration .getInt (HBASE_HTABLE_PUT_WRITE_BUFFER_CHECK ,
390387 DEFAULT_HBASE_HTABLE_PUT_WRITE_BUFFER_CHECK );
391388 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 ();
394390 this .obTableClient = ObTableClientManager .getOrCreateObTableClient (setUserDefinedNamespace (
395391 this .tableNameString , connectionConfig ));
396392 this .obTableClient .setRpcExecuteTimeout (rpcTimeout );
@@ -462,7 +458,7 @@ private void finishSetUp() {
462458 WRITE_BUFFER_SIZE_DEFAULT );
463459 }
464460
465- private OHConnectionConfiguration setUserDefinedNamespace (String tableNameString ,
461+ public static OHConnectionConfiguration setUserDefinedNamespace (String tableNameString ,
466462 OHConnectionConfiguration ohConnectionConf )
467463 throws IllegalArgumentException {
468464 if (tableNameString .indexOf (':' ) != -1 ) {
0 commit comments