You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Chamika Kasun <ka...@gmail.com> on 2014/04/28 08:04:13 UTC
Create a Table on a Specific Cluster in HBase
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) {
}
Re: Create a Table on a Specific Cluster in HBase
Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
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 <ka...@gmail.com>:
> 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) {
>
> }
>