@Override protected Object createPoolOrConnection() { hTablePool = new HTablePool(conf, poolSize); return hTablePool; }
hTablePool = new HTablePool(conf, 1); try
@Override protected Object createPoolOrConnection() { hTablePool = new HTablePool(conf, poolSize); return hTablePool; }
@Override protected Object createPoolOrConnection() { hTablePool = new HTablePool(conf, poolSize); return hTablePool; }
public OldHBaseIdService(Configuration configuration, byte[] lookupTable, byte[] counterTable, byte[] cf, byte[] uniqueCubeName) { pool = new HTablePool(configuration, Integer.MAX_VALUE); this.lookupTable = lookupTable; this.counterTable = counterTable; this.uniqueCubeName = uniqueCubeName; this.cf = cf; }
/** * Constructor with existing configuration * @param conf existing configuration * @throws IOException. */ RESTServlet(Configuration conf) throws IOException { this.conf = conf; int maxSize = conf.getInt("hbase.rest.htablepool.size", 10); this.pool = new HTablePool(conf, maxSize); this.admin = new HBaseAdmin(conf); }
HBaseImpl(final Configuration c) throws IOException { conf = c; admin = new HBaseAdmin(conf); htablePool = new HTablePool(conf, 10); scannerMap = new HashMap<Integer, ResultScanner>(); }
protected HBase(Class<QUERY_OP_TYPE> whereClauseType, Class<ROW_ID_TYPE> idType, Configuration conf) { this.whereClauseType = whereClauseType; this.idType = idType; this.conf = conf; this.pool = new HTablePool(conf, 16); setupAutoFlushOnShutdown(); }
public HTableProvider(final Configuration configuration) { String hTableName = configuration.get(ConfigConstants.TABLE_NAME); long writeBufferSize = configuration.getLong(ConfigConstants.WRITE_BUFFER, ConfigConstants.DEFAULT_WRITE_BUFFER); int poolSize = configuration.getInt(ConfigConstants.TABLE_POOL_SIZE, ConfigConstants.DEFAULT_TABLE_POOL_SIZE); boolean autoFlush = configuration.getBoolean(ConfigConstants.AUTO_FLUSH, ConfigConstants.DEFAULT_AUTO_FLUSH); tableName = hTableName; tablePool = new HTablePool(configuration, poolSize, new HTableFactory(writeBufferSize, autoFlush)); }
private EagleConfigFactory() { init(); if (this.getStorageType() == null || this.getStorageType().equalsIgnoreCase("hbase")) { this.pool = new HTablePool(this.hbaseConf, 10); } }
private EagleConfigFactory(){ init(); if(this.getStorageType() == null || this.getStorageType().equalsIgnoreCase("hbase")) { this.pool = new HTablePool(this.hbaseConf, 10); } }
@Before public void beforeTest() throws Exception { tablePool = new HTablePool(HBaseTestUtils.getConf(), 10); }
public static HTablePool startHBaseAndGetPool() throws Exception { getMiniCluster(); return new HTablePool(getConf(), 10); }
@Before public void beforeTest() throws Exception { HBaseTestUtils.util.truncateTable(Bytes.toBytes(tableName)); tablePool = new HTablePool(HBaseTestUtils.getConf(), 10); }
@Before public void before() throws Exception { tableName = UUID.randomUUID().toString().substring(0, 8); tablePool = new HTablePool(HBaseTestUtils.getConf(), 10); manager = new DefaultSchemaManager(tablePool); tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()), manager); }
public CubeWrapper(byte[] table, byte[] cf) throws Exception { HTablePool pool = new HTablePool(getTestUtil().getConfiguration(), Integer.MAX_VALUE); DbHarness<LongOp> hbaseDbHarness = new HBaseDbHarness<LongOp>(pool, ArrayUtils.EMPTY_BYTE_ARRAY, table, cf, LongOp.DESERIALIZER, idService, CommitType.INCREMENT, "scope"); dataCubeIo = new DataCubeIo<LongOp>(dataCube, hbaseDbHarness, 1, Long.MAX_VALUE, SyncLevel.FULL_SYNC, "scope", true); }
/** * Simple helper function that creates a DataCubeIo for a given DataCube that will write to the * given HBase table. */ private static DataCubeIo<LongOp> makeDataCubeIo(DataCube<LongOp> cube, byte[] table) throws Exception { HTablePool pool = new HTablePool(getTestUtil().getConfiguration(), Integer.MAX_VALUE); DbHarness<LongOp> dbHarness = new HBaseDbHarness<LongOp>(pool, ArrayUtils.EMPTY_BYTE_ARRAY, table, CF, LongOp.DESERIALIZER, idService, CommitType.INCREMENT, "scope"); return new DataCubeIo<LongOp>(cube, dbHarness, 1, Long.MAX_VALUE, SyncLevel.FULL_SYNC, "scope", true); } }
@Test public void hbaseForCubeDataTestMulti() throws Exception { IdService idService = new MapIdService(); HTablePool pool = new HTablePool(getTestUtil().getConfiguration(), Integer.MAX_VALUE); DbHarness<LongOp> hbaseDbHarness = new HBaseDbHarness<LongOp>(pool, "hbaseForCubeDataTest".getBytes(), CUBE_DATA_TABLE, CF, LongOp.DESERIALIZER, idService, CommitType.INCREMENT, "scope"); DbHarnessTests.multiGetTest(hbaseDbHarness); }
@Test public void hbaseForCubeDataTest() throws Exception { IdService idService = new MapIdService(); HTablePool pool = new HTablePool(getTestUtil().getConfiguration(), Integer.MAX_VALUE); DbHarness<LongOp> hbaseDbHarness = new HBaseDbHarness<LongOp>(pool, "hbaseForCubeDataTest".getBytes(), CUBE_DATA_TABLE, CF, LongOp.DESERIALIZER, idService, CommitType.INCREMENT, "scope"); DbHarnessTests.basicTest(hbaseDbHarness); }
@Before public void before() throws Exception { tablePool = new HTablePool(HBaseTestUtils.getConf(), 10); SchemaTool tool = new SchemaTool(new HBaseAdmin(HBaseTestUtils.getConf()), new DefaultSchemaManager(tablePool)); tool.createOrMigrateSchema(tableName, testRecord, true); tool.createOrMigrateSchema(tableName, testRecordv2, true); tool.createOrMigrateSchema(compositeTableName, compositeSubrecord1, true); tool.createOrMigrateSchema(compositeTableName, compositeSubrecord2, true); tool.createOrMigrateSchema(incrementTableName, testIncrement, true); manager = new DefaultSchemaManager(tablePool); }