edu.isi.pegasus.planner.code.generator.condor.style
Class Condor

java.lang.Object
  extended by edu.isi.pegasus.planner.code.generator.condor.style.Abstract
      extended by edu.isi.pegasus.planner.code.generator.condor.style.Condor
All Implemented Interfaces:
CondorStyle
Direct Known Subclasses:
CondorC, CondorGlideinWMS

public class Condor
extends Abstract

Enables a job to be directly submitted to the condor pool of which the submit host is a part of. This style is applied for jobs to be run - on the submit host in the scheduler universe (local pool execution) - on the local condor pool of which the submit host is a part of

Version:
$Revision: 5152 $
Author:
Karan Vahi

Field Summary
static String LOCAL_UNIVERSE
           
private  boolean mPegasusLiteEnabled
          A boolean indicating whether pegasus lite mode is picked up or not.
private  String mPegasusLiteLocalWrapper
          Path to Pegasus Lite local wrapper script.
static String PARALLEL_UNIVERSE
           
static String PEGASUS_CONNECT_STDIN_KEY
          Whether to connect stdin or not
static String PEGASUS_EXECUTE_IN_INITIAL_DIR
          The name of the environment variable that determines if job should be executed in initial dir or not
static String PEGASUS_INITIAL_DIR_KEY
          The name of the environment variable for the initial dir for pegasus lite local
static String PEGASUS_LITE_LOCAL_FILE_BASENAME
          The Pegasus Lite local wrapper basename.
static String PEGASUS_TRANSFER_INPUT_FILES_KEY
          The name of the environment variable for transferring input files
static String PEGASUS_TRANSFER_OUTPUT_FILES_KEY
          The name of the environment variable for transferring output files
static String SCHEDULER_UNIVERSE
           
static String STANDARD_UNIVERSE
           
static String STYLE_NAME
          The name of the style being implemented.
static String TRANSFER_EXECUTABLE_KEY
           
static String UNIVERSE_KEY
           
static String VANILLA_UNIVERSE
           
 
Fields inherited from class edu.isi.pegasus.planner.code.generator.condor.style.Abstract
mCredentialFactory, mLogger, mProps, mSiteStore
 
Fields inherited from interface edu.isi.pegasus.planner.code.generator.condor.CondorStyle
VERSION
 
Constructor Summary
Condor()
          The default constructor.
 
Method Summary
 void apply(Job job)
          Applies the condor style to the job.
protected  String getSubmitHostPathToPegasusLiteLocal()
          Determines the path to PegasusLite local job
 void initialize(PegasusBag bag, CredentialHandlerFactory credentialFactory)
          Initializes the Code Style implementation.
private  void wrapJobWithLocalPegasusLite(Job job)
          Wraps the local universe jobs with a local Pegasus Lite wrapper to get around the Condor file IO bug for local universe job
 
Methods inherited from class edu.isi.pegasus.planner.code.generator.condor.style.Abstract
apply, applyCredentialsForLocalExec, applyCredentialsForRemoteExec, errorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIVERSE_KEY

public static final String UNIVERSE_KEY
See Also:
Constant Field Values

VANILLA_UNIVERSE

public static final String VANILLA_UNIVERSE
See Also:
Constant Field Values

SCHEDULER_UNIVERSE

public static final String SCHEDULER_UNIVERSE
See Also:
Constant Field Values

STANDARD_UNIVERSE

public static final String STANDARD_UNIVERSE
See Also:
Constant Field Values

LOCAL_UNIVERSE

public static final String LOCAL_UNIVERSE
See Also:
Constant Field Values

PARALLEL_UNIVERSE

public static final String PARALLEL_UNIVERSE
See Also:
Constant Field Values

TRANSFER_EXECUTABLE_KEY

public static final String TRANSFER_EXECUTABLE_KEY
See Also:
Constant Field Values

STYLE_NAME

public static final String STYLE_NAME
The name of the style being implemented.

See Also:
Constant Field Values

PEGASUS_LITE_LOCAL_FILE_BASENAME

public static final String PEGASUS_LITE_LOCAL_FILE_BASENAME
The Pegasus Lite local wrapper basename.

See Also:
Constant Field Values

PEGASUS_TRANSFER_INPUT_FILES_KEY

public static final String PEGASUS_TRANSFER_INPUT_FILES_KEY
The name of the environment variable for transferring input files

See Also:
Constant Field Values

PEGASUS_TRANSFER_OUTPUT_FILES_KEY

public static final String PEGASUS_TRANSFER_OUTPUT_FILES_KEY
The name of the environment variable for transferring output files

See Also:
Constant Field Values

PEGASUS_INITIAL_DIR_KEY

public static final String PEGASUS_INITIAL_DIR_KEY
The name of the environment variable for the initial dir for pegasus lite local

See Also:
Constant Field Values

PEGASUS_EXECUTE_IN_INITIAL_DIR

public static final String PEGASUS_EXECUTE_IN_INITIAL_DIR
The name of the environment variable that determines if job should be executed in initial dir or not

See Also:
Constant Field Values

PEGASUS_CONNECT_STDIN_KEY

public static final String PEGASUS_CONNECT_STDIN_KEY
Whether to connect stdin or not

See Also:
Constant Field Values

mPegasusLiteEnabled

private boolean mPegasusLiteEnabled
A boolean indicating whether pegasus lite mode is picked up or not.


mPegasusLiteLocalWrapper

private String mPegasusLiteLocalWrapper
Path to Pegasus Lite local wrapper script.

Constructor Detail

Condor

public Condor()
The default constructor.

Method Detail

initialize

public void initialize(PegasusBag bag,
                       CredentialHandlerFactory credentialFactory)
                throws CondorStyleException
Initializes the Code Style implementation.

Specified by:
initialize in interface CondorStyle
Overrides:
initialize in class Abstract
Parameters:
bag - the bag of initialization objects
credentialFactory - the credential handler factory
Throws:
CondorStyleFactoryException - that nests any error that might occur during the instantiation of the implementation.
CondorStyleException

apply

public void apply(Job job)
           throws CondorStyleException
Applies the condor style to the job. Changes the job so that it results in generation of a condor style submit file that can be directly submitted to the underlying condor scheduler on the submit host, without going through CondorG. This applies to the case of - local site execution - submitting directly to the condor pool of which the submit host is a part of.

Parameters:
job - the job on which the style needs to be applied.
Throws:
CondorStyleException - in case of any error occuring code generation.

wrapJobWithLocalPegasusLite

private void wrapJobWithLocalPegasusLite(Job job)
                                  throws CondorStyleException
Wraps the local universe jobs with a local Pegasus Lite wrapper to get around the Condor file IO bug for local universe job

Parameters:
job - the job that needs to be wrapped.
Throws:
CondorStyleException

getSubmitHostPathToPegasusLiteLocal

protected String getSubmitHostPathToPegasusLiteLocal()
Determines the path to PegasusLite local job

Returns:
the path on the submit host.


Copyright © 2011 The University of Southern California. All Rights Reserved.