Java Doc for PDAX2MDAG.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » cPlanner » parser » pdax » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » pegasus 2.1.0 » org.griphyn.cPlanner.parser.pdax 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.cPlanner.parser.pdax.PDAX2MDAG

PDAX2MDAG
public class PDAX2MDAG implements Callback(Code)
This callback ends up creating the megadag that contains the smaller dags each corresponding to the one level as identified in the pdax file generated by the partitioner.
author:
   Karan Vahi
version:
   $Revision: 464 $


Field Summary
final public static  StringCODE_GENERATOR_CLASS
     The SubmitWriter that has to be loaded for now.
final public static  StringCONDOR_DAGMAN_LOGICAL_NAME
     The logical name with which to query the transformation catalog for the condor_dagman executable, that ends up running the mini dag as one job.
final public static  StringCONDOR_DAGMAN_NAMESPACE
     The namespace to use for condor dagman.
final public static  StringCPLANNER_LOGICAL_NAME
     The logical name with which to query the transformation catalog for cPlanner executable.
final public static  StringDAGMAN_KNOBS
     The dagman knobs controlled through property.
final public static  intHEAD_INDEX
     The index of the head job.
final public static  StringNAMESPACE
     The namespace to which the job in the MEGA DAG being created refer to.
final public static  intNUM_OF_EXPANDED_JOBS
     The number of jobs into which each job in the partition graph is expanded to.
final public static  StringRETRY_LOGICAL_NAME
     The planner utility that needs to be called as a prescript.
final public static  StringSUBMIT_DIRECTORY_PREFIX
     The prefix for the submit directory.
final public static  intTAIL_INDEX
     The index of the tail job.
protected static  charmSeparator
     The file Separator to be used on the submit host.

Constructor Summary
public  PDAX2MDAG(String directory, PegasusProperties properties, PlannerOptions options)
     The overloaded constructor.

Method Summary
public  voidcbDocument(Map attributes)
     Callback when the opening tag was parsed.
public  voidcbDone()
     Callback when the parsing of the document is done.
public  voidcbParents(String child, List parents)
     Callback for child and parent relationships from section 3.
public  voidcbPartition(Partition partition)
     Callback for the partition .
protected  SubInfoconstructDAGJob(Partition partition, File directory, String dax)
     Constructs a job that plans and submits the partitioned workflow, referred to by a Partition.
protected  StringconstructDAGManKnobs(PegasusProperties properties)
     Constructs Any extra arguments that need to be passed to dagman, as determined from the properties file.
protected  StringcreateSubmitDirectory(String label, String dir, String user, String vogroup, boolean timestampBased)
     Creates the submit directory for the workflow.
protected  booleancreateSymlink(String source, File destDir)
     Returns the number of partitions referred to in the PDAX file.
Parameters:
  source - the source file that has to be symlinked.
Parameters:
  destDir - the destination directory where the symlink has to beplaced.
protected  StringgetAbsolutePath(Partition partition, String directory, String suffix)
     Returns the absolute path to a dagman (usually) related file for a particular partition in the submit directory that is passed as an input parameter.
protected  StringgetBaseName(Partition partition)
     Returns the base name of the submit directory in which the submit files for a particular partition reside.
Parameters:
  partition - the partition for which the base directory is to beconstructed.
protected  StringgetBasename(Partition partition, String suffix)
     Returns the basename of a dagman (usually) related file for a particular partition.
Parameters:
  partition - the partition for which the dagman is responsible forexecution.
Parameters:
  suffix - the suffix for the file basename.
protected  StringgetBasenamePrefix(SubInfo job)
     Returns the basename prefix of a dagman (usually) related file for a a job that submits nested dagman.
Parameters:
  job - the job that submits a nested dagman.
protected  StringgetCacheFilePath(SubInfo job)
     Returns the full path to a cache file that corresponds for one partition. The cache file resides in the submit directory for the partition for which the job is responsible for.
Parameters:
  job - the job running on the submit host that submits the partition.
public  ObjectgetConstructedObject()
    
protected  SubInfogetJob(String id)
     Returns the job that has been constructed for a particular partition.
Parameters:
  id - the partition id.
protected  intgetPartitionCount(String pdax)
     Returns the number of partitions referred to in the PDAX file.
Parameters:
  pdax - the path to the pdax file.
protected  intparseInt(String s)
     Parses a string into an integer.
protected static  voidsanityCheck(File dir)
     Checks the destination location for existence, if it can be created, if it is writable etc.
protected  voidsetPrescript(SubInfo job, String daxURL, String log)
     Sets the prescript that ends up calling to the default wrapper that introduces retry into Pegasus for a particular job.
protected  voidsetPrescript(SubInfo job, String daxURL, String log, String namespace, String name, String version)
     Sets the prescript that ends up calling to the default wrapper that introduces retry into Pegasus for a particular job.
