zookeeper上修改kafka消费组的偏移量

[kafka@ bin]$ zookeeper-shell.sh 192.168.0.1:2181

Connecting to 192.168.0.1:2181
Welcome to ZooKeeper!
JLine support is disabled

WATCHER::

WatchedEvent state:SyncConnected type:None path:null

1. help

ZooKeeper -server host:port cmd args
        connect host:port
        get path [watch]
        ls path [watch]
        set path data [version]
        rmr path
        delquota [-n|-b] path
        quit 
        printwatches on|off
        create [-s] [-e] path data acl
        stat path [watch]
        close 
        ls2 path [watch]
        history 
        listquota path
        setAcl path acl
        getAcl path
        sync path
        redo cmdno
        addauth scheme auth
        delete path [version]
        setquota -n|-b val path

2. 查询偏移量
get /consumers/consumer-group/offsets/TOPIC_NAME/0

142 --偏移量
cZxid = 0x8b00353f4a
ctime = Tue Jan 10 17:42:22 CST 2017
mZxid = 0x8b003828f8
mtime = Wed Jan 11 09:25:17 CST 2017
pZxid = 0x8b00353f4a
cversion = 0
dataVersion = 1569
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 3
numChildren = 0

3. 设置偏移量
set /consumers/consumer-group/offsets/TOPIC_NAME/0 1429

cZxid = 0x8b00353f4a
ctime = Tue Jan 10 17:42:22 CST 2017
mZxid = 0x8b00383685
mtime = Wed Jan 11 09:42:38 CST 2017
pZxid = 0x8b00353f4a
cversion = 0
dataVersion = 1570
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 4
numChildren = 0

你可能感兴趣的:(KAFKA,zookeeper)