hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chamika Kasun <kasun.cham...@gmail.com>
Subject Re: How to Create a Column in Hbase using Hbase Client API
Date Tue, 29 Apr 2014 19:09:22 GMT
Yes this code is correct. Here what the code does is only create a column
family. What i want to do is inside the column family i want to create
several columns. In this documentation
the "Class HTableDescripter" it says that addFamily(hcd); creates a column
family NOT A Column.

Adds a column family.

In my project what i want to do is create several columns inside that
column family. In Hbase Documentation it termed as "qualifier". That is i
want to create several qualifiers inside a column family which can be
created from the above code snippet.

On Tue, Apr 29, 2014 at 11:49 PM, Ted Yu <yuzhihong@gmail.com> wrote:

> When create your table, you specify the column families in the table (code
> snippet from TestFromClientSide3.java):
>     HTableDescriptor htd =
> newHTableDescriptor(hTable.getTableDescriptor());
>     HColumnDescriptor hcd = new HColumnDescriptor(htd.getFamily(FAMILY));
>     htd.addFamily(hcd);
>     admin.createTable(htd);
> When you insert data, you specify column along with data value.
> Cheers
> On Tue, Apr 29, 2014 at 11:08 AM, Chamika Kasun <kasun.chamika@gmail.com
> >wrote:
> > Hi all,
> >
> > Here what i want to do is i want to firstly need to create and a column
> > family and then need to create a column for data to be added later. Here
> i
> > can not use PUT command as it requires a value parameter(because idea of
> > that application is first initiate the table and data will be added
> later).
> > Please help me out. I'm really new to hbase
> >

Chamika Kasun.
Computer Science & Engineering
University of Moratuwa.

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