hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1886) move table and column family attributes to ZK to make them live
Date Tue, 20 Oct 2009 00:48:59 GMT

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

Andrew Purtell commented on HBASE-1886:
---------------------------------------

bq. if attributes are node names, they cannot just be byte[] can they? ZK api uses String.


Keys are passed through Bytes.toStringBinary before becoming node names. But also the path
separator needs to be escaped. If only printable characters are used this is basically a no-op.
(Need to check if toStringBinary escapes more than != 32 <= 127)

bq. I'd like to expand this conversation to be about all the stuff we want to move into ZK,
how we will design our usage of ZK, etc..

Sure. Regarding attributes in particular, how about this:

{noformat}
/hbase
  /table
    /attr({'json':'table attributes'})
      /families/<family-name>
        /attr({'json':'family attributes'})
{noformat}

with all attributes for a table or family wrapped up in a single JSON body. Assumes the rest
will be dropped in place around it. 


> move table and column family attributes to ZK to make them live
> ---------------------------------------------------------------
>
>                 Key: HBASE-1886
>                 URL: https://issues.apache.org/jira/browse/HBASE-1886
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.21.0
>
>         Attachments: live_attributes.patch
>
>
> This is a first cut at moving table and column family attributes up to ZK where they
can be modified any time without requiring a disable/enable table cycle. Adds methods to ZooKeeperWrapper
for support server side. Adds methods to HTableInterface for client side access. Client side
talks directly to ZK. 
> The new hierarchy for attributes in ZK is like:
> {noformat}
> /hbase
>   /table
>     /<table-name>
>       /attr
>         /<table-attr-name>
>         /<family-name>
>           /<family-attr-name>
> {noformat}
> As before attribute names and values are byte[], but now that they are hosted in ZK,
the path delimiter ('/') cannot be used.
> Attached patch compiles but has not been tested. I put it up for a concept review. Next
step before this is functional is to deprecate the attribute related methods on HTD and HCD
and chase through the warnings to find all users who should be updated to use the ZK wrapper
or new HTable methods instead. And, of course, then add test cases that successfully complete.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message