Java Doc for Algorithm.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » cPlanner » selector » site » heft » 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.selector.site.heft 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.griphyn.cPlanner.selector.site.heft.Algorithm

Algorithm
public class Algorithm (Code)
The HEFT based site selector. The runtime for the job in seconds is picked from the pegasus profile key runtime in the transformation catalog for a transformation. The data communication costs between jobs if scheduled on different sites is assumed to be fixed. Later on if required, the ability to specify this value will be exposed via properties. The number of processors in a site is picked by the attribute idle-nodes associated with the vanilla jobmanager for a site in the site catalog.
author:
   Karan Vahi
version:
   $Revision: 426 $
See Also:   Algorithm.AVERAGE_BANDWIDTH
See Also:   Algorithm.RUNTIME_PROFILE_KEY
See Also:   Algorithm.DEFAULT_NUMBER_OF_FREE_NODES
See Also:   Algorithm.AVERAGE_DATA_SIZE_BETWEEN_JOBS
See Also:   org.griphyn.cPlanner.classes.JobManager.IDLE_NODES


Field Summary
final public static  floatAVERAGE_BANDWIDTH
     The average bandwidth between the sites.
final public static  floatAVERAGE_DATA_SIZE_BETWEEN_JOBS
     The average data that is transferred in between 2 jobs in the workflow.
final public static  intDEFAULT_NUMBER_OF_FREE_NODES
     The default number of nodes that are associated with a site if not found in the site catalog.
final public static  longMAXIMUM_FINISH_TIME
     The maximum finish time possible for a job.
final public static  StringPROCESS_CATALOG_IMPL_PROPERTY
     The property that designates which Process catalog impl to pick up.
final public static  StringRUNTIME_PROFILE_KEY
     The pegasus profile key that gives us the expected runtime.
protected  MappermTCMapper
     Handle to the TCMapper.

Constructor Summary
public  Algorithm(PegasusBag bag)
     The default constructor.

Method Summary
protected  floatcalculateAverageComputeTime(SubInfo job)
     Returns the average compute time in seconds for a job.
Parameters:
  job - the job whose average compute time is to be computed.
protected  long[]calculateEstimatedStartAndFinishTime(GraphNode node, String site)
     Estimates the start and finish time of a job on a site.
Parameters:
  node - the node that is being scheduled
Parameters:
  site - the site for which the finish time is reqd.
protected  floatcomputeDownwardRank(GraphNode node)
     Computes the downward rank of a node. The downward rank of node i is _ ___ max { rank( n ) + w + c } j E pred( i ) d j j ji
Parameters:
  node - the GraphNode whose rank needs to be computed.
public  Stringdescription()
     This method returns a String describing the site selection technique that is being implemented by the implementing class.
protected  longgetAvailableTime(String site, long readyTime)
     Returns the available time for a site.
Parameters:
  site - the site at which you want to schedule the job.
Parameters:
  readyTime - the time at which all the data reqd by the job will arrive at site.
protected  intgetExpectedRuntime(SubInfo job, TransformationCatalogEntry entry)
     Return expected runtime.
Parameters:
  job - the job in the workflow.
Parameters:
  entry - the TransformationCatalogEntry object.
protected  intgetExpectedRuntimeFromAC(SubInfo job, TransformationCatalogEntry entry)
     Return expected runtime from the AC only if the process catalog is initialized.
protected  intgetFreeNodesForSite(String site)
     Returns the freenodes for a site.
Parameters:
  site - the site identifier.
public  longgetMakespan()
     Returns the makespan of the scheduled workflow.
protected  ProcessCatalogloadProcessCatalog(String type, Properties props)
     Load the process catalog, only if it is determined that the Transformation Catalog description is the windward one.
Parameters:
  type - the type of process catalog
Parameters:
  props - contains all necessary data to establish the link.
public  StringmapJob2ExecPool(SubInfo job, List pools)
     The call out to the site selector to determine on what pool the job should be scheduled.
Parameters:
  job - SubInfo the SubInfo object corresponding tothe job whose execution pool we want to determine.
Parameters:
  pools - the list of String objects representing theexecution pools that can be used.
protected  voidpopulateSiteMap(List sites)
     Populates the number of free nodes for each site, by querying the Site Catalog.
public  voidschedule(ADag dag, List sites)
     Schedules the workflow using the heft.
public  voidschedule(Graph workflow, List sites)
     Schedules the workflow according to the HEFT algorithm.
protected  voidscheduleJob(String site, long start, long end)
     Schedules a job to a site.

Field Detail
AVERAGE_BANDWIDTH
final public static float AVERAGE_BANDWIDTH(Code)
The average bandwidth between the sites. In mega bytes/per second.



AVERAGE_DATA_SIZE_BETWEEN_JOBS
final public static float AVERAGE_DATA_SIZE_BETWEEN_JOBS(Code)
The average data that is transferred in between 2 jobs in the workflow. In megabytes.



