org.griphyn.cPlanner.namespace
Class Condor

java.lang.Object
  extended byorg.griphyn.cPlanner.classes.Data
      extended byorg.griphyn.cPlanner.namespace.Namespace
          extended byorg.griphyn.cPlanner.namespace.Condor

public class Condor
extends Namespace

This helper class helps in handling the arguments specified in the Condor namespace by the user either through dax or through profiles in pool.

Version:
$Revision: 1.16 $
Author:
Karan Vahi

Field Summary
static String FILE_SYSTEM_DOMAIN_KEY
          The name of the key that denotes the File System Domain.
static String GLOBUS_UNIVERSE
          The condor universe key value for vanilla universe.
static String GRID_JOB_TYPE_KEY
          The name of the key that specifies the grid job type.
static String GRID_UNIVERSE
          The condor universe key value for grid universe.
static String JOBMANAGER_TYPE_KEY
          The name of the key that specifies the jobmanager type.
protected  String mNamespace
          The name of the implementing namespace.
static String NAMESPACE_NAME
          The name of the namespace that this class implements.
static String PRIORITY_KEY
          The name of the key that specifies the priority for the job.
static String REQUIREMENTS_KEY
          The name of the key that denotes the requirements of the job.
static String SCHEDULER_UNIVERSE
          The condor universe key value for scheduler universe.
static String STANDARD_UNIVERSE
          The condor universe key value for standard universe.
static String TRANSFER_IP_FILES_KEY
          The name of the key that specifies transfer of input files.
static String UNIVERSE_KEY
          The name of the key that denotes the condor universe key.
static String VANILLA_UNIVERSE
          The condor universe key value for vanilla universe.
 
Fields inherited from class org.griphyn.cPlanner.namespace.Namespace
DEPRECATED_KEY, MALFORMED_KEY, mProfileMap, NOT_PERMITTED_KEY, UNKNOWN_KEY, VALID_KEY
 
Fields inherited from class org.griphyn.cPlanner.classes.Data
mLogger, mLogMsg
 
Constructor Summary
Condor()
          The default constructor.
Condor(Map mp)
          The overloaded constructor
 
Method Summary
 void addIPFileForTransfer(String file)
          Adds an input file that is to be transferred from the submit host via the Condor File Transfer Mechanism.
 int checkKey(String key, String value)
          Additional method to handle the Condor namespace with convenience mappings.
 void checkKeyInNS(PegasusProperties properties, String pool)
          It puts in the namespace specific information specified in the properties file into the namespace.
 void checkKeyInNS(String key, String value)
          This checks the whether a key value pair specified is valid in the current namespace or not by calling the checkKey function and then on the basis of the values returned puts them into the associated map in the class.
 Object clone()
          Returns a copy of the current namespace object.
 void construct(String key, String value)
          Constructs a new element of the format (key=value).
 boolean getBooleanValue(Object key)
          Returns a boolean value, that a particular key is mapped to in this namespace.
 String namespaceName()
          Returns the name of the namespace associated with the profile implementations.
 String toString()
          Converts the contents of the map into the string that can be put in the Condor file for printing.
 
Methods inherited from class org.griphyn.cPlanner.namespace.Namespace
checkKeyInNS, checkKeyInNS, checkKeyInNS, containsKey, deprecatedKey, deprecatedTable, get, isNamespaceValid, keySet, malformedKey, notPermitted, removeKey, unknownKey
 
Methods inherited from class org.griphyn.cPlanner.classes.Data
setToString, vectorToString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAMESPACE_NAME

public static final String NAMESPACE_NAME
The name of the namespace that this class implements.

See Also:
Constant Field Values

REQUIREMENTS_KEY

public static final String REQUIREMENTS_KEY
The name of the key that denotes the requirements of the job.

See Also:
Constant Field Values

UNIVERSE_KEY

public static final String UNIVERSE_KEY
The name of the key that denotes the condor universe key.

See Also:
Constant Field Values

FILE_SYSTEM_DOMAIN_KEY

public static final String FILE_SYSTEM_DOMAIN_KEY
The name of the key that denotes the File System Domain. Is actually propogated to the expression for the Requirements Key.

See Also:
REQUIREMENTS_KEY, Constant Field Values

GRID_JOB_TYPE_KEY

public static final String GRID_JOB_TYPE_KEY
The name of the key that specifies the grid job type.

See Also:
Constant Field Values

JOBMANAGER_TYPE_KEY

public static final String JOBMANAGER_TYPE_KEY
The name of the key that specifies the jobmanager type.

See Also:
Constant Field Values

TRANSFER_IP_FILES_KEY

public static final String TRANSFER_IP_FILES_KEY
The name of the key that specifies transfer of input files.

See Also:
Constant Field Values

PRIORITY_KEY

public static final String PRIORITY_KEY
The name of the key that specifies the priority for the job.

See Also:
Constant Field Values

VANILLA_UNIVERSE

public static final String VANILLA_UNIVERSE
The condor universe key value for vanilla universe.

See Also:
Constant Field Values

GRID_UNIVERSE

public static final String GRID_UNIVERSE
The condor universe key value for grid universe.

