Source Code Cross Referenced for SLS.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » cPlanner » transfer » 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.transfer 
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.transfer;
015:
016:        import org.griphyn.cPlanner.classes.PegasusBag;
017:        import org.griphyn.cPlanner.classes.SubInfo;
018:
019:        import org.griphyn.cPlanner.code.GridStart;
020:
021:        import org.griphyn.cPlanner.common.LogManager;
022:        import org.griphyn.cPlanner.common.PegasusProperties;
023:
024:        import java.io.File;
025:
026:        /**
027:         * This interface defines the second level staging process, that manages
028:         * the transfer of files from the headnode to the worker node temp and back.
029:         *
030:         *
031:         * @author Karan Vahi
032:         * @version $Revision: 414 $
033:         */
034:        public interface SLS {
035:
036:            /**
037:             * The version associated with the API.
038:             */
039:            public static final String VERSION = "1.0";
040:
041:            /**
042:             * Initializes the SLS implementation.
043:             *
044:             * @param bag   the bag of objects. Contains access to catalogs etc.
045:             */
046:            public void initialize(PegasusBag bag);
047:
048:            /**
049:             * Returns a boolean whether the SLS implementation does a condor based
050:             * modification or not. By condor based modification we mean whether it
051:             * uses condor specific classads to achieve the second level staging or not.
052:             *
053:             * @return boolean
054:             */
055:            public boolean doesCondorModifications();
056:
057:            /**
058:             * Constructs a command line invocation for a job, with a given sls file.
059:             * The SLS maybe null. In the case where SLS impl does not read from a file,
060:             * it is advised to create a file in generateSLSXXX methods, and then read
061:             * the file in this function and put it on the command line.
062:             *
063:             * @param job          the job that is being sls enabled
064:             * @param slsFile      the slsFile  that is accessible on the worker node. Can be null
065:             *
066:             * @return invocation string
067:             */
068:            public String invocationString(SubInfo job, File slsFile);
069:
070:            /**
071:             * Returns a boolean indicating whether it will an input file for a job
072:             * to do the transfers. Transfer reads from stdin the file transfers that
073:             * it needs to do.
074:             *
075:             * @param job the job being detected.
076:             *
077:             * @return true
078:             */
079:            public boolean needsSLSInput(SubInfo job);
080:
081:            /**
082:             * Returns a boolean indicating whether it will an output file for a job
083:             * to do the transfers. Transfer reads from stdin the file transfers that
084:             * it needs to do.
085:             *
086:             * @param job the job being detected.
087:             *
088:             * @return true
089:             */
090:            public boolean needsSLSOutput(SubInfo job);
091:
092:            /**
093:             * Returns the LFN of sls input file.
094:             *
095:             * @param job SubInfo
096:             *
097:             * @return the name of the sls input file.
098:             */
099:            public String getSLSInputLFN(SubInfo job);
100:
101:            /**
102:             * Returns the LFN of sls output file.
103:             *
104:             * @param job SubInfo
105:             *
106:             * @return the name of the sls input file.
107:             */
108:            public String getSLSOutputLFN(SubInfo job);
109:
110:            /**
111:             * Generates a second level staging file of the input files to the worker node
112:             * directory. It should be  consistent with the function needsSLSFile( SubInfo )
113:             *
114:             * @param job        the job for which the file is being created
115:             * @param submitDir  the submit directory where it has to be written out.
116:             * @param fileName    the name of the file that needs to be written out.
117:             * @param headNodeDirectory  the directory on the head node of the compute site.
118:             * @param workerNodeDirectory  the worker node directory
119:             *
120:             * @return the full path to lof file created, else null if no file is written out.
121:             *
122:             * @see #needsSLSFile( SubInfo )
123:             */
124:            public File generateSLSInputFile(SubInfo job, String fileName,
125:                    String submitDir, String headNodeDirectory,
126:                    String workerNodeDirectory);
127:
128:            /**
129:             * Generates a second level staging file of the input files to the worker node
130:             * directory. It should be  consistent with the function needsSLSFile( SubInfo )
131:             *
132:             * @param job        the job for which the file is being created
133:             * @param submitDir  the submit directory where it has to be written out.
134:             * @param fileName    the name of the file that needs to be written out.
135:             * @param headNodeDirectory  the directory on the head node of the compute site.
136:             * @param workerNodeDirectory  the worker node directory
137:             *
138:             * @return the full path to lof file created, else null if no file is written out.
139:             *
140:             * @see #needsSLSFile( SubInfo )
141:             */
142:            public File generateSLSOutputFile(SubInfo job, String fileName,
143:                    String submitDir, String headNodeDirectory,
144:                    String workerNodeDirectory);
145:
146:            /**
147:             * Modifies a job for the first level staging to headnode.This is to add
148:             * any files that needs to be staged to the head node for a job specific
149:             * to the SLS implementation. If any file needs to be added, a <code>FileTransfer</code>
150:             * object should be created and added as an input or an output file.
151:             *
152:             *
153:             * @param job           the job
154:             * @param submitDir     the submit directory
155:             * @param slsInputLFN   the sls input file if required, that is used for
156:             *                      staging in from the head node to worker node directory.
157:             * @param slsOutputLFN  the sls output file if required, that is used
158:             *                      for staging in from the head node to worker node directory.
159:             * @return boolean
160:             */
161:            public boolean modifyJobForFirstLevelStaging(SubInfo job,
162:                    String submitDir, String slsInputLFN, String slsOutputLFN);
163:
164:            /**
165:             * Modifies a compute job for second level staging.
166:             *
167:             * @param job                 the job to be modified.
168:             * @param headNodeURLPrefix   the url prefix for the server on the headnode
169:             * @param headNodeDirectory   the directory on the headnode, where the input data is
170:             *                            read from and the output data written out.
171:             * @param workerNodeDirectory the directory in the worker node tmp
172:             *
173:             * @return boolean indicating whether job was successfully modified or not.
174:             */
175:            public boolean modifyJobForWorkerNodeExecution(SubInfo job,
176:                    String headNodeURLPrefix, String headNodeDirectory,
177:                    String workerNodeDirectory);
178:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.