Something like that should work. Might be just a bit different depending of
the HBase version you use.

HBaseAdmin admin = new HBaseAdmin(config);
HTableDescriptor table_page_proposed = new
HTableDescriptor(TABLE_PAGE_PROPOSED);
table_page_proposed.addFamily(new
HColumnDescriptor(CF_DATA).setCompressionType(Algorithm.GZ));
admin.createTable(table_page_proposed, splits);

Column Family in Cassandra is closer to a Table in HBase than to an HBase
Column Family.

JM


2014-04-28 2:04 GMT-04:00 Chamika Kasun <[email protected]>:

> Here i want to create a column family on a selected cluster. In cassandra i
> can do this as follows, But since i'm soo much new to HBase i have no idea
> how to do this using hbase. please help me out.
>
> In cassandra :
>
> public void createColumnFamily(Cluster cluster,String tableName,String
> columnFamilyName,StreamDefinition streamDefinition) {
>
> }
>

Reply via email to