hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-800) support HTD and HCD get/set attribute in shell, Thrift, and REST interfaces
Date Sun, 26 Jan 2014 19:42:38 GMT

     [ https://issues.apache.org/jira/browse/HBASE-800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

stack resolved HBASE-800.
-------------------------

    Resolution: Not A Problem

Resolving as 'not a problem'.  In shell you can set configs on column family and table levels
when you create and alter the table:

{code}
hbase(main):002:0> help 'create'
Creates a table. Pass a table name, and a set of column family
specifications (at least one), and, optionally, table configuration.
Column specification can be a simple string (name), or a dictionary
(dictionaries are described below in main help output), necessarily
including NAME attribute.
Examples:

  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
  hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
  hbase> # The above in shorthand would be the following:
  hbase> create 't1', 'f1', 'f2', 'f3'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE
=> true}
  hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles'
=> '10'}}

Table configuration options can be put at the end.
Examples:

  hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
  hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' =>
'myvalue' }
  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', CONFIGURATION
=> {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}
{code}

True we don't have support in REST and thrift but lets open issues for these explicitly if
needed there.

> support HTD and HCD get/set attribute in shell, Thrift, and REST interfaces
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-800
>                 URL: https://issues.apache.org/jira/browse/HBASE-800
>             Project: HBase
>          Issue Type: Improvement
>          Components: Client, REST, Thrift
>    Affects Versions: 0.2.1
>            Reporter: Andrew Purtell
>            Priority: Minor
>              Labels: client, rest, thrift, thrift2
>
> From Billy Pearson on hbase-users@
> Hey Andrew
> Do we have plans to include setMaxFileSize for the shell,thrift,rest?
> So non java users can change this as needed with out having to learn java.
> Billy
> "Andrew Purtell" <apurtell@yahoo.com> wrote in message news:189371.9860.qm@web65516.mail.ac4.yahoo.com...
> > Hello David,
> >
> > Current trunk (upcoming 0.2.0) has support for per-table metadata. See
> > https://issues.apache.org/jira/browse/HBASE-42 and
> > https://issues.apache.org/jira/browse/HBASE-62.
> >
> > So maybe you can set the split threshold quite low for the table in
> > question?
> >
> > The default is 256MB (268435456), set globally for all tables in the HBase
> > configuration as "hbase.hregion.max.filesize". However it's reasonable to
> > set it as low as the DFS blocksize. The guidance for a typical HBase
> > installation is to set the DFS blocksize to 8MB (8388608), instead of the
> > default 64MB.
> >
> > At create time:
> >
> >  HTableDescriptor htd = new HTableDescriptor("foo");
> >  htd.setMaxFileSize(8388608);
> >  ...
> >  HBaseAdmin admin = new HBaseAdmin(hconf);
> >  admin.createTable(htd);
> >
> > If the table already exists:
> >
> >  HTable table = new HTable(hconf, "foo");
> >  admin.disableTable("foo");
> >  // make a read-write descriptor
> >  HTableDescriptor htd =
> >    new HTableDescriptor(table.getTableDescriptor());
> >  htd.setMaxFileSize(83388608);
> >  admin.modifyTableMeta("foo", htd);
> >  admin.enableTable("foo");
> >
> > Hope this helps,
> >
> >   - Andy
> >
> >> From: David Alves
> >> <dr-alves@criticalsoftware.com>
> >> Subject: Region Splits
> >> To: "hbase-user@hadoop.apache.org"
> >> <hbase-user@hadoop.apache.org>
> >> Date: Thursday, July 31, 2008, 6:06 AM
> > [...]
> >> I use hbase (amongst other things) to crawl some repos of infomation
> >> and util now I've been using the Nutch segment generation paradigm.
> >> I would very much like to skip the segment generation step using
> >> hbase as source and sink directly but in order to do that I would
> >> need to either allow more that one split to be generated for a
> >> single region or make the regions in this particular table split
> >> with much less entries than other tables.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message