use of org.apache.hadoop.hbase.client.TableDescriptorBuilder in project hbase by apache.
the class TestPerColumnFamilyFlush method initHRegion.
private HRegion initHRegion(String callingMethod, Configuration conf) throws IOException {
TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(TABLENAME);
for (byte[] family : FAMILIES) {
builder.setColumnFamily(ColumnFamilyDescriptorBuilder.of(family));
}
RegionInfo info = RegionInfoBuilder.newBuilder(TABLENAME).build();
Path path = new Path(DIR, callingMethod);
return HBaseTestingUtil.createRegionAndWAL(info, path, conf, builder.build());
}
use of org.apache.hadoop.hbase.client.TableDescriptorBuilder in project hbase by apache.
the class TestMemStoreSegmentsIterator method setup.
@Before
public void setup() throws IOException {
Configuration conf = new Configuration();
HBaseTestingUtil hbaseUtility = new HBaseTestingUtil(conf);
TableDescriptorBuilder tableDescriptorBuilder = TableDescriptorBuilder.newBuilder(TableName.valueOf(TABLE));
ColumnFamilyDescriptor columnFamilyDescriptor = ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(FAMILY)).build();
tableDescriptorBuilder.setColumnFamily(columnFamilyDescriptor);
RegionInfo info = RegionInfoBuilder.newBuilder(TableName.valueOf(TABLE)).build();
Path rootPath = hbaseUtility.getDataTestDir(ROOT_SUB_PATH);
this.wal = HBaseTestingUtil.createWal(conf, rootPath, info);
this.region = HRegion.createHRegion(info, rootPath, conf, tableDescriptorBuilder.build(), this.wal, true);
this.store = new HStore(this.region, columnFamilyDescriptor, conf, false);
this.comparator = CellComparator.getInstance();
this.compactionKVMax = HConstants.COMPACTION_KV_MAX_DEFAULT;
}
use of org.apache.hadoop.hbase.client.TableDescriptorBuilder in project hbase by apache.
the class TestNotCleanupCompactedFileWhenRegionWarmup method before.
@Before
public void before() throws Exception {
TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(TABLE_NAME);
builder.setColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY));
admin.createTable(builder.build());
TEST_UTIL.waitTableAvailable(TABLE_NAME);
table = TEST_UTIL.getConnection().getTable(TABLE_NAME);
}
use of org.apache.hadoop.hbase.client.TableDescriptorBuilder in project hbase by apache.
the class TestParallelPut method initHRegion.
private HRegion initHRegion(byte[] tableName, String callingMethod, byte[]... families) throws IOException {
TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(TableName.valueOf(tableName));
for (byte[] family : families) {
builder.setColumnFamily(ColumnFamilyDescriptorBuilder.of(family));
}
TableDescriptor tableDescriptor = builder.build();
RegionInfo info = RegionInfoBuilder.newBuilder(tableDescriptor.getTableName()).build();
return HBTU.createLocalHRegion(info, tableDescriptor);
}
use of org.apache.hadoop.hbase.client.TableDescriptorBuilder in project hbase by apache.
the class SecureTestUtil method createTable.
public static Table createTable(HBaseTestingUtil testUtil, TableName tableName, byte[][] families) throws Exception {
TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
for (byte[] family : families) {
builder.setColumnFamily(ColumnFamilyDescriptorBuilder.of(family));
}
createTable(testUtil, testUtil.getAdmin(), builder.build());
return testUtil.getConnection().getTable(tableName);
}
Aggregations