protected  StringwriteOutBraindump(File directory, Partition partition, String dax, String dag)
     Writes out the braindump.txt file for a partition in the partition submit directory.
protected  StringwriteOutProperties(String directory)
     Writes out the properties to a temporary file in the directory passed.
Parameters:
  directory - the directory in which the properties file needs tobe written to.

Field Detail
CODE_GENERATOR_CLASS
final public static String CODE_GENERATOR_CLASS(Code)
The SubmitWriter that has to be loaded for now.



CONDOR_DAGMAN_LOGICAL_NAME
final public static String CONDOR_DAGMAN_LOGICAL_NAME(Code)
The logical name with which to query the transformation catalog for the condor_dagman executable, that ends up running the mini dag as one job.



CONDOR_DAGMAN_NAMESPACE
final public static String CONDOR_DAGMAN_NAMESPACE(Code)
The namespace to use for condor dagman.



CPLANNER_LOGICAL_NAME
final public static String CPLANNER_LOGICAL_NAME(Code)
The logical name with which to query the transformation catalog for cPlanner executable.



DAGMAN_KNOBS
final public static String DAGMAN_KNOBS(Code)
The dagman knobs controlled through property. They map the property name to the corresponding dagman option.



HEAD_INDEX
final public static int HEAD_INDEX(Code)
The index of the head job.



NAMESPACE
final public static String NAMESPACE(Code)
The namespace to which the job in the MEGA DAG being created refer to.



NUM_OF_EXPANDED_JOBS
final public static int NUM_OF_EXPANDED_JOBS(Code)
The number of jobs into which each job in the partition graph is expanded to.



RETRY_LOGICAL_NAME
final public static String RETRY_LOGICAL_NAME(Code)
The planner utility that needs to be called as a prescript.



SUBMIT_DIRECTORY_PREFIX
final public static String SUBMIT_DIRECTORY_PREFIX(Code)
The prefix for the submit directory.



TAIL_INDEX
final public static int TAIL_INDEX(Code)
The index of the tail job.



mSeparator
protected static char mSeparator(Code)
The file Separator to be used on the submit host.




Constructor Detail
PDAX2MDAG
public PDAX2MDAG(String directory, PegasusProperties properties, PlannerOptions options)(Code)
The overloaded constructor.
Parameters:
  directory - the directory where the pdax and all the daxescorresponding to the partitions reside.
Parameters:
  properties - the PegasusProperties to be used.
Parameters:
  options - the options passed to the planner.




Method Detail
cbDocument
public void cbDocument(Map attributes)(Code)
Callback when the opening tag was parsed. This contains all attributes and their raw values within a map. This callback can also be used to initialize callback-specific resources.
Parameters:
  attributes - is a map of attribute key to attribute value



cbDone
public void cbDone()(Code)
Callback when the parsing of the document is done. This ends up triggering the writing of the condor submit files corresponding to the mega dag.



cbParents
public void cbParents(String child, List parents)(Code)
Callback for child and parent relationships from section 3. This ties in the relations between the partitions to the relations between the jobs that are responsible for partitions. In addition, appropriate cache file arguments are generated.
Parameters:
  child - is the IDREF of the child element.
Parameters:
  parents - is a list of IDREFs of the included parents.



cbPartition
public void cbPartition(Partition partition)(Code)
Callback for the partition . These partitions are completely assembled, but each is passed separately.
Parameters:
  partition - is the PDAX-style partition.



constructDAGJob
protected SubInfo constructDAGJob(Partition partition, File directory, String dax)(Code)
Constructs a job that plans and submits the partitioned workflow, referred to by a Partition. The main job itself is a condor dagman job that submits the concrete workflow. The concrete workflow is generated by running the planner in the prescript for the job.
Parameters:
  partition - the partition corresponding to which the job has to beconstructed.
Parameters:
  directory - the submit directory where the submit files for thepartition should reside.
Parameters:
  dax - the absolute path to the partitioned dax file thatcorresponds to this partition. the constructed DAG job.



constructDAGManKnobs
protected String constructDAGManKnobs(PegasusProperties properties)(Code)
Constructs Any extra arguments that need to be passed to dagman, as determined from the properties file.
Parameters:
  properties - the PegasusProperties any arguments to be added, else empty string



createSubmitDirectory
protected String createSubmitDirectory(String label, String dir, String user, String vogroup, boolean timestampBased) throws IOException(Code)
Creates the submit directory for the workflow. This is not thread safe.
Parameters:
  label - the label of the workflow being worked upon.
Parameters:
  dir - the base directory specified by the user.
Parameters:
  user - the username of the user.
Parameters:
  vogroup - the vogroup to which the user belongs to.
Parameters:
  timestampBased - boolean indicating whether to have a timestamp based dir or not the directory name created relative to the base directory passedas input.
