@InterfaceAudience.Private public class ChaosAgent extends Object implements org.apache.zookeeper.Watcher, Closeable, Runnable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ChaosAgent.LocalShell
Executes Command locally.
|
| Constructor and Description |
|---|
ChaosAgent(org.apache.hadoop.conf.Configuration conf,
String quorum,
String agentName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createEphemeralZNode(String path,
byte[] data)
Function to create EPHEMERAL ZNODE with given path and data as params.
|
void |
createZNode(String path,
byte[] data)
Function to create PERSISTENT ZNODE with given path and data given as params
|
void |
process(org.apache.zookeeper.WatchedEvent watchedEvent) |
void |
run() |
void |
setStatusOfTaskZNode(String taskZNode,
String status)
sets given Status for Task Znode
|
public void createZNode(String path, byte[] data)
path - Path at which ZNode to createdata - Data to put under ZNodepublic void createEphemeralZNode(String path, byte[] data)
path - Path at which Ephemeral ZNode to createdata - Data to put under ZNodepublic void setStatusOfTaskZNode(String taskZNode, String status)
taskZNode - ZNode to set statusstatus - Status valuepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void process(org.apache.zookeeper.WatchedEvent watchedEvent)
process in interface org.apache.zookeeper.WatcherCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.