public class ZKJobMasterRegistrar
extends java.lang.Object
Constructor and Description |
---|
ZKJobMasterRegistrar(Config config,
java.lang.String jobMasterIP,
int jobMasterPort,
java.lang.String jobID) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static java.lang.String |
constructJobMasterPath(Config config,
java.lang.String jobID)
construct job master path
|
void |
deleteJobMasterZNode()
this method can be used to delete the znode from a previous session
if you don't want to wait the ZooKeeper to delete the ephemeral znode
if ZKJobMasterRegistrar is not closed properly in the previous session,
it takes around 30 seconds for ZooKeeper to delete the ephemeral JobMaster node
|
boolean |
initialize()
connect to ZooKeeper server
|
boolean |
sameZNodeExist()
check whether there is already the same node on ZooKeeper server
this can happen when the JobMasterRegistrar is not properly closed and
it is started again immediately.
|
public ZKJobMasterRegistrar(Config config, java.lang.String jobMasterIP, int jobMasterPort, java.lang.String jobID)
public static java.lang.String constructJobMasterPath(Config config, java.lang.String jobID)
public boolean initialize()
public boolean sameZNodeExist()
public void deleteJobMasterZNode()
public void close()