throws:
  IOException - in case of unable to create submit directory.



createSymlink
protected boolean createSymlink(String source, File destDir)(Code)
Returns the number of partitions referred to in the PDAX file.
Parameters:
  source - the source file that has to be symlinked.
Parameters:
  destDir - the destination directory where the symlink has to beplaced. the number of partitions in the pdax file.



getAbsolutePath
protected String getAbsolutePath(Partition partition, String directory, String suffix)(Code)
Returns the absolute path to a dagman (usually) related file for a particular partition in the submit directory that is passed as an input parameter. This does not create the file, just returns an absolute path to it. Useful for constructing argument string for condor_dagman.
Parameters:
  partition - the partition for which the dagman is responsible forexecution.
Parameters:
  directory - the directory where the file should reside.
Parameters:
  suffix - the suffix for the file basename. the absolute path to a file in the submit directory.



getBaseName
protected String getBaseName(Partition partition)(Code)
Returns the base name of the submit directory in which the submit files for a particular partition reside.
Parameters:
  partition - the partition for which the base directory is to beconstructed. the base name of the partition.



getBasename
protected String getBasename(Partition partition, String suffix)(Code)
Returns the basename of a dagman (usually) related file for a particular partition.
Parameters:
  partition - the partition for which the dagman is responsible forexecution.
Parameters:
  suffix - the suffix for the file basename. the basename.



getBasenamePrefix
protected String getBasenamePrefix(SubInfo job)(Code)
Returns the basename prefix of a dagman (usually) related file for a a job that submits nested dagman.
Parameters:
  job - the job that submits a nested dagman. the basename.



getCacheFilePath
protected String getCacheFilePath(SubInfo job)(Code)
Returns the full path to a cache file that corresponds for one partition. The cache file resides in the submit directory for the partition for which the job is responsible for.
Parameters:
  job - the job running on the submit host that submits the partition. the full path to the file.



getConstructedObject
public Object getConstructedObject()(Code)
Returns the MEGADAG that is generated ADag object containing the mega daga



getJob
protected SubInfo getJob(String id)(Code)
Returns the job that has been constructed for a particular partition.
Parameters:
  id - the partition id. the corresponding job, else null if not found.



getPartitionCount
protected int getPartitionCount(String pdax)(Code)
Returns the number of partitions referred to in the PDAX file.
Parameters:
  pdax - the path to the pdax file. the number of partitions in the pdax file.



parseInt
protected int parseInt(String s)(Code)
Parses a string into an integer. Non valid values returned as -1
Parameters:
  s - the String to be parsed as integer the int value if valid, else -1



sanityCheck
protected static void sanityCheck(File dir) throws IOException(Code)
Checks the destination location for existence, if it can be created, if it is writable etc.
Parameters:
  dir - is the new base directory to optionally create.
throws:
  IOException - in case of error while writing out files.



setPrescript
protected void setPrescript(SubInfo job, String daxURL, String log)(Code)
Sets the prescript that ends up calling to the default wrapper that introduces retry into Pegasus for a particular job.
Parameters:
  job - the job whose prescript needs to be set.
Parameters:
  daxURL - the path to the dax file on the filesystem.
Parameters:
  log - the file where the output of the prescript needs to beredirected to.
See Also:   PDAX2MDAG.RETRY_LOGICAL_NAME



setPrescript
protected void setPrescript(SubInfo job, String daxURL, String log, String namespace, String name, String version)(Code)
Sets the prescript that ends up calling to the default wrapper that introduces retry into Pegasus for a particular job.
Parameters:
  job - the job whose prescript needs to be set.
Parameters:
  daxURL - the path to the dax file on the filesystem.
Parameters:
  log - the file where the output of the prescript needs to beredirected to.
Parameters:
  namespace - the namespace of the replanner utility.
Parameters:
  name - the logical name of the replanner.
Parameters:
  version - the version of the replanner to be picked up.



writeOutBraindump
protected String writeOutBraindump(File directory, Partition partition, String dax, String dag) throws IOException(Code)
Writes out the braindump.txt file for a partition in the partition submit directory. The braindump.txt file is used for passing to the tailstatd daemon that monitors the state of execution of the workflow.
Parameters:
  directory - the directory in which the braindump file needs tobe written to.
Parameters:
  partition - the partition for which the braindump is to be written out.
Parameters:
  dax - the dax file
Parameters:
  dag - the dag file the absolute path to the braindump file.txt written in the directory.
throws:
  IOException - in case of error while writing out file.



writeOutProperties
protected String writeOutProperties(String directory) throws IOException(Code)
Writes out the properties to a temporary file in the directory passed.
Parameters:
  directory - the directory in which the properties file needs tobe written to. the absolute path to the properties file written in the directory.
throws:
  IOException - in case of error while writing out file.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.