|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.globus.exec.client.GlobusRun
This command-line tool requests and submits jobs to a GT4 GRAM server.
Job Service Destruction
Execution errors and user interrupt events are handled by automatically destroying the requested job service(s), unless the -batch option is on the command-line. The -batch option prevents the tool from listening to job state changes and from waiting for the job to finish. If -batch is selected, the command will return as soon as the remote job has been submitted.
The behavior of the tool with respect to job service destruction will vary in response to several kinds of events:
If the virtual machine aborts, that is, stops running without shutting down cleanly, for instance because it received a SIGKILL signal on Unix, then no guarantee can be made about whether or not the job service(s) will be destroyed.
Note: the shutdown behavior explained above cannot be guaranteed if the JVM option -Xrs is entered. The recommended way to disable service destruction is to specify the -batch option on the command-line. Use -help for more help and a list of available options.
| Nested Class Summary | |
private class |
GlobusRun.ShutdownHook
|
| Field Summary | |
private boolean |
batch
|
private static java.lang.String |
DATE_FORMAT
|
private boolean |
delegationEnabled
|
private static java.lang.String |
descriptionDesc
|
private static java.lang.String |
DURATION_FORMAT
Constants for termination time options. |
private static java.lang.String |
ERROR_MESSAGE_PREFIX
|
private static java.lang.String |
GLOBUS_VERSION
|
private static int |
GLOBUSRUN_ARG_AUTHENTICATE_ONLY
|
private static int |
GLOBUSRUN_ARG_BATCH
|
private static int |
GLOBUSRUN_ARG_DRYRUN
|
private static int |
GLOBUSRUN_ARG_FULL_DELEGATION
|
private static int |
GLOBUSRUN_ARG_LIST
|
private static int |
GLOBUSRUN_ARG_PARSE_ONLY
|
private static int |
GLOBUSRUN_ARG_QUIET
Bit masks for command-line options. |
private static org.globus.util.I18n |
i18n
|
private boolean |
isInterrupted
|
private GramJob |
job
Job submission member variables. |
private static java.lang.String |
JOB_FAILED
|
private static java.lang.String |
JOB_STATE_PREFIX
|
private boolean |
jobCompleted
|
private boolean |
limitedDelegation
|
private static org.apache.commons.logging.Log |
logger
|
private boolean |
noInterruptHandling
Application error state. |
private boolean |
normalApplicationEnd
|
private static java.lang.String |
optionsDesc
|
private java.lang.String |
proxyPath
|
private boolean |
quiet
|
private static long |
STATE_CHANGE_BASE_TIMEOUT_MILLIS
|
private java.lang.String |
submissionID
|
private static java.lang.String |
usageDesc
|
| Constructor Summary | |
GlobusRun(java.lang.String[] args)
|
|
| Method Summary | |
private java.lang.String |
convertEPRtoString(org.apache.axis.message.addressing.EndpointReferenceType endpoint)
|
private void |
destroyJob(GramJob job)
destroys the job WSRF resource Precondition: job ! =null && job.isRequested() && !job.isLocallyDestroyed() |
private void |
exit(int exitCode)
Must be used instead of System.exit. |
private GramJob |
getExistingJob(java.lang.String jobHandle)
|
private void |
kill(java.lang.String jobHandle)
|
private void |
listUserJobs(org.apache.axis.message.addressing.EndpointReferenceType factoryEndpoint)
|
static void |
main(java.lang.String[] args)
|
private void |
printError(java.lang.String message)
Print error message with prefix. |
private void |
printJobFault(GramJob job)
|
private void |
printJobState(org.globus.exec.generated.StateEnumeration jobState,
boolean holding)
|
private void |
printMessage(java.lang.String message)
Print message to user if not in quiet mode. |
private void |
processArguments(java.lang.String[] args)
|
private void |
processJob(GramJob job,
org.apache.axis.message.addressing.EndpointReferenceType factoryEndpoint,
boolean batch)
|
private void |
refreshJobStatus(GramJob job)
|
private void |
release(java.lang.String jobHandle)
|
private void |
state(java.lang.String jobHandle)
|
void |
stateChanged(GramJob job)
Callback as a GramJobListener. |
private void |
submitRSL(org.apache.axis.message.addressing.EndpointReferenceType factoryEndpoint,
java.lang.String simpleJobCommandLine,
java.io.File rslFile,
Authorization authorization,
java.lang.Integer xmlSecurity,
boolean batchMode,
boolean dryRunMode,
boolean quiet,
java.util.Date duration,
java.util.Date terminationDate,
int timeout)
|
private void |
waitForJobCompletion(long maxWaitPerStateNotificationMillis)
Since messaging is assumed to be unreliable (i.e. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final long STATE_CHANGE_BASE_TIMEOUT_MILLIS
private static final java.lang.String GLOBUS_VERSION
private static org.apache.commons.logging.Log logger
private GramJob job
private boolean jobCompleted
private boolean batch
private boolean limitedDelegation
private boolean delegationEnabled
private boolean quiet
private static final java.lang.String DURATION_FORMAT
private static final java.lang.String DATE_FORMAT
private static final int GLOBUSRUN_ARG_QUIET
private static final int GLOBUSRUN_ARG_DRYRUN
private static final int GLOBUSRUN_ARG_PARSE_ONLY
private static final int GLOBUSRUN_ARG_AUTHENTICATE_ONLY
private static final int GLOBUSRUN_ARG_BATCH
private static final int GLOBUSRUN_ARG_FULL_DELEGATION
private static final int GLOBUSRUN_ARG_LIST
private java.lang.String submissionID
private static final java.lang.String usageDesc
private static final java.lang.String descriptionDesc
private static final java.lang.String optionsDesc
private static final java.lang.String ERROR_MESSAGE_PREFIX
private static final java.lang.String JOB_FAILED
private static final java.lang.String JOB_STATE_PREFIX
private boolean noInterruptHandling
private boolean isInterrupted
private boolean normalApplicationEnd
private java.lang.String proxyPath
private static org.globus.util.I18n i18n
| Constructor Detail |
public GlobusRun(java.lang.String[] args)
| Method Detail |
private void exit(int exitCode)
System.exit. Marks the application
as
exitCode - the exit code of the application. If <=0 then
the application will be marked as ending normally (i.e. no error).public static void main(java.lang.String[] args)
private void processArguments(java.lang.String[] args)
private void listUserJobs(org.apache.axis.message.addressing.EndpointReferenceType factoryEndpoint)
private void release(java.lang.String jobHandle)
private void kill(java.lang.String jobHandle)
private void state(java.lang.String jobHandle)
private void refreshJobStatus(GramJob job)
private GramJob getExistingJob(java.lang.String jobHandle)
private void submitRSL(org.apache.axis.message.addressing.EndpointReferenceType factoryEndpoint,
java.lang.String simpleJobCommandLine,
java.io.File rslFile,
Authorization authorization,
java.lang.Integer xmlSecurity,
boolean batchMode,
boolean dryRunMode,
boolean quiet,
java.util.Date duration,
java.util.Date terminationDate,
int timeout)
private void processJob(GramJob job,
org.apache.axis.message.addressing.EndpointReferenceType factoryEndpoint,
boolean batch)
private void waitForJobCompletion(long maxWaitPerStateNotificationMillis)
maxWaitPerStateNotificationMillis - long base timeout for each
state transition before
pulling the state from the
servicepublic void stateChanged(GramJob job)
stateChanged in interface GramJobListenerjob - The GramJob whose status has changed.private void printMessage(java.lang.String message)
message - the message to send to stdout.private void printError(java.lang.String message)
private void printJobState(org.globus.exec.generated.StateEnumeration jobState,
boolean holding)
private void printJobFault(GramJob job)
private java.lang.String convertEPRtoString(org.apache.axis.message.addressing.EndpointReferenceType endpoint)
throws java.lang.Exception
java.lang.Exception
private void destroyJob(GramJob job)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||