hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6894) Adding metadata to a table in the shell is both arcane and painful
Date Fri, 12 Oct 2012 17:33:02 GMT

    [ https://issues.apache.org/jira/browse/HBASE-6894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475183#comment-13475183

Sergey Shelukhin commented on HBASE-6894:

1) MAX_FILESIZE/etc. are not actually part of CONFIG. Config is only the random key/values,
which is one of table /attributes/ set via table_att; the other attributes are readonly, max
filesize, owner, etc. So it's not a flat structure right now (it's probably a good idea to
keep it that way just in case users use some random keys in their config that conflict with
newly added system keys in future versions).
2) If you specify A => B, C => D, they will all be a part of one arg. Right now that
would mean that you can use either METHOD => table_att, CONFIG => (random k/v), MAX_FILESIZE
=> ..., or TABLE_CONFIG => (random k/v).
And you cannot add any column families after, in the same command. 
You can enclose parts in {} to make them separate args.

I can rewrite parameter handling to intelligently (or hackily :)) figure out from one big
hash what user wants, but that probably won't be backward compatible. And as per (1) TABLE_CONFIG
probably shouldn't be flat for system and user config, as in your example.

3) As far as I see SPLITs are not handled in alter. Where did you find it in help?
> Adding metadata to a table in the shell is both arcane and painful
> ------------------------------------------------------------------
>                 Key: HBASE-6894
>                 URL: https://issues.apache.org/jira/browse/HBASE-6894
>             Project: HBase
>          Issue Type: Bug
>          Components: shell
>    Affects Versions: 0.96.0
>            Reporter: stack
>              Labels: noob
>         Attachments: HBASE-6894.patch, HBASE-6894.patch
> In production we have hundreds of tables w/ whack names like 'aliaserv', 'ashish_bulk',
'age_gender_topics', etc.  It be grand if you could look in master UI and see stuff like owner,
eng group responsible, miscellaneous description, etc.
> Now, HTD has support for this; each carries a dictionary.  Whats a PITA though is adding
attributes to the dictionary.  Here is what seems to work on trunk (though I do not trust
it is doing the right thing):
> {code}
> hbase> create 'SOME_TABLENAME', {NAME => 'd', VERSION => 1, COMPRESSION =>
> hbase> # Here is how I added metadata
> hbase> disable 'SOME_TABLENAME'
> hbase> alter 'SOME_TABLENAME', METHOD => 'table_att', OWNER => 'SOMEON', CONFIG
=> {'ENVIRONMENT' => 'BLAH BLAH', 'SIZING' => 'The size should be between 0-10K most
of the time with new URLs coming in and getting removed as they are processed unless the pipeline
has fallen behind', 'MISCELLANEOUS' => 'Holds the list of URLs waiting to be processed
in the parked page detection analyzer in ingestion pipeline.'}
> ...
> describe...
> enable...
> {code}
> The above doesn't work in 0.94.  Complains about the CONFIG, the keyword we are using
for the HTD dictionary.
> It works in 0.96 though I'd have to poke around some more to ensure it is doing the right
> But this METHOD => 'table_att' stuff is really ugly.... can we fix it?
> And I can't add table attributes on table create seemingly.
> A little bit of thought and a bit of ruby could clean this all up.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message