org.griphyn.cPlanner.namespace
Class VDS

java.lang.Object
  extended by org.griphyn.cPlanner.classes.Data
      extended by org.griphyn.cPlanner.namespace.Namespace
          extended by org.griphyn.cPlanner.namespace.VDS
All Implemented Interfaces:
Cloneable

public class VDS
extends Namespace

A Planner specific namespace. It defines profiles that are used to fine tune Pegasus behaviour on a per job basis if required.

Version:
$Revision: 299 $
Author:
Karan Vahi, Gaurang Mehta

Nested Class Summary
 
Nested classes/interfaces inherited from class org.griphyn.cPlanner.namespace.Namespace
Namespace.EmptyIterator
 
Field Summary
static String BUNDLE_KEY
          The name of the key that if set, determines the number of super jobs that are made corresponding to a logical transformation and an execution pool.
static String BUNDLE_STAGE_IN_KEY
          The name of the key that determines the bundling parameter for the stagein transfer node.
static String BUNDLE_STAGE_OUT_KEY
          The name of the key that determines the bundling parameter for the stageout transfer node.
static String CHAIN_STAGE_IN_KEY
          The name of the key that determines the number of chains of stagein nodes that are to be created per site.
static String CHANGE_DIR_KEY
          The name of the profile key that triggers the kickstart to change directory before launching an executable instead of launching the executable from the directory where kickstart is being run.
static String COLLAPSE_KEY
          The name of the key that if set in the VDS namespace determines the number of jobs that are collapsed into the super job.
static String COLLAPSER_KEY
          The name of the key that determines the collapser executable to be used to run the merged/collapsed job.
static String CONDOR_STYLE
          The style indicating that the submit files are to be generated for a vanilla condor execution.
static String DEPRECATED_BUNDLE_STAGE_IN_KEY
          The deprecated bundle stagein key.
static String DEPRECATED_CHANGE_DIR_KEY
          The deprecated change dir key.
static String GLIDEIN_STYLE
          The style indicating that the submit files are to be generated for a glidein execution.
static String GLOBUS_STYLE
          The style indicating that the submit files are to be generated for a CondorG execution.
static String GRIDSTART_ARGUMENTS_KEY
          The name of the profile key, that determines the arguments with which the GridStart that is used to launch a job on the remote site is invoked with.
static String GRIDSTART_KEY
          The name of the profile key that determines the launching executable to be used to launch a job on the grid.
static String GROUP_KEY
          The name of the profile key in vds namespace that does the grouping.
static String LABEL_KEY
          The name of the profile key in vds namespace that does the labelling by default.
protected static Map mDeprecatedTable
          The table containing the mapping of the deprecated keys to the newer keys.
protected  String mNamespace
          The name of the implementing namespace.
static String NAMESPACE_NAME
          The name of the namespace that this class implements.
static String REMOTE_INITIALDIR_KEY
          The name of the key that sets a remote initial dir for a condor globus job.
static String RUNTIME_KEY
          The name of the profile key when associated with a transformation in the transformation catalog gives expected runtime in seconds.
static String STYLE_KEY
          The name of the key, that denotes the style of the dag that is constructed.
static String TRANSFER_ARGUMENTS_KEY
          The name of the profile key, that when associated with transfer jobs determines the arguments with which the transfer executable is invoked.
static String TRANSFER_PROXY_KEY
          The name of the profile key if associated with a job, results in an explicit transfer of the proxy from the submit host to the remote site, instead of banking upon CondorG to transfer the proxy.
 
Fields inherited from class org.griphyn.cPlanner.namespace.Namespace
DEPRECATED_KEY, MALFORMED_KEY, mProfileMap, NOT_PERMITTED_KEY, UNKNOWN_KEY, VALID_KEY, VERSION
 
Fields inherited from class org.griphyn.cPlanner.classes.Data
mLogger, mLogMsg
 
Constructor Summary
VDS()
          The default constructor.
VDS(Map mp)
          The overloaded constructor.
 