DEFAULT_NUMBER_OF_FREE_NODES
final public static int DEFAULT_NUMBER_OF_FREE_NODES(Code)
The default number of nodes that are associated with a site if not found in the site catalog.



MAXIMUM_FINISH_TIME
final public static long MAXIMUM_FINISH_TIME(Code)
The maximum finish time possible for a job.



PROCESS_CATALOG_IMPL_PROPERTY
final public static String PROCESS_CATALOG_IMPL_PROPERTY(Code)
The property that designates which Process catalog impl to pick up.



RUNTIME_PROFILE_KEY
final public static String RUNTIME_PROFILE_KEY(Code)
The pegasus profile key that gives us the expected runtime.



mTCMapper
protected Mapper mTCMapper(Code)
Handle to the TCMapper.




Constructor Detail
Algorithm
public Algorithm(PegasusBag bag)(Code)
The default constructor.
Parameters:
  bag - the bag of Pegasus related objects.




Method Detail
calculateAverageComputeTime
protected float calculateAverageComputeTime(SubInfo job)(Code)
Returns the average compute time in seconds for a job.
Parameters:
  job - the job whose average compute time is to be computed. the weighted compute time in seconds.



calculateEstimatedStartAndFinishTime
protected long[] calculateEstimatedStartAndFinishTime(GraphNode node, String site)(Code)
Estimates the start and finish time of a job on a site.
Parameters:
  node - the node that is being scheduled
Parameters:
  site - the site for which the finish time is reqd. long[0] the estimated start time.long[1] the estimated finish time.



computeDownwardRank
protected float computeDownwardRank(GraphNode node)(Code)
Computes the downward rank of a node. The downward rank of node i is _ ___ max { rank( n ) + w + c } j E pred( i ) d j j ji
Parameters:
  node - the GraphNode whose rank needs to be computed. computed rank.



description
public String description()(Code)
This method returns a String describing the site selection technique that is being implemented by the implementing class. String



getAvailableTime
protected long getAvailableTime(String site, long readyTime)(Code)
Returns the available time for a site.
Parameters:
  site - the site at which you want to schedule the job.
Parameters:
  readyTime - the time at which all the data reqd by the job will arrive at site. the available time of the site.



getExpectedRuntime
protected int getExpectedRuntime(SubInfo job, TransformationCatalogEntry entry)(Code)
Return expected runtime.
Parameters:
  job - the job in the workflow.
Parameters:
  entry - the TransformationCatalogEntry object. the runtime in seconds.



getExpectedRuntimeFromAC
protected int getExpectedRuntimeFromAC(SubInfo job, TransformationCatalogEntry entry)(Code)
Return expected runtime from the AC only if the process catalog is initialized.
Parameters:
  job - the job in the workflow.
Parameters:
  entry - the TC entry the runtime in seconds.



getFreeNodesForSite
protected int getFreeNodesForSite(String site)(Code)
Returns the freenodes for a site.
Parameters:
  site - the site identifier. number of nodes



getMakespan
public long getMakespan()(Code)
Returns the makespan of the scheduled workflow. It is maximum of the actual finish times for the leaves of the scheduled workflow. long the makespan of the workflow.



loadProcessCatalog
protected ProcessCatalog loadProcessCatalog(String type, Properties props)(Code)
Load the process catalog, only if it is determined that the Transformation Catalog description is the windward one.
Parameters:
  type - the type of process catalog
Parameters:
  props - contains all necessary data to establish the link. true if connected now, or false to indicate a failure.



mapJob2ExecPool
public String mapJob2ExecPool(SubInfo job, List pools)(Code)
The call out to the site selector to determine on what pool the job should be scheduled.
Parameters:
  job - SubInfo the SubInfo object corresponding tothe job whose execution pool we want to determine.
Parameters:
  pools - the list of String objects representing theexecution pools that can be used. if the pool is found to which the job can be mapped, a stringof the form executionpool:jobmanager where thejobmanager can be null. If the pool is not found, then setpoolhandle to NONE. null - if some error occured .



populateSiteMap
protected void populateSiteMap(List sites)(Code)
Populates the number of free nodes for each site, by querying the Site Catalog.
Parameters:
  sites - list of sites.



schedule
public void schedule(ADag dag, List sites)(Code)
Schedules the workflow using the heft.
Parameters:
  dag - the ADag object containing the abstract workflowthat needs to be mapped.
Parameters:
  sites - the list of candidate sites where the workflow can potentiallyexecute.



schedule
public void schedule(Graph workflow, List sites)(Code)
Schedules the workflow according to the HEFT algorithm.
Parameters:
  workflow - the workflow that has to be scheduled.
Parameters:
  sites - the list of candidate sites where the workflow can potentiallyexecute.



scheduleJob
protected void scheduleJob(String site, long start, long end)(Code)
Schedules a job to a site.
Parameters:
  site - the site at which to schedule
Parameters:
  start - the start time for job
Parameters:
  end - the end time of job



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.