|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.giraph.zk.ZooKeeperManager
public class ZooKeeperManager
Manages the election of ZooKeeper servers, starting/stopping the services, etc.
| Nested Class Summary | |
|---|---|
static class |
ZooKeeperManager.State
State of the application |
| Constructor Summary | |
|---|---|
ZooKeeperManager(org.apache.hadoop.mapreduce.Mapper.Context context,
ImmutableClassesGiraphConfiguration configuration)
Constructor with context. |
|
| Method Summary | |
|---|---|
boolean |
computationDone()
Check if all the computation is done. |
void |
createCandidateStamp()
Create a HDFS stamp for this task. |
static String |
getBasePath(org.apache.hadoop.conf.Configuration conf)
Return the base ZooKeeper ZNode from which all other ZNodes Giraph creates should be sited, for instance in a multi-tenant ZooKeeper, the znode reserved for Giraph |
String |
getZooKeeperServerPortString()
Users can get the server port string to connect to ZooKeeper |
void |
logZooKeeperOutput(org.apache.log4j.Level level)
Log the zookeeper output from the process (if it was started) |
void |
offlineZooKeeperServers(ZooKeeperManager.State state)
Notify the ZooKeeper servers that this partition is done with all ZooKeeper communication. |
void |
onlineZooKeeperServers()
If this task has been selected, online a ZooKeeper server. |
boolean |
runsZooKeeper()
Is this task running a ZooKeeper server? Only could be true if called after onlineZooKeeperServers(). |
void |
setup()
Create the candidate stamps and decide on the servers to start if you are partition 0. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZooKeeperManager(org.apache.hadoop.mapreduce.Mapper.Context context,
ImmutableClassesGiraphConfiguration configuration)
throws IOException
context - Context to be stored internallyconfiguration - Configuration
IOException| Method Detail |
|---|
public static String getBasePath(org.apache.hadoop.conf.Configuration conf)
conf - Necessary to access user-provided values
public void setup()
throws IOException,
InterruptedException
IOException
InterruptedExceptionpublic void createCandidateStamp()
public boolean computationDone()
public String getZooKeeperServerPortString()
public void onlineZooKeeperServers()
public void offlineZooKeeperServers(ZooKeeperManager.State state)
state - State of the applicationpublic boolean runsZooKeeper()
public void logZooKeeperOutput(org.apache.log4j.Level level)
level - Log level to print at
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||