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

java.lang.Object
  extended by edu.isi.pegasus.planner.code.generator.condor.style.Abstract
      extended by edu.isi.pegasus.planner.code.generator.condor.style.GLite
All Implemented Interfaces:
CondorStyle

public class GLite
extends Abstract

This implementation enables a job to be submitted via gLite to a grid sites. This is the style applied when job has a pegasus profile style key with value GLite associated with it.

This style should only be used when the condor on the submit host can directly talk to scheduler running on the cluster. In Pegasus there should be a separate compute site that has this style associated with it. This style should not be specified for the local site. As part of applying the style to the job, this style adds the following classads expressions to the job description

      +remote_queue  - value picked up from globus profile queue
      +remote_cerequirements - See below
 

The remote CE requirements are constructed from the following profiles associated with the job.The profiles for a job are derived from various sources - user properties - transformation catalog - site catalog - DAX Note it is upto the user to specify these or a subset of them. The following globus profiles if associated with the job are picked up

 hostcount  -> PROCS
 count      -> NODES
 maxwalltime-> WALLTIME
 
The following condor profiles if associated with the job are picked up
 priority  -> PRIORITY
 
All the env profiles are translated to MYENV For e.g. the expression in the submit file may look as
 +remote_cerequirements = "PROCS==18 && NODES==1 && PRIORITY==10 && WALLTIME==3600
   && PASSENV==1 && JOBNAME==\"TEST JOB\" && MYENV ==\"GAURANG=MEHTA,KARAN=VAHI\""
 
All the jobs that have this style applied dont have a remote directory specified in the submit directory. They rely on kickstart to change to the working directory when the job is launched on the remote node.

Version:
$Revision: 4817 $
Author:
Karan Vahi

Field Summary
static String STYLE_NAME
          The name of the style being implemented.
 
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
GLite()
          The default Constructor.
 
Method Summary
protected  void addSubExpression(StringBuffer sb, String key, Integer value)
          Adds a sub expression to a string buffer
protected  void addSubExpression(StringBuffer sb, String key, String value)
          Adds a sub expression to a string buffer
 void apply(Job job)
          Applies the gLite style to the job.
protected  String getCERequirementsForJob(Job job)
          Constructs the value for remote CE requirements expression for the job .
protected  String missingKeyError(Job job, String key)
          Constructs an error message in case of style mismatch.
private  String quote(String string)
          Condor Quotes a string
 
Methods inherited from class edu.isi.pegasus.planner.code.generator.condor.style.Abstract
apply, applyCredentialsForLocalExec, applyCredentialsForRemoteExec, errorMessage, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_NAME

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

See Also:
Constant Field Values
Constructor Detail

GLite

public GLite()
The default Constructor.

Method Detail

apply

public void apply(Job job)
           throws CondorStyleException
Applies the gLite style to the job.

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

getCERequirementsForJob

protected String getCERequirementsForJob(Job job)
                                  throws CondorStyleException
Constructs the value for remote CE requirements expression for the job . For e.g. the expression in the submit file may look as
 +remote_cerequirements = "PROCS==18 && NODES==1 && PRIORITY==10 && WALLTIME==3600
   && PASSENV==1 && JOBNAME==\"TEST JOB\" && MYENV ==\"GAURANG=MEHTA,KARAN=VAHI\""
 
 
The requirements are generated on the basis of certain profiles associated with the jobs. The following globus profiles if associated with the job are picked up
 hostcount  -> PROCS
 count      -> NODES
 maxwalltime-> WALLTIME
 
The following condor profiles if associated with the job are picked up
 priority  -> PRIORITY
 
All the env profiles are translated to MYENV

Parameters:
job -
Returns:
the value to the expression and it is condor quoted
Throws:
CondorStyleException - in case of condor quoting error

addSubExpression

protected void addSubExpression(StringBuffer sb,
                                String key,
                                String value)
Adds a sub expression to a string buffer

Parameters:
sb - the StringBuffer
key - the key
value - the value

addSubExpression

protected void addSubExpression(StringBuffer sb,
                                String key,
                                Integer value)
Adds a sub expression to a string buffer

Parameters:
sb - the StringBuffer
key - the key
value - the value

missingKeyError

protected String missingKeyError(Job job,
                                 String key)
Constructs an error message in case of style mismatch.

Parameters:
job - the job object.
key - the missing key

quote

private String quote(String string)
              throws CondorStyleException
Condor Quotes a string

Parameters:
string - the string to be quoted.
Returns:
quoted string.
Throws:
CondorStyleException - in case of condor quoting error


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