@PublicAPI public interface ISchedulerClient extends Scheduler
Modifier and Type | Method and Description |
---|---|
boolean |
deleteFile(String space,
String pathname)
Deletes the specified file from the server.
|
ConnectionInfo |
getConnectionInfo()
Returns the connection info, if initialized previously
|
String |
getSession()
Retrieves the current session identifier, or null if the session was not initialized yet.
|
void |
init(ConnectionInfo connectionInfo)
Initialize this instance.
|
boolean |
isJobFinished(JobId jobId)
Returns true, if the scheduler has finished the execution of the
specified job.
|
boolean |
isJobFinished(String jobId)
Returns true, if the scheduler has terminated the execution of
the specified job.
|
boolean |
isTaskFinished(String jobId,
String taskName)
Returns true, if the scheduler has finished the execution of the
task.
|
List<JobIdDataAndError> |
multipleSubmitFromUrls(List<WorkflowUrlData> workflowUrlDataList)
Submit a list of jobs to the scheduler from a list of catalogRestURL, variables and generic information.
|
void |
pullFile(String space,
String pathname,
String outputFile)
Retrieves the specified file from the server.
|
boolean |
pushFile(String spacename,
String pathname,
String filename,
String file)
Transfers the specified file from the local file system to the specified
dataspace at the server
|
void |
setSession(String sid)
Sets the session identifier explicitly.
|
JobId |
submit(File job)
Submit a new job to the scheduler.
|
JobId |
submit(File job,
Map<String,String> variables)
Submit a new job to the scheduler with provided variables.
|
JobId |
submit(File job,
Map<String,String> variables,
Map<String,String> genericInfos)
Submit a new job to the scheduler with provided variables.
|
JobId |
submit(Map<String,String> genericInfos,
URL job,
Map<String,String> variables)
Submit a new job to the scheduler with provided variables.
|
JobId |
submit(URL job)
Submit a new job to the scheduler.
|
JobId |
submit(URL job,
Map<String,String> variables)
Submit a new job to the scheduler with provided variables.
|
JobId |
submit(URL job,
Map<String,String> variables,
Map<String,String> headerParams)
Submit a new job to the scheduler with provided variables.
|
JobId |
submit(URL job,
Map<String,String> variables,
Map<String,String> genericInfos,
Map<String,String> headerParams)
Submit a new job to the scheduler with provided variables.
|
JobId |
submitFromCatalog(String catalogRestURL,
String calledWorkflow)
Submit a new job to the scheduler from the catalogRestURL without provided variables.
|
JobId |
submitFromCatalog(String catalogRestURL,
String calledWorkflow,
Map<String,String> variables)
Submit a new job to the scheduler from the catalogRestURL with provided variables.
|
JobId |
submitFromCatalog(String catalogRestURL,
String calledWorkflow,
Map<String,String> variables,
Map<String,String> genericInfo)
Submit a new job to the scheduler from the catalogRestURL with provided variables ang generic information.
|
JobId |
submitFromCatalog(String catalogRestURL,
String bucketName,
String workflowName)
Submit a new job to the scheduler from the catalogRestURL without variables.
|
JobId |
submitFromCatalog(String catalogRestURL,
String bucketName,
String workflowName,
Map<String,String> variables)
Submit a new job to the scheduler from the catalogRestURL with provided variables.
|
JobId |
submitFromCatalog(String catalogRestURL,
String bucketName,
String workflowName,
Map<String,String> variables,
Map<String,String> genericInfo)
Submit a new job to the scheduler from the catalogRestURL with provided variables.
|
List<JobResult> |
waitForAllJobs(List<String> jobIds,
long timeout)
Causes the current thread to wait until the execution of all specified
jobs has finished or the elapse of specified wait time.
|
List<Map.Entry<String,TaskResult>> |
waitForAllTasks(String jobId,
List<String> taskNames,
long timeout)
Causes the current thread to wait until all the executions of specified
tasks finish or the elapse of specified amount of time.
|
Map.Entry<String,JobResult> |
waitForAnyJob(List<String> jobIds,
long timeout)
Causes the current thread to wait until the execution of any job finishes
or the elapse of the specified wait time.
|
Map.Entry<String,TaskResult> |
waitForAnyTask(String jobId,
List<String> taskNames,
long timeout)
Causes the current thread to wait until any of the specified tasks
finishes or the elapse of specified amount of time.
|
JobResult |
waitForJob(JobId jobId,
long timeout)
Causes the current thread to wait until the scheduler has finished the
execution of the specified job or the specified amount of time has
elapsed.
|
JobResult |
waitForJob(String jobId,
long timeout)
Causes the current thread to wait until the scheduler has finished the
execution of the specified job or the specified amount of time has
elapsed.
|
TaskResult |
waitForTask(String jobId,
String taskName,
long timeout)
Causes the current thread to wait until the scheduler has finished
executing the specified task or the elapse of specified elapse time.
|
addEventListener, addEventListener, addExternalEndpointUrl, addJobSignal, changeJobPriority, changeJobPriority, changePolicy, changeStartAt, changeStartAt, checkJobPermissionMethod, checkJobsPermissionMethod, checkJobsPermissionMethods, createLabels, deleteLabel, detachService, disconnect, enableRemoteVisualization, finishInErrorTask, freeze, getCompletedJobs, getCompletedTasks, getCurrentPolicy, getCurrentUser, getCurrentUserData, getFilteredStatistics, getGlobalSpaceURIs, getJobContent, getJobInfo, getJobResult, getJobResult, getJobResultMaps, getJobs, getJobServerLogs, getJobsInfoList, getJobState, getJobState, getJobsToSchedule, getLabels, getPortalConfiguration, getPreciousTaskNames, getPreciousTaskResults, getSchedulerProperties, getState, getState, getStatus, getSubject, getSubmissionModeCount, getSubmissionModeValues, getTaskIds, getTaskPaginated, getTaskPaginated, getTaskResult, getTaskResult, getTaskResultAllIncarnations, getTaskResultAllIncarnations, getTaskResultFromIncarnation, getTaskResultFromIncarnation, getTaskResultsByTag, getTaskResultsByTag, getTaskServerLogs, getTaskServerLogsByTag, getTaskState, getTaskStates, getTasksToSchedule, getTopExecutionTimeWorkflows, getTopPendingTimeWorkflows, getTopWorkflowsCumulatedCoreTime, getTopWorkflowsNumberOfNodes, getTopWorkflowsWithIssues, getUsers, getUserSpaceURIs, getUsersWithJobs, isConnected, kill, killJob, killJob, killJobs, killTask, killTask, linkResourceManager, listenJobLogs, listenJobLogs, pause, pauseJob, pauseJob, preemptTask, preemptTask, registerService, reloadPolicyConfiguration, removeEventListener, removeExternalEndpointUrl, removeJob, removeJob, removeJobLabels, removeJobs, removeJobs, renewSession, restartAllInErrorTasks, restartInErrorTask, restartTask, restartTask, reSubmit, resume, resumeJob, resumeJob, setLabelOnJobs, setLabels, shutdown, start, stop, submit, submit, updateLabel, validateJobSignal
getAccountUsage, getMyAccountUsage
putThirdPartyCredential, removeThirdPartyCredential, thirdPartyCredentialsKeySet
checkPermission
void init(ConnectionInfo connectionInfo) throws Exception
connectionInfo
- various info about the connection attemptException
- if an error occurs during the initializationConnectionInfo getConnectionInfo()
void setSession(String sid)
sid
- session identifierString getSession()
JobId submit(File job) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a local FileNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(URL job) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a urlNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(URL job, Map<String,String> variables) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a urlvariables
- job variables to use during the job executionNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(Map<String,String> genericInfos, URL job, Map<String,String> variables) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
genericInfos
- map with generic informationsjob
- a job provided as a urlvariables
- job variables to use during the job executionNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(URL job, Map<String,String> variables, Map<String,String> headerParams) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a urlvariables
- job variables to use during the job executionheaderParams
- map with request header parametersNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(URL job, Map<String,String> variables, Map<String,String> genericInfos, Map<String,String> headerParams) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a urlvariables
- job variables to use during the job executiongenericInfos
- map with generic informationsheaderParams
- map with request header parametersNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(File job, Map<String,String> variables) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a local Filevariables
- job variables to use during the job executionNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submit(File job, Map<String,String> variables, Map<String,String> genericInfos) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
job
- a job provided as a local Filevariables
- job variables to use during the job executiongenericInfos
- map with generic informationsNotConnectedException
JobCreationException
PermissionException
SubmissionClosedException
JobId submitFromCatalog(String catalogRestURL, String bucketName, String workflowName, Map<String,String> variables) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
catalogRestURL
- bucketName
- workflowName
- variables
- NotConnectedException
PermissionException
SubmissionClosedException
JobCreationException
JobId submitFromCatalog(String catalogRestURL, String bucketName, String workflowName, Map<String,String> variables, Map<String,String> genericInfo) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
catalogRestURL
- bucketName
- workflowName
- variables
- genericInfo
- map with generic informationNotConnectedException
PermissionException
SubmissionClosedException
JobCreationException
JobId submitFromCatalog(String catalogRestURL, String bucketName, String workflowName) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
catalogRestURL
- bucketName
- workflowName
- NotConnectedException
PermissionException
SubmissionClosedException
JobCreationException
JobId submitFromCatalog(String catalogRestURL, String calledWorkflow) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
catalogRestURL
- calledWorkflow
- NotConnectedException
PermissionException
SubmissionClosedException
JobCreationException
JobId submitFromCatalog(String catalogRestURL, String calledWorkflow, Map<String,String> variables) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
catalogRestURL
- calledWorkflow
- variables
- NotConnectedException
PermissionException
SubmissionClosedException
JobCreationException
JobId submitFromCatalog(String catalogRestURL, String calledWorkflow, Map<String,String> variables, Map<String,String> genericInfo) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException
It will execute the tasks of the jobs as soon as resources are available. The job will be considered as finished once every tasks have finished (error or success). Thus, user could get the job result according to the precious result.
catalogRestURL
- calledWorkflow
- variables
- genericInfo
- map with generic informationNotConnectedException
PermissionException
SubmissionClosedException
JobCreationException
List<JobIdDataAndError> multipleSubmitFromUrls(List<WorkflowUrlData> workflowUrlDataList) throws NotConnectedException, PermissionException
workflowUrlDataList
- list of objects containing workflow submission dataNotConnectedException
PermissionException
boolean isJobFinished(JobId jobId) throws NotConnectedException, UnknownJobException, PermissionException
jobId
- the job identifier objectNotConnectedException
- if the client is not logged in or the session has expiredUnknownJobException
- if the job identifier is invalidPermissionException
- if the user does not have permission to view the state of the
specified jobboolean isJobFinished(String jobId) throws NotConnectedException, UnknownJobException, PermissionException
jobId
- the job identifier stringNotConnectedException
UnknownJobException
PermissionException
isJobFinished(JobId)
JobResult waitForJob(JobId jobId, long timeout) throws NotConnectedException, UnknownJobException, PermissionException, TimeoutException
If the job execution finishes before the elapse of wait time, the result of the job is returned. Otherwise a timeout exception is thrown.
jobId
- the job identifier objecttimeout
- the maximum amount of time to waitNotConnectedException
- if the client is not logged in or the session has expiredUnknownJobException
- if the job identifier is invalidPermissionException
- if the user does not have permission to view the state of the
specified jobTimeoutException
- if the job execution does not finish before the elapse of
wait timeJobResult waitForJob(String jobId, long timeout) throws NotConnectedException, UnknownJobException, PermissionException, TimeoutException
If the job execution finishes before the elapse of wait time, the result of the job is returned. Otherwise a timeout exception is thrown.
jobId
- the job identifier stringNotConnectedException
UnknownJobException
PermissionException
TimeoutException
waitForJob(JobId, long)
boolean isTaskFinished(String jobId, String taskName) throws UnknownJobException, NotConnectedException, PermissionException, UnknownTaskException
jobId
- the string identifier of the job to which the task is belongtaskName
- the task nameUnknownJobException
- if the job identifier is invalidNotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to view the state of the
taskUnknownTaskException
- if the task name is invalidTaskResult waitForTask(String jobId, String taskName, long timeout) throws UnknownJobException, NotConnectedException, PermissionException, UnknownTaskException, TimeoutException
If the task execution finishes before the elapse of wait time, the result of the task is returned. Otherwise a timeout exception is thrown.
jobId
- the string identifier of the job to which the task is belongtaskName
- the task nameUnknownJobException
- if the job identifier is invalidNotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to view the state of
taskUnknownTaskException
- if the task name is invalidTimeoutException
- if the task execution does not finish before the elapse of
wait timeList<JobResult> waitForAllJobs(List<String> jobIds, long timeout) throws NotConnectedException, UnknownJobException, PermissionException, TimeoutException
Returns a list of job results, if the execution of all jobs specified finishes before the elapse of the wait time. Otherwise a timeout exception is thrown.
jobIds
- the list of job identifier stingstimeout
- the maximum amount of wait timeNotConnectedException
- if the client is not logged in or the session has expiredUnknownJobException
- if one of jobs specified is invalidPermissionException
- if the user does not have permission to view the state of one
of the specified jobsTimeoutException
- if the execution of all jobs specified does not finish before
the elapse of specified wait timeMap.Entry<String,JobResult> waitForAnyJob(List<String> jobIds, long timeout) throws NotConnectedException, UnknownJobException, PermissionException, TimeoutException
Returns the string identifier and result of the finished job, if any of the execution of the jobs finishes before the elapse of wait time. Otherwise a timeout exception is thrown.
jobIds
- the list of job identifier stringstimeout
- the maximum amount of wait timeNotConnectedException
- if the client is not logged in or the session has expiredUnknownJobException
- if only of the job identifiers is invalidPermissionException
- if the user does not have permission to view the job stateTimeoutException
- if none of the executions of jobs finishes before the elapse
of wait timeMap.Entry<String,TaskResult> waitForAnyTask(String jobId, List<String> taskNames, long timeout) throws UnknownJobException, NotConnectedException, PermissionException, UnknownTaskException, TimeoutException
Returns name and the result of a finished task. Otherwise a timeout exception is thrown.
jobId
- the job identifier of the job to which the specified tasks
belongtaskNames
- the names of the taskstimeout
- the maximum amount of wait timeUnknownJobException
- if the job identifier is invalidNotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to view the state of the
tasksUnknownTaskException
- if the name of a task is invalidTimeoutException
- if none of the executions of tasks finish before the elapse
of wait timeList<Map.Entry<String,TaskResult>> waitForAllTasks(String jobId, List<String> taskNames, long timeout) throws UnknownJobException, NotConnectedException, PermissionException, UnknownTaskException, TimeoutException
Returns a list of task name and task result pairs, if all the executions of specified tasks finishes before the elapse of wait time. Otherwise a timeout exception is thrown.
jobId
- the identifier of the job to which all the specified tasks
belongtaskNames
- the task namestimeout
- the maximum amount of wait timeUnknownJobException
- if the job identifier is invalidNotConnectedException
- if the client is not logged in or the session has expired.PermissionException
- if the user does not have permission to view the state of the
tasksUnknownTaskException
- if a task name is invalidTimeoutException
- if all the executions of the tasks do not finish before the
elapse of maximum wait timeboolean pushFile(String spacename, String pathname, String filename, String file) throws NotConnectedException, PermissionException
spacename
- the dataspace namepathname
- the path of the stored file with respect to the dataspacefilename
- the name of the stored file with respect to the dataspacefile
- the local fileNotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to upload the file to
the specified dataspacevoid pullFile(String space, String pathname, String outputFile) throws NotConnectedException, PermissionException
space
- the dataspace namepathname
- the pathname of the file with respect the dataspaceoutputFile
- the name of the output fileNotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to retrieve the
specified file from the serverboolean deleteFile(String space, String pathname) throws NotConnectedException, PermissionException
space
- the dataspace namepathname
- the pathname of the file with respect to the dataspaceNotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to delete the file from
the server