Method Summary
 int checkKey(String key, String value)
          This checks whether the key passed by the user is valid in the current namespace or not.
 void checkKeyInNS(PegasusProperties properties, String pool)
          It puts in the namespace specific information specified in the properties file into the namespace.
 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 containsKey(Object key)
          Returns true if the namespace contains a mapping for the specified key.
 Map deprecatedTable()
          Singleton access to the deprecated table that holds the deprecated keys, and the keys that replace them.
 Object get(Object key)
          Returns the value to which this namespace maps the specified key.
 boolean getBooleanValue(Object key)
          Returns a boolean value, that a particular key is mapped to in this namespace.
 String getStringValue(Object key)
          Returns a String value, that a particular key is mapped to in this namespace.
 void merge(Namespace profiles)
          Merge the profiles in the namespace in a controlled manner.
 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.
 void unknownKey(String key, String value)
          Warns about an unknown profile key and constructs it anyway.
 
Methods inherited from class org.griphyn.cPlanner.namespace.Namespace
checkKeyInNS, checkKeyInNS, checkKeyInNS, checkKeyInNS, deprecatedKey, getProfileKeyIterator, isNamespaceValid, keySet, malformedKey, notPermitted, removeKey
 
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

REMOTE_INITIALDIR_KEY

public static final String REMOTE_INITIALDIR_KEY
The name of the key that sets a remote initial dir for a condor globus job.

See Also:
Constant Field Values

BUNDLE_KEY

public static final String BUNDLE_KEY
The name of the key that if set, determines the number of super jobs that are made corresponding to a logical transformation and an execution pool. It overrides the collapse key if set.

See Also:
COLLAPSE_KEY, Constant Field Values

COLLAPSE_KEY

public static final String COLLAPSE_KEY
The name of the key that if set in the VDS namespace determines the number of jobs that are collapsed into the super job.

See Also:
Constant Field Values

COLLAPSER_KEY

public static final String COLLAPSER_KEY
The name of the key that determines the collapser executable to be used to run the merged/collapsed job.

See Also:
Constant Field Values

GROUP_KEY

public static final String GROUP_KEY
The name of the profile key in vds namespace that does the grouping.

See Also:
Constant Field Values

LABEL_KEY

public static final String LABEL_KEY
The name of the profile key in vds namespace that does the labelling by default.

See Also:
Constant Field Values

GRIDSTART_KEY

public static final String GRIDSTART_KEY
The name of the profile key that determines the launching executable to be used to launch a job on the grid.

See Also:
Constant Field Values

GRIDSTART_ARGUMENTS_KEY

public static final String GRIDSTART_ARGUMENTS_KEY
The name of the profile key, that determines the arguments with which the GridStart that is used to launch a job on the remote site is invoked with. The arguments are appended to the ones constructed by default by the GridStart implementation.

See Also:
Constant Field Values

DEPRECATED_CHANGE_DIR_KEY

public static final String DEPRECATED_CHANGE_DIR_KEY
The deprecated change dir key.

See Also:
CHANGE_DIR_KEY, Constant Field Values

CHANGE_DIR_KEY

public static final String CHANGE_DIR_KEY
The name of the profile key that triggers the kickstart to change directory before launching an executable instead of launching the executable from the directory where kickstart is being run.

See Also:
Constant Field Values

DEPRECATED_BUNDLE_STAGE_IN_KEY

public static final String DEPRECATED_BUNDLE_STAGE_IN_KEY
The deprecated bundle stagein key.

See Also:
CHANGE_DIR_KEY, Constant Field Values

BUNDLE_STAGE_IN_KEY

public static final String BUNDLE_STAGE_IN_KEY
The name of the key that determines the bundling parameter for the stagein transfer node.

See Also:
Constant Field Values

BUNDLE_STAGE_OUT_KEY

public static final String BUNDLE_STAGE_OUT_KEY
The name of the key that determines the bundling parameter for the stageout transfer node.

See Also:
Constant Field Values

CHAIN_STAGE_IN_KEY

