public final class ZKEventsManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Logger |
LOG |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
constructEventPath(java.lang.String rootPath,
java.lang.String jobID)
construct the next event path
increase the eventCounter by one
|
static void |
createEventsZNode(CuratorFramework client,
java.lang.String rootPath,
java.lang.String jobID)
Create job znode for persistent states
Assumes that there is no znode exists in the ZooKeeper
This method should be called by the submitting client
|
static JobMasterAPI.JobEvent |
decodeJobEvent(byte[] eventData) |
static java.util.TreeMap<java.lang.Integer,JobMasterAPI.JobEvent> |
getAllEvents(CuratorFramework client,
java.lang.String rootPath,
java.lang.String jobID)
return all registered events
|
static int |
getNumberOfPastEvents(CuratorFramework client,
java.lang.String rootPath,
java.lang.String jobID) |
static void |
initEventCounter(CuratorFramework client,
java.lang.String rootPath,
java.lang.String jobID) |
static void |
publishEvent(CuratorFramework client,
java.lang.String rootPath,
java.lang.String jobID,
JobMasterAPI.JobEvent jobEvent) |
public static void createEventsZNode(CuratorFramework client, java.lang.String rootPath, java.lang.String jobID)
public static void initEventCounter(CuratorFramework client, java.lang.String rootPath, java.lang.String jobID)
public static java.lang.String constructEventPath(java.lang.String rootPath, java.lang.String jobID)
public static void publishEvent(CuratorFramework client, java.lang.String rootPath, java.lang.String jobID, JobMasterAPI.JobEvent jobEvent) throws Twister2Exception
Twister2Exception
public static int getNumberOfPastEvents(CuratorFramework client, java.lang.String rootPath, java.lang.String jobID) throws Twister2Exception
Twister2Exception
public static JobMasterAPI.JobEvent decodeJobEvent(byte[] eventData) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static java.util.TreeMap<java.lang.Integer,JobMasterAPI.JobEvent> getAllEvents(CuratorFramework client, java.lang.String rootPath, java.lang.String jobID) throws Twister2Exception
Twister2Exception