Class ReadOnlyZKClient
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
A very simple read only zookeeper implementation without watcher support.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
private class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final ReadOnlyZKClient.Task
private final AtomicBoolean
private final String
private static final int
private static final int
private static final int
private static final EnumSet<org.apache.zookeeper.KeeperException.Code>
static final String
private final int
private static final org.slf4j.Logger
private final int
private int
static final String
static final String
private final int
private org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer
private final int
private final DelayQueue<ReadOnlyZKClient.Task>
private final org.apache.zookeeper.client.ZKClientConfig
(package private) org.apache.zookeeper.ZooKeeper
-
Constructor Summary
ConstructorDescriptionReadOnlyZKClient
(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer retryTimer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
closeZk()
CompletableFuture<org.apache.zookeeper.data.Stat>
CompletableFuture<org.apache.zookeeper.data.Stat>
CompletableFuture<byte[]>
CompletableFuture<byte[]>
private String
getId()
private static org.apache.hbase.thirdparty.io.netty.util.TimerTask
getTimerTask
(long timeoutMs, CompletableFuture<?> future, String api) private org.apache.zookeeper.ZooKeeper
getZk()
private void
run()
-
Field Details
-
LOG
-
RECOVERY_RETRY
- See Also:
-
DEFAULT_RECOVERY_RETRY
- See Also:
-
RECOVERY_RETRY_INTERVAL_MILLIS
- See Also:
-
DEFAULT_RECOVERY_RETRY_INTERVAL_MILLIS
- See Also:
-
KEEPALIVE_MILLIS
- See Also:
-
DEFAULT_KEEPALIVE_MILLIS
- See Also:
-
FAIL_FAST_CODES
-
connectString
-
sessionTimeoutMs
-
maxRetries
-
retryIntervalMs
-
keepAliveTimeMs
-
retryTimer
-
zkClientConfig
-
CLOSE
-
tasks
-
closed
-
zookeeper
org.apache.zookeeper.ZooKeeper zookeeper -
pendingRequests
-
-
Constructor Details
-
ReadOnlyZKClient
public ReadOnlyZKClient(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer retryTimer)
-
-
Method Details
-
getId
-
getTimerTask
private static org.apache.hbase.thirdparty.io.netty.util.TimerTask getTimerTask(long timeoutMs, CompletableFuture<?> future, String api) -
get
-
get
-
exists
-
exists
-
list
-
list
-
closeZk
-
getZk
- Throws:
IOException
-
run
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getConnectString
-