See Also:
Constant Field Values

GLOBUS_UNIVERSE

public static final String GLOBUS_UNIVERSE
The condor universe key value for vanilla universe.

See Also:
Constant Field Values

SCHEDULER_UNIVERSE

public static final String SCHEDULER_UNIVERSE
The condor universe key value for scheduler universe.

See Also:
Constant Field Values

STANDARD_UNIVERSE

public static final String STANDARD_UNIVERSE
The condor universe key value for standard universe.

See Also:
Constant Field Values

mNamespace

protected String mNamespace
The name of the implementing namespace. It should be one of the valid namespaces always.

See Also:
Namespace.isNamespaceValid(String)
Constructor Detail

Condor

public Condor()
The default constructor.


Condor

public Condor(Map mp)
The overloaded constructor

Parameters:
mp - map containing the profile keys.
Method Detail

namespaceName

public String namespaceName()
Returns the name of the namespace associated with the profile implementations.

Specified by:
namespaceName in class Namespace
Returns:
the namespace name.
See Also:
NAMESPACE_NAME

addIPFileForTransfer

public void addIPFileForTransfer(String file)
Adds an input file that is to be transferred from the submit host via the Condor File Transfer Mechanism. It also sets the associated condor keys like when_to_transfer and should_transfer_files.

Parameters:
file - the path to the file on the submit host.

checkKey

public int checkKey(String key,
                    String value)
Additional method to handle the Condor namespace with convenience mappings. Currently the following keys are not supported keys as they clash with Pegasus internals
 arguments	- not supported, got from the arguments tag in DAX
 copy_to_spool    - supported, limited to LCG sites at present where one needs
                    to stage in the kickstart. Pegasus sets it to false by default
                    for arch start stuff on the local pool, unless the user
                    overrides it.
 environment	- not supported, use env namespace fpr this
 executable       - not supported, this is got from the transformation catalog
 FileSystemDomain - supported, but is propogated to the classad expression
                    for requirements.
 globusscheduler  - not supported, Pegasus determines this on the basis of
                    it's planning strategy
 globusrsl        - not supported, rsl to populated through Globus namespace.
 grid_type        - OK (like gt2, gt4, condor)
 log              - not supported, as it has to be same for the whole dag
 notification     - OK
 noop_job         - OK (used for synchronizing jobs in graph)
 noop_job_exit_signal - OK
 noop_job_exit_code - OK
 periodic_release - OK
 periodic_remove  - OK
 priority         - OK
 queue		- required thing. always added
 remote_initialdir- not allowed, the working directory is picked up from
                    pool file and properties file
 stream_error     - not supported, as it is applicable only for globus jobs.
                    However it can be set thru properties.
 stream_output    - not supported, as it is applicable only for globus jobs.
                    However it can be set thru properties.
 transfer_executable  - supported, limited to LCG sites at present where one needs
                        to stage in the kickstart.
 transfer_input_files - supported, especially used to transfer proxies in
                        case of glide in pools.
 universe         - supported, especially used to incorporate glide in pools.
 

Specified by:
checkKey in class Namespace
Parameters:
key - is the key within the globus namespace, must be lowercase!
value - is the value for the given key.
Returns:
MALFORMED_KEY VALID_KEY UNKNOWN_KEY NOT_PERMITTED_KEY

checkKeyInNS

public void checkKeyInNS(PegasusProperties properties,
                         String pool)
It puts in the namespace specific information specified in the properties file into the namespace. The name of the pool is also passed, as many of the properties specified in the properties file are on a per pool basis. It handles the periodic_remove and periodic_release characteristics for condor jobs.

Specified by:
checkKeyInNS in class Namespace
Parameters:
properties - the PegasusProperties object containing all the properties that the user specified at various places (like .chimerarc, properties file, command line).
pool - the pool name where the job is scheduled to run.

checkKeyInNS

public void checkKeyInNS(String key,
                         String value)
This checks the whether a key value pair specified is valid in the current namespace or not by calling the checkKey function and then on the basis of the values returned puts them into the associated map in the class. In addition it transfers the FILE_SYSTEM_DOMAIN_KEY to the REQUIREMENTS_KEY.

Overrides:
checkKeyInNS in class Namespace
Parameters:
key - key that needs to be checked in the namespace for validity.
value - value of the key

construct

public void construct(String key,
                      String value)
Constructs a new element of the format (key=value). All the keys are converted to lower case before storing.

Overrides:
construct in class Namespace
Parameters:
key - is the left-hand-side
value - is the right hand side

getBooleanValue

public boolean getBooleanValue(Object key)
Returns a boolean value, that a particular key is mapped to in this namespace. If the key is mapped to a non boolean value or the key is not populated in the namespace false is returned.

Parameters:
key - The key whose boolean value you desire.
Returns:
boolean

toString

public String toString()
Converts the contents of the map into the string that can be put in the Condor file for printing.

Specified by:
toString in class Data

clone

public Object clone()
Returns a copy of the current namespace object.

Specified by:
clone in class Data
Returns:
the Cloned object


Copyright © 2003 The University of Chicago and The University of Southern California. All Rights Reserved.