Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.4.2
-
None
-
all
Description
Zookeeper client API is designed to be server version agnostic as much as possible, so we can have new clients with old servers (or the opposite). But there is today no simple way for a client to know what's the server version. This would be very useful in order to;
- check the compatibility (ex: 'multi' implementation available since 3.4 while 3.4 clients API supports 3.3 servers as well)
- have different implementation depending on the server functionalities
A workaround (proposed by Mahadev Konar) is do "echo stat | nc hostname clientport" and parse the output to get the version. The output is, for example:
-----------------------
Zookeeper version: 3.4.2--1, built on 01/30/2012 17:43 GMT
Clients:
/127.0.0.1:54951[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0/0
Received: 1
Sent: 0
Outstanding: 0
Zxid: 0x500000001
Mode: follower
Node count: 7
--------------------
Attachments
Attachments
Issue Links
- is related to
-
ZOOKEEPER-1495 ZK client hangs when using a function not available on the server.
- Closed
-
HBASE-6058 Use ZK 3.4 API 'multi' in bulk assignment
- Closed
- relates to
-
ZOOKEEPER-1455 there is no way to determine if a session is sasl authenticated or not
- Open