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

Nitay Joffe updated HBASE-1329:
-------------------------------

    Attachment: zk.patch
                hbase-1329.patch

This patch is the first part, putting the raw ZK commands into our shell.

zk.patch contains edits to ZooKeeper to expose using their ZooKeeperMain class 
from HBase. Also contains some cleanup to some statics and initializations.

hbase-1329.patch adds ZooKeeperMain to the ruby Admin wrapper around HBaseAdmin 
with methods to call out to ZooKeeper's command line functions.

All of the zookeeper commands are under the 'zk' method.
Note that this calls out directly to the ZooKeeper functionality, so anything 
they add will directly be available by updating our jar. 

Here is an example of usage:

{code}
shrek:hbase nitay$ bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.0-dev, r6bbf7cb5bdf6c7065e69ba1dfdb7901b0769fba5, Fri Jun 12 
22:31:07 PDT 2009
hbase(main):001:0> zk 'help'
09/06/12 22:33:48 INFO zookeeper.ZooKeeperWrapper: Quorum servers: 
aa0-000-14.u.powerset.com:2188,aa0-000-13.u.powerset.com:2188,aa0-000-12.u.powerset.com:2188,aa0-001-13.u.powerset.com:2188,aa0-000-15.u.powerset.com:2188
ZooKeeper -server host:port cmd args
        connect host:port
        get path [watch]
        ls path [watch]
        set path data [version]
        delquota [-n|-b] path
        quit 
        printwatches on|off
        create path data acl
        stat path [watch]
        close 
        history 
        listquota path
        setAcl path acl
        getAcl path
        sync path
        redo cmdno
        addauth scheme auth
        delete path [version]
        setquota -n|-b val path
hbase(main):002:0> zk 'ls','/hbase'  
[safe-mode, root-region-server, rs, master, shutdown]
hbase(main):003:0> zk 'get', '/hbase/master'
208.76.44.158:60007
cZxid = 62
ctime = Sat Jun 06 21:30:26 PDT 2009
mZxid = 62
mtime = Sat Jun 06 21:30:26 PDT 2009
pZxid = 62
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 81525328146006018
dataLength = 19
numChildren = 0
hbase(main):005:0> zk 'get', '/hbase/safe-mode'

cZxid = 95
ctime = Sat Jun 06 21:30:31 PDT 2009
mZxid = 95
mtime = Sat Jun 06 21:30:31 PDT 2009
pZxid = 95
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 81525328146006018
dataLength = 0
numChildren = 0
hbase(main):006:0> zk 'get', '/hbase/root-region-server'
208.76.44.141:60027
cZxid = 30
ctime = Tue Jun 02 14:24:17 PDT 2009
mZxid = 97
mtime = Sat Jun 06 21:30:31 PDT 2009
pZxid = 30
cversion = 0
dataVersion = 2
aclVersion = 0
ephemeralOwner = 0
dataLength = 19
numChildren = 0
hbase(main):007:0> zk 'ls', '/hbase/rs'                 
[1244349027581, 1244349027859, 1244349028409, 1244349027545, 1244349027546]
{code}

> Visibility into ZooKeeper
> -------------------------
>
>                 Key: HBASE-1329
>                 URL: https://issues.apache.org/jira/browse/HBASE-1329
>             Project: Hadoop HBase
>          Issue Type: New Feature
>    Affects Versions: 0.20.0
>            Reporter: Nitay Joffe
>            Assignee: Nitay Joffe
>            Priority: Blocker
>             Fix For: 0.20.0
>
>         Attachments: hbase-1329.patch, zk.patch
>
>
> Currently, to the users of HBase ZooKeeper is some mysterious thing that is 
> for some reason important but no one knows why. We need to provide more 
> visibility into ZooKeeper from HBase.
> This issue is to start a discussion on what sorts of things we can/should 
> provide. Some possible ideas to get started:
> - Running a REST server. See ZOOKEEPER-36.
> - FUSE support. See ZOOKEEPER-25.
> - Admin/surgery tools in HBase shell. Answer questions like "in safe mode?"
> - Status and information on HBase's data in ZooKeeper in the web UI.

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

Reply via email to