}
@Test
public void fullTable() throws HBqlException {
HConnection connection = HConnectionManager.newConnection();
String tableName = "tabletest1";
if (connection.tableExists(tableName)) {
connection.disableTable(tableName);
connection.dropTable(tableName);
}
assertFalse(connection.tableExists(tableName));
connection.execute("CREATE TABLE " + tableName
+ " (family1 ("
+ "MAX_VERSIONS: 12, "
+ "BLOOMFILTER_TYPE: ROW, "
+ "BLOCK_SIZE: 123, "
+ "BLOCK_CACHE_ENABLED: TRUE, "
+ "COMPRESSION_TYPE: GZ, "
+ "IN_MEMORY: TRUE, "
+ "TTL: 440"
+ "))");
assertTrue(connection.tableExists(tableName));
HTableDescriptor table = connection.getHTableDescriptor(tableName);
HColumnDescriptor[] hcd = table.getColumnFamilies();
assertTrue((hcd.length == 1));
assertTrue(table.hasFamily("family1".getBytes()));
assertTrue(table.getNameAsString().equals(tableName));
HColumnDescriptor family = table.getFamily("family1".getBytes());
assertTrue(family.getNameAsString().equals("family1"));
assertTrue(family.getMaxVersions() == 12);
assertTrue(family.getBloomFilterType() == StoreFile.BloomType.ROW);
assertTrue(family.getBlocksize() == 123);
assertTrue(family.isBlockCacheEnabled());
assertTrue(family.getCompressionType() == Compression.Algorithm.GZ);
assertTrue(family.isInMemory());
assertTrue(family.getTimeToLive() == 440);
connection.disableTable(tableName);
connection.dropTable(tableName);
assertFalse(connection.mappingExists(tableName));
}