@Override public ConnectionMask createConnection(Configuration conf) throws IOException { return new HConnection0_94(HConnectionManager.createConnection(conf)); }
@Override public ConnectionMask createConnection(Configuration conf) throws IOException { return new HConnection0_98(HConnectionManager.createConnection(conf)); }
@Override public ConnectionMask createConnection(Configuration conf) throws IOException { return new HConnection0_96(HConnectionManager.createConnection(conf)); }
public synchronized static void waitForConnection(long timeout, TimeUnit timeoutUnit) { long before = System.currentTimeMillis(); long after; long timeoutMS = TimeUnit.MILLISECONDS.convert(timeout, timeoutUnit); do { try { HConnection hc = HConnectionManager.createConnection(HBaseConfiguration.create()); hc.close(); after = System.currentTimeMillis(); log.info("HBase server to started after about {} ms", after - before); return; } catch (IOException e) { log.info("Exception caught while waiting for the HBase server to start", e); } after = System.currentTimeMillis(); } while (timeoutMS > after - before); after = System.currentTimeMillis(); log.warn("HBase server did not start in {} ms", after - before); }
synchronized (THREAD_COUNT) { if (hConn == null) { hConn = HConnectionManager.createConnection(CONFIG);
@Override public HConnection createConnection(Configuration conf) throws ZooKeeperConnectionException { return HConnectionManager.createConnection(conf); } }
@Override public boolean initializeAdapter(Map<String, Object> config) { // Initialize HBase Table Configuration conf = null; conf = HBaseConfiguration.create(); conf.set("hbase.zookeeper.quorum", _quorum); conf.set("hbase.zookeeper.property.clientPort", _port); try { LOGGER.debug("=======Connecting to HBASE==========="); LOGGER.debug("=======ZOOKEEPER = {}", conf.get("hbase.zookeeper.quorum")); HConnection connection = HConnectionManager.createConnection(conf); table = connection.getTable(_tableName); return true; } catch (IOException e) { LOGGER.debug("=======Unable to Connect to HBASE==========="); e.printStackTrace(); } return false; }
public static HConnection get(String url) { // find configuration Configuration conf = ConfigCache.get(url); if (conf == null) { conf = HadoopUtil.newHBaseConfiguration(url); ConfigCache.put(url, conf); } HConnection connection = ConnPool.get(url); try { // I don't use DCL since recreate a connection is not a big issue. if (connection == null) { connection = HConnectionManager.createConnection(conf); ConnPool.put(url, connection); } } catch (Throwable t) { throw new StorageException("Error when open connection " + url, t); } return connection; }
ResultScanner scanner = null; try { conn = HConnectionManager.createConnection(hconf); table = conn.getTable(hbaseTable); scanner = table.getScanner(scan);
private HConnection connection(Configuration configuration) { try { return HConnectionManager.createConnection(configuration); } catch (ZooKeeperConnectionException e) { throw new IllegalArgumentException(e); } }
private HConnection connection() { try { return HConnectionManager.createConnection(this.configuration); } catch (ZooKeeperConnectionException e) { throw new IllegalArgumentException(e); } }
private HConnection connection() { try { return HConnectionManager.createConnection(this.configuration); } catch (ZooKeeperConnectionException e) { throw new IllegalArgumentException(e); } }
public ThemisTableRecordWriterBase(Configuration conf) throws IOException { connection = HConnectionManager.createConnection(conf); this.logPerWriteTransaction = conf.getInt(LOG_PER_WRITE_TRANSACTION_COUNT, 100); this.writeRetryCount = conf.getInt(THEMIS_WRITE_RETRY_COUNT, 1); this.writeRetryPause = conf.getInt(THEMIS_WRITE_RETRY_PAUSE, 1000); }
public HConnection getConnection() throws IOException { synchronized(connMap) { HConnectionKey key = new HConnectionKey(hbaseConf); HConnection conn = connMap.get(key); if (conn == null) { conn = HConnectionManager.createConnection(hbaseConf); connMap.put(key, conn); } return conn; } }
@Override public ConnectionMask createConnection(Configuration conf) throws IOException { return new HConnection0_98(HConnectionManager.createConnection(conf)); }
public WarcBrowserServlet() throws IOException, MasterNotRunningException, ZooKeeperConnectionException { this.hbaseConfig = HBaseConfiguration.create(); hbaseAdmin = new HBaseAdmin(hbaseConfig); hbaseConnection = HConnectionManager.createConnection(hbaseConfig); }
public HConnection getConnection() throws IOException { synchronized(connMap) { HConnectionKey key = new HConnectionKey(hbaseConf); HConnection conn = connMap.get(key); if (conn == null) { conn = HConnectionManager.createConnection(hbaseConf); connMap.put(key, conn); } return conn; } }
@Override public ConnectionMask createConnection(Configuration conf) throws IOException { return new HConnection0_98(HConnectionManager.createConnection(conf)); }
@Before public void setup() throws Exception { this.createTestMetadata(); this.ii = IIManager.getInstance(getTestConfig()).getII("test_kylin_ii"); this.seg = ii.getFirstSegment(); String hbaseUrl = KylinConfig.getInstanceFromEnv().getStorageUrl(); Configuration hconf = HadoopUtil.newHBaseConfiguration(hbaseUrl); hconn = HConnectionManager.createConnection(hconf); this.info = new TableRecordInfo(seg); }
/** {@inheritDoc} */ @Override public HConnection getHConnection(Fiji fiji) { try { return HConnectionManager.createConnection(fiji.getConf()); } catch (IOException ioe) { throw new FijiIOException("Couldn't create an HConnection.", ioe); } }