hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vaibhav Puranik <vpura...@gmail.com>
Subject Re: how to add table
Date Wed, 08 Jul 2009 19:03:44 GMT
Stack,

We are using the trunk. Thanks for the update.

Regards,
Vaibhav

On Wed, Jul 8, 2009 at 11:44 AM, stack <stack@duboce.net> wrote:

> Fleming is referring to the fact that you need to have hbase conf in your
> CLASSPATH for things to run (one of the things in conf is zoo.cfg with
> pointer to the zookeeper to use).
>
> How we point at zookeeper is about to change in TRUNK again soon but as
> long
> as you have hbase conf in your CLASSPATH, things should basically work.
>
> St.Ack
>
>
> On Wed, Jul 8, 2009 at 7:24 AM, Vaibhav Puranik <vpuranik@gmail.com>
> wrote:
>
> > Fleming,
> >
> > We are trying to use HBase 0.20.
> > Your answer is very helpful. Looks like Table creation is not changed in
> > 0.20.
> >
> > But what do you mean by - "Don't forget to put your zookeeper
> > configure(zoo.cfg) with your java class"?
> > Can you please elaborate?
> >
> > Regards,
> > Vaibhav
> > Gumgum Inc.
> >
> >
> > On Tue, Jul 7, 2009 at 10:56 PM, <y_823910@tsmc.com> wrote:
> >
> > > Hi,
> > >
> > > I use java code to create a table.
> > > Following sample I create table with one family.
> > > Don't forget to put your zookeeper configure(zoo.cfg) with your java
> > class.
> > > Hope it is useful for you.
> > >
> > >
> > > Fleming
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------------------------------------
> > > CreatHBaseTable("test","COLUMNS");
> > >
> > > public static void CreatHBaseTable(String TableName,String
> ColumnFamily){
> > >            config = new HBaseConfiguration();
> > >                        HBaseAdmin hbaseAdmin;
> > >            try {
> > >                  hbaseAdmin = new HBaseAdmin(config);
> > >
> > >                  HColumnDescriptor column = new
> > > HColumnDescriptor(ColumnFamily);
> > >                  //table descriptor
> > >                HTableDescriptor table = new
> HTableDescriptor(TableName);
> > >                  //add column into table
> > >                  table.addFamily(column);
> > >                  hbaseAdmin.createTable(table);
> > >            } catch (MasterNotRunningException e1) {
> > >                  // TODO Auto-generated catch block
> > >                  e1.printStackTrace();
> > >            } catch (IOException e) {
> > >                  // TODO Auto-generated catch block
> > >                  e.printStackTrace();
> > >            }
> > >
> > >            System.out.println("create "+TableName +" ok");
> > >
> > >      }
> > >
> > >
> > >
> > >
> > >
> > >
> > >                      Muhammad Mudassar
> > >                      <mudassark7@gmail        To:
> > > hbase-user@hadoop.apache.org
> > >                      .com>                    cc:      (bcc:
> > Y_823910/TSMC)
> > >                                               Subject: how to add table
> > >                      2009/07/08 01:35
> > >                      PM
> > >                      Please respond to
> > >                      hbase-user
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi,
> > >
> > > I have just started to work with hbase can any body here tell me how to
> > add
> > > a table to the hbase.
> > >
> > >
> > > thanks
> > >
> > > Muhammad Mudassar
> > >
> > >
> > >
> > >
> > >
> > >
> >
>  ---------------------------------------------------------------------------
> > >                                                         TSMC PROPERTY
> > >  This email communication (and any attachments) is proprietary
> > information
> > >  for the sole use of its
> > >  intended recipient. Any unauthorized review, use or distribution by
> > anyone
> > >  other than the intended
> > >  recipient is strictly prohibited.  If you are not the intended
> > recipient,
> > >  please notify the sender by
> > >  replying to this email, and then delete this email and any copies of
> it
> > >  immediately. Thank you.
> > >
> > >
> >
>  ---------------------------------------------------------------------------
> > >
> > >
> > >
> > >
> >
>

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