UNICORE Resource Broker NJS Plugin
1.5α1

org.eurogrid.broker.server
Class UnicoreResourceChecker

java.lang.Object
  |
  +--org.eurogrid.broker.server.UnicoreResourceChecker
All Implemented Interfaces:
LocalResourceChecker, NamedPlugin

public class UnicoreResourceChecker
extends Object
implements LocalResourceChecker

Local resource checking module for UNICORE. This uses information directly from the IDB and makes calls to the resource's TSI to discover all the information about what's going on that it is actually interested in. Does not currently use the TSI for checking disk space or CPU quotas.

Version:
$Revision: 1.5 $, $Date: 2004/02/17 11:32:40 $
Author:
Donal K. Fellows
See Also:
ResourceBroker

Constructor Summary
UnicoreResourceChecker()
           
UnicoreResourceChecker(String namePrefix)
           
 
Method Summary
 boolean canGetQoSData()
          Test whether this resource checker can supply data for quality-of-service estimates.
 boolean checkResources(ResourceBroker.TSIRunEngine tre, ResourceSet resources)
          Test to see if the given set of resources is locally satisfiable in the given context.
 boolean estimateTurnaroundTime(ResourceBroker.TSIRunEngine tre, Estimate est, ResourceSet resources)
          Fill in the given estimate with how long a job requiring the given resource set will take to start and run.
 Integer getCPUQuota(IncarnatedUser user, ResourceSet resources)
          Discover the amount of CPU time remaining to the user on the local execution resource.
 String getFormalName()
          Get the formal name of the plugin.
 String getName()
          Get the name of the plugin.
 boolean initialise(ResourceBroker broker, Logger logger, ResourceSet njsResources, Element domNode)
          Initialise from the given DOM-tree element and broker configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicoreResourceChecker

public UnicoreResourceChecker()

UnicoreResourceChecker

public UnicoreResourceChecker(String namePrefix)
Method Detail

canGetQoSData

public boolean canGetQoSData()
Description copied from interface: LocalResourceChecker
Test whether this resource checker can supply data for quality-of-service estimates.

Specified by:
canGetQoSData in interface LocalResourceChecker

checkResources

public boolean checkResources(ResourceBroker.TSIRunEngine tre,
                              ResourceSet resources)
Description copied from interface: LocalResourceChecker
Test to see if the given set of resources is locally satisfiable in the given context. Note that the context may be queried for the user on whose behalf the request is being run.

Specified by:
checkResources in interface LocalResourceChecker
Parameters:
tre - Provides access to the NJS's TSI as well as describing on whose behalf we are checking resources.

estimateTurnaroundTime

public boolean estimateTurnaroundTime(ResourceBroker.TSIRunEngine tre,
                                      Estimate est,
                                      ResourceSet resources)
Description copied from interface: LocalResourceChecker
Fill in the given estimate with how long a job requiring the given resource set will take to start and run. Also obtains cost estimates.

Specified by:
estimateTurnaroundTime in interface LocalResourceChecker
Parameters:
tre - Provides access to the NJS's TSI as well as describing on whose behalf we are getting the estimate.

getCPUQuota

public Integer getCPUQuota(IncarnatedUser user,
                           ResourceSet resources)
Description copied from interface: LocalResourceChecker
Discover the amount of CPU time remaining to the user on the local execution resource.

Specified by:
getCPUQuota in interface LocalResourceChecker
Returns:
Number of seconds left, or null if the operation is not supported.

getFormalName

public String getFormalName()
Description copied from interface: NamedPlugin
Get the formal name of the plugin. This should be long enough to allow people who are not experts with the code to understand it, and will be written to the log to associate itself with the shorter name.

Specified by:
getFormalName in interface NamedPlugin

getName

public String getName()
Description copied from interface: NamedPlugin
Get the name of the plugin. This should be fairly short so that the logging messages aren't too massive.

Specified by:
getName in interface NamedPlugin

initialise

public boolean initialise(ResourceBroker broker,
                          Logger logger,
                          ResourceSet njsResources,
                          Element domNode)
Description copied from interface: LocalResourceChecker
Initialise from the given DOM-tree element and broker configuration.

Specified by:
initialise in interface LocalResourceChecker
Returns:
whether the initialisation succeeded.

UNICORE Resource Broker NJS Plugin
1.5α1

Submit a bug or feature
Copyright © 2002-2004 University of Manchester, U.K. See license.terms for details.