Ideally, ZooKeeper client instances should be instrumentable with metrics; specifically, each request type (e.g. "create", "set", "getACL", etc.) should be timed to measure request latency etc.
This is problematic because:
ZooKeeper is a class, there is no interface that would allow us to naturally extend the API.
The constructor of ZooKeeper initialises the thread-pool and socket connections for the client, which prevents us from writing tests for any sub-classes.
Ideally,
ZooKeeper
client instances should be instrumentable with metrics; specifically, each request type (e.g. "create", "set", "getACL", etc.) should be timed to measure request latency etc.This is problematic because:
ZooKeeper
is aclass
, there is nointerface
that would allow us to naturally extend the API.ZooKeeper
initialises the thread-pool and socket connections for the client, which prevents us from writing tests for any sub-classes.