hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeremy p <athomewithagroove...@gmail.com>
Subject Re: How to specify a compression algorithm when creating a table with the HBaseAdmin object?
Date Thu, 12 Jun 2014 23:38:52 GMT
Awesome -- thank you!

--Jeremy


On Thu, Jun 12, 2014 at 4:28 PM, Jean-Marc Spaggiari <
jean-marc@spaggiari.org> wrote:

> The same way you will define the number of versions, the TTL (if any), etc.
> Just look at all the setters to get a sense to what is doable.
>
> We are also going to update the documentation to reflect this.
>
> JM
>
>
> 2014-06-12 19:25 GMT-04:00 jeremy p <athomewithagroovebox@gmail.com>:
>
> > Awesome -- thank you both!
> >
> > --Jeremy
> >
> >
> > On Wed, Jun 11, 2014 at 4:34 PM, Subbiah, Suresh <Suresh.Subbiah@hp.com>
> > wrote:
> >
> > > Hi Jeremy,
> > >
> > > Here is some code that creates an table using the HBaseAdmin API, with
> a
> > > bunch of options such as compression and specified key boundaries.
> > > http://pastebin.com/KNcv03bj
> > >
> > > The user specified options will be in the StringArrayList tableOptions.
> > >
> > > This is part of the Trafodion code @
> https://github.com/trafodion/core
> > >
> > > This code too follows the model that Jean-Marc has shown.
> > >
> > > Thanks
> > > Suresh
> > >
> > >
> > > -----Original Message-----
> > > From: Jean-Marc Spaggiari [mailto:jean-marc@spaggiari.org]
> > > Sent: Wednesday, June 11, 2014 4:55 PM
> > > To: user
> > > Subject: Re: How to specify a compression algorithm when creating a
> table
> > > with the HBaseAdmin object?
> > >
> > >       final HBaseAdmin admin = new HBaseAdmin(config);
> > >       HTableDescriptor table = new
> > > HTableDescriptor(TableName.valueOf(TABLE_NAME));
> > >       table.addFamily(new
> > > HColumnDescriptor(CF_DEFAULT).setCompressionType(Algorithm.SNAPPY));
> > >       admin.createTable(table);
> > >
> > >
> > > 2014-06-11 17:47 GMT-04:00 jeremy p <athomewithagroovebox@gmail.com>:
> > >
> > > > I'm currently creating a table using the HBaseAdmin object.  The
> > > > reason I'm doing it with the HBaseAdmin object is that I need to
> > > > pre-split the table by specifying the start key, end key, and number
> > > > of regions.  I want to use Snappy compression for this table,
> however,
> > > > I haven't seen any way to do this using the HBaseAdmin object.  In
> all
> > > > of the examples I've seen, they're creating the table from the HBase
> > > > shell.  How can I create a table with the HBaseAdmin object, and have
> > > that table use Snappy compression?
> > > >
> > > > --Jeremy
> > > >
> > >
> >
>

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