Source Code Cross Referenced for GridStart.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » cPlanner » code » 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.code 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * This file or a portion of this file is licensed under the terms of
003:         * the Globus Toolkit Public License, found in file GTPL, or at
004:         * http://www.globus.org/toolkit/download/license.html. This notice must
005:         * appear in redistributions of this file, with or without modification.
006:         *
007:         * Redistributions of this Software, with or without modification, must
008:         * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
009:         * some other similar material which is provided with the Software (if
010:         * any).
011:         *
012:         * Copyright 1999-2004 University of Chicago and The University of
013:         * Southern California. All rights reserved.
014:         */package org.griphyn.cPlanner.code;
015:
016:        import org.griphyn.cPlanner.classes.ADag;
017:        import org.griphyn.cPlanner.classes.PegasusBag;
018:        import org.griphyn.cPlanner.classes.SubInfo;
019:        import org.griphyn.cPlanner.classes.AggregatedJob;
020:
021:        import java.util.Collection;
022:
023:        import java.io.File;
024:
025:        /**
026:         * The interface that defines how a job specified in the abstract workflow
027:         * is launched on the grid. This allows to specify different ways to wrap
028:         * an executable while running on the grid. One may do this, to gather
029:         * additional information about the job like provenance information.
030:         *
031:         * If the implementation returns true for canSetXBit, then it should be setting
032:         * the X bit for the staged compute jobs.
033:         *
034:         * @author Karan Vahi vahi@isi.edu
035:         * @version $Revision: 410 $
036:         */
037:        public interface GridStart {
038:
039:            /**
040:             * The version number associated with this API of GridStart.
041:             */
042:            public static final String VERSION = "1.5";
043:
044:            /**
045:             * The File separator to be used on the submit host.
046:             */
047:            public static char mSeparator = File.separatorChar;
048:
049:            /**
050:             * Initializes the GridStart implementation.
051:             *
052:             * @param bag   the bag of objects that is used for initialization.
053:             * @param dag   the concrete dag so far.
054:             */
055:            public void initialize(PegasusBag bag, ADag dag);
056:
057:            /**
058:             * Enables a collection of jobs and puts them into an AggregatedJob.
059:             * The assumption here is that all the jobs are being enabled by the same
060:             * implementation. It is upto the implementation to determine whether it
061:             * wants to return a new AggregatedJob by cloning the one passed or just
062:             * modify the one passed to it.
063:             *
064:             * @param aggJob the AggregatedJob into which the collection has to be
065:             *               integrated.
066:             * @param jobs   the collection of jobs (SubInfo) that need to be enabled.
067:             *
068:             * @return the AggregatedJob containing the enabled jobs.
069:             * @see #enable(SubInfo,boolean)
070:             */
071:            public AggregatedJob enable(AggregatedJob aggJob, Collection jobs);
072:
073:            /**
074:             * Enables a job to run on the grid. This also determines how the
075:             * stdin,stderr and stdout of the job are to be propogated.
076:             * To grid enable a job, the job may need to be wrapped into another
077:             * job, that actually launches the job. It usually results in the job
078:             * description passed being modified modified.
079:             *
080:             * @param job  the <code>SubInfo</code> object containing the job description
081:             *             of the job that has to be enabled on the grid.
082:             * @param isGlobusJob is <code>true</code>, if the job generated a
083:             *        line <code>universe = globus</code>, and thus runs remotely.
084:             *        Set to <code>false</code>, if the job runs on the submit
085:             *        host in any way.
086:             *
087:             * @return boolean true if enabling was successful,else false.
088:             */
089:            public boolean enable(SubInfo job, boolean isGlobusJob);
090:
091:            /**
092:             * Constructs the postscript that has to be invoked on the submit host
093:             * after the job has executed on the remote end. The postscript usually
094:             * works on the output generated by the executable that is used to grid
095:             * enable a job, and has been piped back by Condor.
096:             * <p>
097:             * The postscript should be constructed and populated as a profile
098:             * in the DAGMAN namespace.
099:             *
100:             *
101:             * @param job  the <code>SubInfo</code> object containing the job description
102:             *             of the job that has to be enabled on the grid.
103:             * @param key  the key for the profile that has to be inserted.
104:             *
105:             * @return boolean true if postscript was generated,else false.
106:             */
107:            //    public boolean constructPostScript( SubInfo job, String key ) ;
108:            /**
109:             * Indicates whether the enabling mechanism can set the X bit
110:             * on the executable on the remote grid site, in addition to launching
111:             * it on the remote grid stie
112:             *
113:             * @return boolean indicating whether can set the X bit or not.
114:             */
115:            public boolean canSetXBit();
116:
117:            /**
118:             * Returns the value of the vds profile with key as VDS.GRIDSTART_KEY,
119:             * that would result in the loading of this particular implementation.
120:             * It is usually the name of the implementing class without the
121:             * package name.
122:             *
123:             * @return the value of the profile key.
124:             * @see org.griphyn.cPlanner.namespace.VDS#GRIDSTART_KEY
125:             */
126:            public String getVDSKeyValue();
127:
128:            /**
129:             * Returns a short textual description of the implementing class.
130:             * Should usually be the name of the implementing class.
131:             *
132:             * @return  short textual description.
133:             */
134:            public String shortDescribe();
135:
136:            /**
137:             * Returns the SHORT_NAME for the POSTScript implementation that is used
138:             * to be as default with this GridStart implementation.
139:             *
140:             * @return the id for the POSTScript.
141:             *
142:             * @see POSTScript#shortDescribe()
143:             */
144:            public String defaultPOSTScript();
145:
146:            /**
147:             * Returns the full path to the submit directory, for the job.
148:             *
149:             * @param root the base of the submit directory hierarchy for the workflow.
150:             * @param job  the job for which the submit directory is to be determined.
151:             *
152:             * @return the path to the submit directory.
153:             */
154:            //    public static String getSubmitDirectory( String root, SubInfo job ){
155:            //        String jobDir   = job.getSubmitDirectory();
156:            //        StringBuffer sb = new StringBuffer();
157:            //
158:            //        //some sanity checks
159:            //        if( jobDir == null && root == null){
160:            //            throw new NullPointerException(
161:            //                         "Both the root directory, and job directory are null");
162:            //        }
163:            //
164:            //
165:            //        //determine the submit directory for the job
166:            //        if(jobDir == null){
167:            //            sb.append(root);
168:            //        }
169:            //        else if(jobDir.indexOf(mSeparator) == 0){
170:            //            //absolute path use that
171:            //            sb.append(jobDir);
172:            //        }
173:            //        else{
174:            //            //handle the . if given
175:            //            sb.append(root).append(mSeparator);
176:            //            sb.append((jobDir.indexOf('.') ==  0)?
177:            //                            //handle separator if given
178:            //                            (jobDir.indexOf(mSeparator) == 1)?
179:            //                                   jobDir.substring(2):jobDir.substring(1)
180:            //                            //just append whatever is given
181:            //                            :jobDir);
182:            //        }
183:            //
184:            //        return sb.toString();
185:            //    }
186:
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.