@Test public void testAdaptWithHTableDescriptorWhenSplitIsEmpty() { byte[][] splits = new byte[0][0]; CreateTableRequest actualRequest = TableAdapter.adapt(new HTableDescriptor(TableName.valueOf(TABLE_ID)), splits); CreateTableRequest expectedRequest = CreateTableRequest.of(TABLE_ID); Assert.assertEquals( expectedRequest.toProto(PROJECT_ID, INSTANCE_ID), actualRequest.toProto(PROJECT_ID, INSTANCE_ID)); }
protected static void adapt(HTableDescriptor desc, CreateTableRequest request) { if (request != null) { for (HColumnDescriptor column : desc.getColumnFamilies()) { String columnName = column.getNameAsString(); request.addFamily(columnName, buildGarbageCollectionRule(column)); } } }
TableAdapter { protected static void adapt(HTableDescriptor desc, CreateTableRequest request) { if (request != null) { for (HColumnDescriptor column : desc.getColumnFamilies()) { String columnName = column.getNameAsString(); request.addFamily(columnName, buildGarbageCollectionRule(column)); } } } }
TableAdapter { protected static void adapt(HTableDescriptor desc, CreateTableRequest request) { if (request != null) { for (HColumnDescriptor column : desc.getColumnFamilies()) { String columnName = column.getNameAsString(); request.addFamily(columnName, buildGarbageCollectionRule(column)); } } } private  TableAdapter(); }
TableAdapter { protected static void adapt(HTableDescriptor desc, CreateTableRequest request) { if (request != null) { for (HColumnDescriptor column : desc.getColumnFamilies()) { String columnName = column.getNameAsString(); request.addFamily(columnName, buildGarbageCollectionRule(column)); } } } private  TableAdapter(); static CreateTableRequest adapt(HTableDescriptor desc, byte[][] splitKeys); static void addSplitKeys(byte[][] splitKeys, CreateTableRequest request); static HTableDescriptor adapt(Table table); }
TableAdapter { protected static void adapt(HTableDescriptor desc, CreateTableRequest request) { if (request != null) { for (HColumnDescriptor column : desc.getColumnFamilies()) { String columnName = column.getNameAsString(); request.addFamily(columnName, buildGarbageCollectionRule(column)); } } } private  TableAdapter(); static CreateTableRequest adapt(HTableDescriptor desc, byte[][] splitKeys); static void addSplitKeys(byte[][] splitKeys, CreateTableRequest request); static HTableDescriptor adapt(Table table);  }