public class GiraphZooKeeperAdmin extends Object implements org.apache.zookeeper.Watcher, org.apache.hadoop.util.Tool
bin/giraph-admin -Dgiraph.zkBaseNode=... -Dgiraph.zkList=...
-Dgiraph.zkServerPort=... -cleanZk
alterantely, the Configuration
file will populate these fields
as it would in a bin/giraph
run.
WARNING: Obviously, running this while actual Giraph jobs
using your cluster are in progress is not recommended.Constructor and Description |
---|
GiraphZooKeeperAdmin() |
Modifier and Type | Method and Description |
---|---|
void |
doZooKeeperCleanup(ZooKeeperExt zooKeeper,
String zkBasePath)
Cleans the ZooKeeper quorum of in-memory failed/killed job fragments.
|
org.apache.hadoop.conf.Configuration |
getConf() |
static void |
main(String[] args)
Entry point from shell script
|
void |
process(org.apache.zookeeper.WatchedEvent event)
Implement watcher to receive event at the end of the cleaner run
|
int |
run(String[] args)
Clean the ZooKeeper of all failed and cancelled in-memory
job remnants that pile up on the ZK quorum over time.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public int run(String[] args)
run
in interface org.apache.hadoop.util.Tool
args
- the input command line arguments, if any.public final void process(org.apache.zookeeper.WatchedEvent event)
process
in interface org.apache.zookeeper.Watcher
event
- the WatchedEvent returned by ZK after the cleaning job.public void doZooKeeperCleanup(ZooKeeperExt zooKeeper, String zkBasePath) throws org.apache.zookeeper.KeeperException, InterruptedException
zooKeeper
- the connected ZK instance (session) to delete from.zkBasePath
- the base node to begin erasing from.org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.