public class JobUtils
extends java.lang.Object
Constructor and Description |
---|
JobUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
destroyAllJobs(java.net.URL adminServer)
Removes all the jobs from the cluster.
|
static boolean |
isJobDeployed(java.lang.String jobName,
java.net.URL adminServer)
Checks to see if the specified job is deployed on the XD cluster.
|
static void |
job(java.lang.String jobName,
java.lang.String jobDefinition,
java.net.URL adminServer)
Creates the job definition and deploys it to the cluster being tested.
|
static void |
launch(java.net.URL adminServer,
java.lang.String jobName)
Launches the specified job
|
static void |
launch(java.net.URL adminServer,
java.lang.String jobName,
java.lang.String jobParameters)
Launches the specified job
|
static void |
undeployJob(java.net.URL adminServer,
java.lang.String jobName)
Undeploys the specified job
|
static boolean |
waitForJobDeployment(java.lang.String jobName,
java.net.URL adminServer,
int waitTime)
Waits up to the wait time for a job to be deployed.
|
public static void job(java.lang.String jobName, java.lang.String jobDefinition, java.net.URL adminServer)
jobName
- The name of the jobjobDefinition
- The definition that needs to be deployed for this job.adminServer
- The admin server that this job will be deployed against.public static void destroyAllJobs(java.net.URL adminServer)
adminServer
- The admin server that the command will be executed against.public static void undeployJob(java.net.URL adminServer, java.lang.String jobName)
adminServer
- The admin server that the command will be executed against.jobName
- The name of the job to undeploypublic static void launch(java.net.URL adminServer, java.lang.String jobName)
adminServer
- The admin server that the command will be executed against.jobName
- The name of the job to launchpublic static void launch(java.net.URL adminServer, java.lang.String jobName, java.lang.String jobParameters)
adminServer
- The admin server that the command will be executed against.jobName
- The name of the job to launchjobParameters
- the jobParameterspublic static boolean waitForJobDeployment(java.lang.String jobName, java.net.URL adminServer, int waitTime)
jobName
- The name of the job to be evaluated.adminServer
- The admin server URL that will be queried.waitTime
- the amount of time in millis to wait.public static boolean isJobDeployed(java.lang.String jobName, java.net.URL adminServer)
jobName
- The name of the job to be evaluated.adminServer
- The admin server URL that will be queried.