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

stack commented on HBASE-6894:
------------------------------

What I meant by 'multiple attributes' is being able to specify multiple 
attributes when setting TABLE_CONFIG.

TABLE_CONFIG is a big improvement over METHOD + table_att.  Its a pity that 

Can I write TABLE_CONFIG => {MAX_FILESIZE => '123456', READONLY => true, 
SOME_VALUE_A => 'a', SOME_VALUE_B => 'b'} and set the maximum file size, the 
table to read only, and then add two random key/values to the HTableDescriptor 
dictionary?  You might need to have some special handling in apply_config?  Or 
do I have to write that as MAX_FILESIZE => '123456', READONLY => true, 
TABLE_CONFIG => {SOME_VALUE_A => 'a', SOME_VALUE_B => 'b'}?

If I look at the create help, it looks like you can pass split info after 
column families.  These only make sense at create time I suppose, these split 
specifications.. they are not table attributes.

Poking around the shell help, I don't see mention of CF CONFIG.  This is used 
to add arbitrary key/values to the HColumnDescriptor dictionary?  There is no 
way we could tell from context whether the CONFIG is for HTableDescriptor or 
for HColumnDescriptor?  Is CONFIG a good name?  Should it be DICT or KEYVALUE 
or ATTRIBUTES?

Thanks for looking into this Sergey.  I think it'd be great if this made more 
'sense'.
                
> 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 => 
> 'LZO'}
> 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 thing.
> 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

Reply via email to