gov.bnl.star.offline.scheduler.policy
Class ClusterAssignmentByMonitorPolicy

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.policy.ClusterAssignmentByMonitorPolicy
All Implemented Interfaces:
Policy

public class ClusterAssignmentByMonitorPolicy
extends java.lang.Object
implements Policy

This policy takes the assignment from another policy, and assigns clusters depending on the result of the monitoring information. The class will have a primary cluster and a secondary cluster. If the secondary cluster is not completely full, some jobs will be diverted there. All the jobs that won't fit in the secondary cluster will be diverted to the primary cluster. One can set a specific queue for which jobs will be sent to the secondary, leaving all the other queues to the primary.

Version:
$Revision: 1.6 $ $Date: 2006/11/21 00:41:32 $
Author:
Gabriele Carcassi

Constructor Summary
ClusterAssignmentByMonitorPolicy()
           
 
Method Summary
 java.util.List assignTargetMachine(Request request)
          Decides how and where to run the job according to its requirements.
 ClusterInfoFinder getClusterMonitoring()
          Getter for property clusterMonitoring.
 Policy getPolicy()
          Getter for property policy.
 java.lang.String getPrimaryCluster()
          Getter for property primaryCluster.
 java.lang.String getQueueToRedirect()
          Getter for property queueToRedirect.
 java.lang.String getSecondaryCluster()
          Getter for property secondaryCluster.
 void setClusterMonitoring(ClusterInfoFinder clusterMonitoring)
          Setter for property clusterMonitoring.
 void setPolicy(Policy policy)
          Setter for property policy.
 void setPrimaryCluster(java.lang.String primaryCluster)
          Setter for property primaryCluster.
 void setQueueToRedirect(java.lang.String queueToRedirect)
          Setter for property queueToRedirect.
 void setSecondaryCluster(java.lang.String secondaryCluster)
          Setter for property secondaryCluster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterAssignmentByMonitorPolicy

public ClusterAssignmentByMonitorPolicy()
Method Detail

assignTargetMachine

public java.util.List assignTargetMachine(Request request)
Description copied from interface: Policy
Decides how and where to run the job according to its requirements. The policy has to fill in the process list of the job description. This will be used by the dispatcher to execute the job. A policy, therefore, will receive a JobRequest with no processes, and it should return a JobRequest with all the necessary processes created and fully configured.

The Policy is allowed to query the farm status, use the catalog and trigger file movements. It can slice the job into more than one process, according to, for example, where the input files are located.

Specified by:
assignTargetMachine in interface Policy
Parameters:
request - the job description and its requirements

getPolicy

public Policy getPolicy()
Getter for property policy.

Returns:
Value of property policy.

setPolicy

public void setPolicy(Policy policy)
Setter for property policy.

Parameters:
policy - New value of property policy.

getClusterMonitoring

public ClusterInfoFinder getClusterMonitoring()
Getter for property clusterMonitoring.

Returns:
Value of property clusterMonitoring.

setClusterMonitoring

public void setClusterMonitoring(ClusterInfoFinder clusterMonitoring)
Setter for property clusterMonitoring.

Parameters:
clusterMonitoring - New value of property clusterMonitoring.

getPrimaryCluster

public java.lang.String getPrimaryCluster()
Getter for property primaryCluster.

Returns:
Value of property primaryCluster.

setPrimaryCluster

public void setPrimaryCluster(java.lang.String primaryCluster)
Setter for property primaryCluster.

Parameters:
primaryCluster - New value of property primaryCluster.

getSecondaryCluster

public java.lang.String getSecondaryCluster()
Getter for property secondaryCluster.

Returns:
Value of property secondaryCluster.

setSecondaryCluster

public void setSecondaryCluster(java.lang.String secondaryCluster)
Setter for property secondaryCluster.

Parameters:
secondaryCluster - New value of property secondaryCluster.

getQueueToRedirect

public java.lang.String getQueueToRedirect()
Getter for property queueToRedirect.

Returns:
Value of property queueToRedirect.

setQueueToRedirect

public void setQueueToRedirect(java.lang.String queueToRedirect)
Setter for property queueToRedirect.

Parameters:
queueToRedirect - New value of property queueToRedirect.


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.