@InterfaceAudience.Private public class SnapshotCleanupTracker extends ZKNodeTracker
abortable, LOG, node
watcher
Constructor and Description |
---|
SnapshotCleanupTracker(ZKWatcher watcher,
Abortable abortable)
Constructs a new ZK node tracker.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSnapshotCleanupEnabled()
Returns the current state of the snapshot auto cleanup based on TTL
|
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotCleanupProtos.SnapshotCleanupState |
parseFrom(byte[] pbBytes) |
void |
setSnapshotCleanupEnabled(boolean snapshotCleanupEnabled)
Set snapshot auto clean on/off
|
private byte[] |
toByteArray(boolean isSnapshotCleanupEnabled) |
blockUntilAvailable, blockUntilAvailable, checkIfBaseNodeAvailable, getData, getNode, nodeCreated, nodeDataChanged, nodeDeleted, postStart, start, stop, toString
getWatcher, nodeChildrenChanged
public SnapshotCleanupTracker(ZKWatcher watcher, Abortable abortable)
After construction, use ZKNodeTracker.start()
to kick off tracking.
watcher
- reference to the ZKWatcher
which also contains configuration and
constantsabortable
- used to abort if a fatal error occurspublic boolean isSnapshotCleanupEnabled()
true
if the snapshot auto cleanup is enabled, false
otherwise.public void setSnapshotCleanupEnabled(boolean snapshotCleanupEnabled) throws org.apache.zookeeper.KeeperException
snapshotCleanupEnabled
- true if the snapshot auto cleanup should be on, false otherwiseorg.apache.zookeeper.KeeperException
- if ZooKeeper operation failsprivate byte[] toByteArray(boolean isSnapshotCleanupEnabled)
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotCleanupProtos.SnapshotCleanupState parseFrom(byte[] pbBytes) throws DeserializationException
DeserializationException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.