hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Create a Table on a Specific Cluster in HBase
Date Mon, 28 Apr 2014 14:26:58 GMT
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 <kasun.chamika@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) {
>
> }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message