org.gcube.application.enm.service
Class ExecutionResource

java.lang.Object
  extended by org.gcube.application.enm.service.ExecutionResource
Direct Known Subclasses:
COMPsExecutionResource

public abstract class ExecutionResource
extends Object

Execution resource providers must extend this class with the implementation details specific to their underlying platforms. They must override the constructor ExecutionResource(), which is used by PluginLoader to load and inject new providers into the service.

Author:
Erik Torres

Field Summary
protected  InformationSystemClient isClient
           
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
 
Constructor Summary
ExecutionResource()
          This default constructor is used by PluginLoader to load new execution resource providers into the service.
 
Method Summary
abstract  void cancelExperiment(UUID uuid, String jobId)
          Cancels the job at the execution resource.
abstract  void cleanExperimentOuput(UUID uuid, String jobId)
          Clean up the output of an experiment from the remote execution site.
abstract  String getLogAsFile(org.gcube.application.enm.common.xml.logs.LogType log, org.gcube.contentmanagement.blobstorage.service.IClient storageClient, String credentials)
          Retrieves the logs of the job from the execution resource storying as a file with the storage service.
abstract  org.gcube.application.enm.common.xml.logs.ExperimentLogs getLogs(UUID uuid, String jobId)
          Retrieves the execution logs of the job from the execution resource.
abstract  String getResultAsFile(org.gcube.application.enm.common.xml.results.ResultType result, org.gcube.contentmanagement.blobstorage.service.IClient storageClient, String credentials)
          Retrieves the results of the job from the execution resource storying as a file with the storage service.
abstract  org.gcube.application.enm.common.xml.results.ExperimentResults getResults(UUID uuid, String jobId)
          Retrieves the results of the job from the execution resource.
abstract  org.gcube.application.enm.common.xml.status.ExperimentStatus getStatus(UUID uuid, String jobId)
          Retrieves the status of the job from the execution resource.
abstract  String sumbitExperiment(UUID uuid, org.gcube.application.enm.common.xml.request.ExperimentRequest params)
          Submits and experiment to the execution resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.gcube.common.core.utils.logging.GCUBELog logger

isClient

protected InformationSystemClient isClient
Constructor Detail

ExecutionResource

public ExecutionResource()
This default constructor is used by PluginLoader to load new execution resource providers into the service.

Method Detail

sumbitExperiment

public abstract String sumbitExperiment(UUID uuid,
                                        org.gcube.application.enm.common.xml.request.ExperimentRequest params)
Submits and experiment to the execution resource.

Parameters:
uuid - The unequally unique identifier of the experiment.
params - The parameters of the experiment to submit.
Returns:
The local identifier of the job in the resource.

getStatus

public abstract org.gcube.application.enm.common.xml.status.ExperimentStatus getStatus(UUID uuid,
                                                                                       String jobId)
Retrieves the status of the job from the execution resource.

Parameters:
uuid - The unequally unique identifier of the experiment.
jobId - The local identifier of the job to monitor in the resource.
Returns:
The status of the job.

getResults

public abstract org.gcube.application.enm.common.xml.results.ExperimentResults getResults(UUID uuid,
                                                                                          String jobId)
Retrieves the results of the job from the execution resource.

Parameters:
uuid - The unequally unique identifier of the experiment.
jobId - The local identifier of the job in the resource.
Returns:
The results of the job from the execution resource.

getLogs

public abstract org.gcube.application.enm.common.xml.logs.ExperimentLogs getLogs(UUID uuid,
                                                                                 String jobId)
Retrieves the execution logs of the job from the execution resource.

Parameters:
uuid - The unequally unique identifier of the experiment.
jobId - The local identifier of the job in the resource.
Returns:
The execution logs of the job from the execution resource.

cancelExperiment

public abstract void cancelExperiment(UUID uuid,
                                      String jobId)
Cancels the job at the execution resource.

Parameters:
uuid - The unequally unique identifier of the experiment.
jobId - The local identifier of the job to cancel in the resource.

getResultAsFile

public abstract String getResultAsFile(org.gcube.application.enm.common.xml.results.ResultType result,
                                       org.gcube.contentmanagement.blobstorage.service.IClient storageClient,
                                       String credentials)
Retrieves the results of the job from the execution resource storying as a file with the storage service.

Parameters:
result - The result to store as file.
storageClient - The storage service client.
credentials - User credentials.
Returns:
The identifier of the file created in the storage service.

getLogAsFile

public abstract String getLogAsFile(org.gcube.application.enm.common.xml.logs.LogType log,
                                    org.gcube.contentmanagement.blobstorage.service.IClient storageClient,
                                    String credentials)
Retrieves the logs of the job from the execution resource storying as a file with the storage service.

Parameters:
log - The log to store as file.
storageClient - The storage service client.
credentials - User credentials.
Returns:
The identifier of the file created in the storage service.

cleanExperimentOuput

public abstract void cleanExperimentOuput(UUID uuid,
                                          String jobId)
Clean up the output of an experiment from the remote execution site.

Parameters:
uuid - The unequally unique identifier of the experiment.
jobId - The local identifier of the job in the resource.


Copyright © 2012. All Rights Reserved.