Java Doc for Scriptor.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » planner » 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.vdl.planner 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.vdl.planner.Scriptor

Scriptor
public class Scriptor (Code)
This class generates the shell scripts from a DAX. There is a script for each job in the dag, and there is a control script to coordinate these jobs.

The scripts are assembled mostly from template files and substitutions. The template files reside in $PEGASUS_HOME/share:

templatepurpose
sp-job-1.tmplstart of job script
sp-job-2.tmplunused
sp-job-3.tmplfinal portion of job script
sp-master-1.tmplstart of master script
sp-master-2.tmplintermediary of master script
sp-master-3.tmplfinal portion of master script
sp-master-job.tmplInvocation of job from master
The following substitutions are available by default. Some substitutions are only available during job generation:

Start time stamp of processing (compile time)
variablepurpose
DAXLABELuser-given label of the workflow
DVJob: fully-qualified DV of job
FILELISTJob: Name of file of output mappings
HOMEJRE system property user.home
JOBIDJob: the IDxxxxx of the current job
JOBLOGJob: the log file of the job
JOBSCRIPTJob: name of script file for job
KICKSTARTif set, path to local kickstart
LOGFILEName of master log file
NOW
REGISTER0 or 1 for replica registration
TRJob: fully-qualified TR of job
USERJRE system property user.name

author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 50 $




Constructor Summary
public  Scriptor(String dirName, ADAG adag, RCWrapper rc, SCWrapper sc, TCWrapper tc, HashMap fnMap, File dataDir)
     Constructor
Parameters:
  dirName - names the directory into which to produce the scripts.
Parameters:
  adag - is the DAX as a parsed data structure in memory.
Parameters:
  rc - is the replica catalog wrapper.
Parameters:
  sc - is the site catalog wrapper, may be null.
Parameters:
  tc - is the transformation catalog wrapper.
Parameters:
  fnMap - is a map containing all filesnames in the DAG.

Method Summary
public  StringaddSubstitution(String key, String value)
     Inserts a substitution into the substitutable variables.
public  voidcopyFromTemplate(Writer w, String tfn)
     Copies a template file into the open writer.
public  voidfinalizeControlScript()
     Write the control script tail to the control file.
public  StringgetKickstart()
     Gets the current kickstart path.
public  booleangetRegister()
     Gets the flag indicating whether to register output files. true, if output files are going to be registered.
public  StringgetSubstitution(String key)
     Obtains the setting of a substitutable variable.
public  StringinitializeControlScript()
     Writes the control script head, including functions for file registration.
public  voidintermediateControlScript()
     Adds scripts between stages.
public  StringprocessJob(String jobID, boolean checkInputFiles)
     Processes each job in the adag.
public  StringremoveSubstitution(String key)
     Removes a substition.
Parameters:
  key - is the template variable name to query for.
public  voidsetKickstart(String kickstart)
     Sets kickstart path, if the path is null, kickstart will not be used.
public  voidsetRegister(boolean b)
     Sets the flag indicating whether to register output files.


Constructor Detail
Scriptor
public Scriptor(String dirName, ADAG adag, RCWrapper rc, SCWrapper sc, TCWrapper tc, HashMap fnMap, File dataDir)(Code)
Constructor
Parameters:
  dirName - names the directory into which to produce the scripts.
Parameters:
  adag - is the DAX as a parsed data structure in memory.
Parameters:
  rc - is the replica catalog wrapper.
Parameters:
  sc - is the site catalog wrapper, may be null.
Parameters:
  tc - is the transformation catalog wrapper.
Parameters:
  fnMap - is a map containing all filesnames in the DAG.
Parameters:
  dataDir - is the location of $PEGASUS_HOME/share from properties.




Method Detail
addSubstitution
public String addSubstitution(String key, String value)(Code)
Inserts a substitution into the substitutable variables.
Parameters:
  key - is the template variable name
Parameters:
  value - is the replacement the previous setting, or null.
See Also:   Scriptor.getSubstitution(String)



copyFromTemplate
public void copyFromTemplate(Writer w, String tfn) throws IOException(Code)
Copies a template file into the open writer. During copy, certain substitutions may take place. The substitutable variables are dynamically adjusted from the main class.
Parameters:
  w - is the writer open for writing.
Parameters:
  tfn - is the template base file name.
throws:
  IOException - in case some io operation goes wrong.



finalizeControlScript
public void finalizeControlScript() throws IOException(Code)
Write the control script tail to the control file.
exception:
  IOException - if adding to the master script fails forsome reason.



getKickstart
public String getKickstart()(Code)
Gets the current kickstart path. The location may be null. the path to kickstart, or null
See Also:   Scriptor.setKickstart(String)



getRegister
public boolean getRegister()(Code)
Gets the flag indicating whether to register output files. true, if output files are going to be registered.
See Also:   Scriptor.setRegister(boolean)



getSubstitution
public String getSubstitution(String key)(Code)
Obtains the setting of a substitutable variable.
Parameters:
  key - is the template variable name to query for. the current setting, or null, if thevariable does not exist.
See Also:   Scriptor.addSubstitution(String,String)



initializeControlScript
public String initializeControlScript() throws IOException(Code)
Writes the control script head, including functions for file registration. the name of the control (master) script.
throws:
  IOException - if writing to the master script somehow failes.



intermediateControlScript
public void intermediateControlScript() throws IOException(Code)
Adds scripts between stages.
exception:
  IOException - if adding to the master script fails forsome reason.



processJob
public String processJob(String jobID, boolean checkInputFiles) throws IOException(Code)
Processes each job in the adag. Also checks for input file existence, if necessary.
Parameters:
  jobID - is the DAX-unique job id to generate a scripts for.
Parameters:
  checkInputFiles - if set, checks in the filesystem for theexistence of all input files into the job. the name of the job control script.
throws:
  IOException - for failure to write any job related files.



removeSubstitution
public String removeSubstitution(String key)(Code)
Removes a substition.
Parameters:
  key - is the template variable name to query for. the current setting, or null, if thevariable does not exist.
See Also:   Scriptor.addSubstitution(String,String)



setKickstart
public void setKickstart(String kickstart)(Code)
Sets kickstart path, if the path is null, kickstart will not be used.
Parameters:
  kickstart - the path to invoke kickstart
See Also:   Scriptor.getKickstart()



setRegister
public void setRegister(boolean b)(Code)
Sets the flag indicating whether to register output files.
Parameters:
  b - is a flag to set the registration state.
See Also:   Scriptor.getRegister()



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.