NAME

Pegasus::DAX::AbstractJob - abstract base class for jobs.

SYNOPSIS

This is an abstract class. You do not instantiate abstract classes.

DESCRIPTION

This class is the base for the four kinds of jobs and sub-workflows.

METHODS

new()

The constructor is used by child classes to establish data structures.

addArgument( $string )

This method will add a simple string into the ordered list of arguments.

addArgument( $plainfilename_instance )

This method adds a simple filename into the ordered list of arguments. You will have to add the filename separately to the uses section.

addArgument( $filename_instance )

This method adds a full filename to the ordered list of arguments and also adds the filename to the uses section.

addArgument( $file_instance )
addArgument( $exectuable_instance )

This method adds a full filename to the ordered list of arguments and also adds the filename to the uses section. However, being of Pegasus::DAX::CatalogType that lacks a link attribute, please refer to uses below for details. You may have to override the automatically added defaults entity by separately and explicitly adding the proper Pegasus::DAX::Filename to the uses section.

addArgument( ... )

You may pass any number of the above permitted arguments as long list of these arguments. This is a convenience method.

addProfile( $namespace, $key, $value )
addProfile( $profile_instance )

This method will add a specified profile, either as three strings or instance of Pegasus::DAX::Profile, to the collection of profiles associated with the logical level catalog entry.

stdin
stdout
stderr

Setter and getter for stdio handles. In get mode, the plain string of the logical file is returned.

In set mode, use a string or Pegasus::DAX::PlainFilename to provide the logical file name. You are responsible to add the filename to the uses section.

You may also specify an argument of Pegasus::DAX::Filename, Pegasus::DAX::File, or Pegasus::DAX::Executable. In these cases, the filename is added automatically to the uses section. You are responsible to provide the proper linkage, if applicable.

addUses

Alias method for uses method.

uses( $filename_instance )

This method adds a deep copy of a Pegasus::DAX::Filename instance to the uses section of a job. A deep copy is made so that you can change attributes on your passed object later.

uses( $file_instance )

This method converts a Pegasus::DAX::File instance into an internal Pegasus::DAX::Filename entity for uses section of a job. This method assumes copies the name attribute, sets the link attribute to INPUT, the optional attribute to false, and the executable attribute to false. You will have to add a proper Pegasus::DAX::Filename instance to overwrite these defaults.

uses( $executable_instance )

This method converts a Pegasus::DAX::Executable instance into an internal Pegasus::DAX::Filename instance for the uses section of a job. This method copies the name, namespace and version attributes, and sets the executable attribute to true. You will have to add a proper Pegasus::DAX::Filename instance to overwrite these defaults.

id

Getter and setter for the job's identifier string. Please note that the identifier is more restrictive, e.g. needs to obey more stringend rules.

The job identifier is a required argument, and unique within the ADAG.

nodelabel

Getter and setter for the optional job label string.

separator

This attribute defaults to a single space. The arguments in the argument string will be formatted with the separator value between each argument. The default should be good in many circumstances.

In case your application is sensitive to white-space in its argument list, you may want to set separator to the empty string, and provide the proper whitespaces yourself.

innerXML( $handle, $indent, $xmlns )

The purpose of the innerXML function is to recursively generate XML from the internal data structures. Since this class is abstract, it will not create the element tag nor attributes. However, it needs to create the inner elements as necessary.

The first argument is a file handle open for writing. This is where the XML will be generated. The second argument is a string with the amount of white-space that should be used to indent elements for pretty printing. The third argument may not be defined. If defined, all element tags will be prefixed with this name space.

INHERITED METHODS

Please refer to Pegasus::DAX::InvokeMixin for inherited methods.

addInvoke( $when, $cmd )
invoke( $when, $cmd )
notify( $when, $cmd )

SEE ALSO

Pegasus::DAX::Base

Base class.

Pegasus::DAX::InvokeMixin

Base class for Pegasus::DAX::Invoke delegation methods.

Pegasus::DAX::DAG
Pegasus::DAX::DAX
Pegasus::DAX::Job
Pegasus::DAX::ADAG

Child classes inheriting from Pegasus::DAX::AbstractJob.

COPYRIGHT AND LICENSE

Copyright 2007-2011 University Of Southern California

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.