public static final String CHAIN_STAGE_IN_KEY
The name of the key that determines the number of chains of stagein nodes that are to be created per site.

See Also:
Constant Field Values

TRANSFER_PROXY_KEY

public static final String TRANSFER_PROXY_KEY
The name of the profile key if associated with a job, results in an explicit transfer of the proxy from the submit host to the remote site, instead of banking upon CondorG to transfer the proxy.

See Also:
Constant Field Values

TRANSFER_ARGUMENTS_KEY

public static final String TRANSFER_ARGUMENTS_KEY
The name of the profile key, that when associated with transfer jobs determines the arguments with which the transfer executable is invoked.

See Also:
Constant Field Values

RUNTIME_KEY

public static final String RUNTIME_KEY
The name of the profile key when associated with a transformation in the transformation catalog gives expected runtime in seconds.

See Also:
Constant Field Values

STYLE_KEY

public static final String STYLE_KEY
The name of the key, that denotes the style of the dag that is constructed. Possible styles can be -condor(glidein,flocking,submitting directly to condor pool) -globus(condorg)

See Also:
Constant Field Values

CONDOR_STYLE

public static final String CONDOR_STYLE
The style indicating that the submit files are to be generated for a vanilla condor execution.

See Also:
Constant Field Values

GLOBUS_STYLE

public static final String GLOBUS_STYLE
The style indicating that the submit files are to be generated for a CondorG execution.

See Also:
Constant Field Values

GLIDEIN_STYLE

public static final String GLIDEIN_STYLE
The style indicating that the submit files are to be generated for a glidein execution.

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)

mDeprecatedTable

protected static Map mDeprecatedTable
The table containing the mapping of the deprecated keys to the newer keys.

Constructor Detail

VDS

public VDS()
The default constructor. Note that the map is not allocated memory at this stage. It is done so in the overloaded construct function.


VDS

public VDS(Map mp)
The overloaded constructor.

Parameters:
mp - the initial map.
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

construct

public void construct(String key,
                      String value)
Constructs a new element of the format (key=value). It first checks if the map has been initialised or not. If not then allocates memory first. It converts the key to lower case before storing.

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

checkKey

public int checkKey(String key,
                    String value)
This checks whether the key passed by the user is valid in the current namespace or not.

Specified by:
checkKey in class Namespace
Parameters:
key - (left hand side)
value - (right hand side)
Returns:
Namespace.VALID_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. This is used to load the appropriate collapser for the job. Any preexisting profile is preferred over the one in the property file.

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.
See Also:
COLLAPSER_KEY, TRANSFER_PROXY_KEY

merge

public void merge(Namespace profiles)
Merge the profiles in the namespace in a controlled manner. In case of intersection, the new profile value overrides, the existing profile value.

Specified by:
merge in class Namespace
Parameters:
profiles - the Namespace object containing the profiles.

deprecatedTable

public Map deprecatedTable()
Singleton access to the deprecated table that holds the deprecated keys, and the keys that replace them.

Overrides:
deprecatedTable in class Namespace
Returns:
Map

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
Returns:
the textual description.

unknownKey

public void unknownKey(String key,
                       String value)
Warns about an unknown profile key and constructs it anyway. Constructs a new RSL element of the format (key=value).

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

containsKey

public boolean containsKey(Object key)
Returns true if the namespace contains a mapping for the specified key. More formally, returns true if and only if this map contains at a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.) It also returns false if the map does not exist.

Overrides:
containsKey in class Namespace
Parameters:
key - The key that you want to search for in the namespace.
Returns:
boolean

get

public Object get(Object key)
Returns the value to which this namespace maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

Overrides:
get in class Namespace
Parameters:
key - The key whose value you want.
Returns:
the object

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

getStringValue

public String getStringValue(Object key)
Returns a String value, that a particular key is mapped to in this namespace. If is not populated in the namespace null is returned.

Parameters:
key - The key whose boolean value you desire.
Returns:
String if key is in the namespace null otherwise.

clone

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

Overrides:
clone in class Object
Returns:
the Cloned object


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