@Test public void testGetConnection() throws IOException { hbaseDataStore.getConnection("tableName"); }
public HTableInterface getConnection(String tableName) throws IOException { LOG.debug("Entering getConnection()"); HTableInterface htableResult = null; ClassLoader ocl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(HBaseConfiguration.class.getClassLoader()); if (htablePool == null || htablePool.getTable(tableName) == null) { htablePool = newHTablePool(); } if (htablePool != null) { htableResult = htablePool.getTable(tableName); LOG.debug("Obtained connection to table {}", tableName); htableResult.setAutoFlush(autoFlush); htableResult.setWriteBufferSize(writeBufferSize); } htableMap.put(tableName, htableResult); } catch (TableNotFoundException nfe) { throw nfe; } catch (IOException ioe) { closeConnection(tableName); LOG.error("Error getting connection to the table", ioe); } finally { Thread.currentThread().setContextClassLoader(ocl); } LOG.debug("Exiting getConnection()"); return htableResult; }
HBaseDataStore { public HTableInterface getConnection(String tableName) throws IOException { LOG.debug("Entering getConnection()"); HTableInterface htableResult = null; ClassLoader ocl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(HBaseConfiguration.class.getClassLoader()); if (htablePool == null || htablePool.getTable(tableName) == null) { htablePool = newHTablePool(); } if (htablePool != null) { htableResult = htablePool.getTable(tableName); LOG.debug("Obtained connection to table {}", tableName); htableResult.setAutoFlush(autoFlush); htableResult.setWriteBufferSize(writeBufferSize); } htableMap.put(tableName, htableResult); } catch (TableNotFoundException nfe) { throw nfe; } catch (IOException ioe) { closeConnection(tableName); LOG.error("Error getting connection to the table", ioe); } finally { Thread.currentThread().setContextClassLoader(ocl); } LOG.debug("Exiting getConnection()"); return htableResult; } }
HBaseDataStore { public HTableInterface getConnection(String tableName) throws IOException { LOG.debug("Entering getConnection()"); HTableInterface htableResult = null; ClassLoader ocl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(HBaseConfiguration.class.getClassLoader()); if (htablePool == null || htablePool.getTable(tableName) == null) { htablePool = newHTablePool(); } if (htablePool != null) { htableResult = htablePool.getTable(tableName); LOG.debug("Obtained connection to table {}", tableName); htableResult.setAutoFlush(autoFlush); htableResult.setWriteBufferSize(writeBufferSize); } htableMap.put(tableName, htableResult); } catch (TableNotFoundException nfe) { throw nfe; } catch (IOException ioe) { closeConnection(tableName); LOG.error("Error getting connection to the table", ioe); } finally { Thread.currentThread().setContextClassLoader(ocl); } LOG.debug("Exiting getConnection()"); return htableResult; } HBaseDataStore();  HBaseDataStore(HBaseDataStoreContext context); }
HBaseDataStore { public HTableInterface getConnection(String tableName) throws IOException { LOG.debug("Entering getConnection()"); HTableInterface htableResult = null; ClassLoader ocl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(HBaseConfiguration.class.getClassLoader()); if (htablePool == null || htablePool.getTable(tableName) == null) { htablePool = newHTablePool(); } if (htablePool != null) { htableResult = htablePool.getTable(tableName); LOG.debug("Obtained connection to table {}", tableName); htableResult.setAutoFlush(autoFlush); htableResult.setWriteBufferSize(writeBufferSize); } htableMap.put(tableName, htableResult); } catch (TableNotFoundException nfe) { throw nfe; } catch (IOException ioe) { closeConnection(tableName); LOG.error("Error getting connection to the table", ioe); } finally { Thread.currentThread().setContextClassLoader(ocl); } LOG.debug("Exiting getConnection()"); return htableResult; } HBaseDataStore();  HBaseDataStore(HBaseDataStoreContext context); HTableInterface getConnection(String tableName); void createTable(String tableName); HBaseEntity create(final HBaseEntity entity); List<HBaseEntity> create(List<HBaseEntity> entityList); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, String qualifier); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, String qualifier, long pageSize); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, List<String> qualifierList); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, List<String> qualifierList, long pageSize); List<HBaseEntity> getDataByTimeRange(String tableName, long startTime, long endTime); List<HBaseEntity> getDataByTimeRange(String tableName, List<String> filters, long startTime, long endTime); void deleteByTimestamp(String tableName, long timestamp); HBaseEntity convertResultToEntity(String tableName, Result result); void flushCommit(String tableName); void closeConnection(String tableName); void closeConnection(HTable htable); }
HBaseDataStore { public HTableInterface getConnection(String tableName) throws IOException { LOG.debug("Entering getConnection()"); HTableInterface htableResult = null; ClassLoader ocl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(HBaseConfiguration.class.getClassLoader()); if (htablePool == null || htablePool.getTable(tableName) == null) { htablePool = newHTablePool(); } if (htablePool != null) { htableResult = htablePool.getTable(tableName); LOG.debug("Obtained connection to table {}", tableName); htableResult.setAutoFlush(autoFlush); htableResult.setWriteBufferSize(writeBufferSize); } htableMap.put(tableName, htableResult); } catch (TableNotFoundException nfe) { throw nfe; } catch (IOException ioe) { closeConnection(tableName); LOG.error("Error getting connection to the table", ioe); } finally { Thread.currentThread().setContextClassLoader(ocl); } LOG.debug("Exiting getConnection()"); return htableResult; } HBaseDataStore();  HBaseDataStore(HBaseDataStoreContext context); HTableInterface getConnection(String tableName); void createTable(String tableName); HBaseEntity create(final HBaseEntity entity); List<HBaseEntity> create(List<HBaseEntity> entityList); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, String qualifier); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, String qualifier, long pageSize); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, List<String> qualifierList); List<HBaseEntity> getDataByRowFamilyQualifier(String tableName, String startRow, String endRow,
            String family, List<String> qualifierList, long pageSize); List<HBaseEntity> getDataByTimeRange(String tableName, long startTime, long endTime); List<HBaseEntity> getDataByTimeRange(String tableName, List<String> filters, long startTime, long endTime); void deleteByTimestamp(String tableName, long timestamp); HBaseEntity convertResultToEntity(String tableName, Result result); void flushCommit(String tableName); void closeConnection(String tableName); void closeConnection(HTable htable);  }