public final class ZKJobMasterRegistrarExample
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Config |
buildConfig(java.lang.String zkAddress)
construct a Config object
|
static void |
main(java.lang.String[] args)
we assume that we have the Job Master IP address and the port number
We will register this pair of information on a ZooKeeper server
Workers will discover the Job Master address by querying this ZooKeeper server
|
static void |
printUsage() |
public static void main(java.lang.String[] args)
If there is already a znode on the ZooKeeper with the same name, we delete that znode. It must be from a previous registration session
Parameters: the only parameter is the ZooKeeper server address
This class is used together with ZKJobMasterFinderExample.java This class registers the Job Master and that class discovers it
public static Config buildConfig(java.lang.String zkAddress)
public static void printUsage()