Class PassivePolicy

  extended by
All Implemented Interfaces:
Direct Known Subclasses:
AssignmentByQueueMonitorPolicy, DynamicConfigPolicy, ResonanceGroupPolicy

public class PassivePolicy
extends java.lang.Object
implements Policy

Decides how to split the job without triggering any resource redistribution. The passive policy doesn't trigger any file copy: it just collects information and does the best it can.

The policy will use copy selectors and file assignments to build the division. Refer to the documentation of those pieces for the details.

Overview of what the policy does
The policy basically solves all the queries, thus creating a big list of files. Then, according to which machines the file reside, the files are divided into different processes. At that point a new process is created.

How to configure the policy

There are few things how have to set in the policy to configure it. First of all, the queue names:

You will also need to configure the minTimeLimitQueue, which sets the limit for the length of the jobs on the short queues. Both nfsQueue and localQueue are short queues, meaning that if any job longer than the time set, will go to the longQueue, regardless of their input.

The last thing you will need to set, is whether rootd is available on the cluster. This will allow the policy to assign a job files that are on different local disks. This helps to satisfy the requirements, such as minFilesPerProcess when using files on local disk.

An optional setting is the clusterName, which will be assigned to all the jobs being created by this policy.

$Revision: 1.52 $ $Date: 2006/11/21 00:41:32 $
Gabriele Carcassi & Pavel Jakl & Levente Hajdu

Field Summary
 java.util.List genericQueueList
 java.util.List localQueueList
static org.apache.log4j.Logger log
protected  java.lang.String longQueue
Constructor Summary
Method Summary
 void addQueue(Queue queue)
static void assignQueue(Queue queue, Job job)
          This member associates the job to the queue.
 void assignQueues(Request request, java.util.List jobs)
 java.util.List assignTargetMachine(Request request)
          Processes a job requests, splitting into multiple processes and assigning the target machines.
 void ClearAllQueues()
 boolean getBypassQueueTests()
 java.lang.String getClusterName()
          Getter for property clusterName.
 java.lang.String getLocalQueue()
 java.lang.String getLongQueue()
 int getMinTimeLimitQueue()
 java.lang.String getNfsQueue()
static int getXrootdPort()
static java.lang.String getXrootdRedirectorName()
static boolean isRootdAvailable()
          Tells the policy that rootd is available on the cluster.
static boolean isXrootdAvailable()
 java.lang.String QueueInfo(java.util.List localQueueList, java.util.List genericQueueList)
 java.lang.String resize(java.lang.String string, int size)
 void setBypassQueueTests(boolean bypassQueueTests)
 void setClusterName(java.lang.String clusterName)
          Sets the name of the cluster that will be assigned to all the jobs.
 void setLocalQueue(java.lang.String localQueue)
          Changes the name of the local queue.
 void setLongQueue(java.lang.String longQueue)
          Changes the name of the long queue.
 void setMinTimeLimitQueue(int minTimeLimit)
          Sets the maximum duration of a job that will be sent to the short queue.
 void setNfsQueue(java.lang.String nfsQueue)
          Changes the name of the NFS queue.
static void setRootdAvailable(boolean rootdAvailable)
static void setXrootdAvailable(boolean xrootdAvailable)
static void setXrootdPort(int xrootdPort)
static void setXrootdRedirectorName(java.lang.String xrootdRedirectorName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static org.apache.log4j.Logger log


protected java.lang.String longQueue


public java.util.List localQueueList


public java.util.List genericQueueList
Constructor Detail


public PassivePolicy()
Method Detail


public static void assignQueue(Queue queue,
                               Job job)
This member associates the job to the queue. In order to set the association the following classes have to be set: job.setQueueObj(queue); job.setAccessMethod() job.setAccessPoint();


public void assignQueues(Request request,
                         java.util.List jobs)


public java.util.List assignTargetMachine(Request request)
Processes a job requests, splitting into multiple processes and assigning the target machines.

The step followed here are:

Most of these actions are done in a separate private method. Refer to those for more information.

Specified by:
assignTargetMachine in interface Policy
request - the job to be processed


public void setNfsQueue(java.lang.String nfsQueue)
Changes the name of the NFS queue. The NFS queue is used for all those jobs that aren't assigned any file on local disk and whose length is less than minTimeLimitQueue.


public java.lang.String getNfsQueue()


public void setLocalQueue(java.lang.String localQueue)
Changes the name of the local queue. The local queue is used for all those jobs that are assigned at least one file on local disk and whose length is less than minTimeLimitQueue.


public java.lang.String getLocalQueue()


public void setLongQueue(java.lang.String longQueue)
Changes the name of the long queue. A job is assigned to the long queue when the minFilePerProcess and filesPerHour do not allow a job length smaller than minTimeLimitQueue.


public java.lang.String getLongQueue()


public void setMinTimeLimitQueue(int minTimeLimit)
Sets the maximum duration of a job that will be sent to the short queue. This is also the minimum duration of a job on the long queue. Both the localQueue and the nfsQueue are considered short queues.


public int getMinTimeLimitQueue()


public static boolean isRootdAvailable()
Tells the policy that rootd is available on the cluster. Having rootd available in the cluster means that, if the filelistSyntax of the job is rootd, the job will be able to access local disk files from every node. This enables the policy to assign to a single job files from different local disks, which will make it easier to satisfy request requirement, such as minFilesPerProcess.


public static void setRootdAvailable(boolean rootdAvailable)


public static boolean isXrootdAvailable()


public static void setXrootdAvailable(boolean xrootdAvailable)


public static int getXrootdPort()


public static void setXrootdPort(int xrootdPort)


public static java.lang.String getXrootdRedirectorName()


public static void setXrootdRedirectorName(java.lang.String xrootdRedirectorName)


public java.lang.String getClusterName()
Getter for property clusterName.

Value of property clusterName.


public void setClusterName(java.lang.String clusterName)
Sets the name of the cluster that will be assigned to all the jobs. This parameter allows to create a single CompositeDispatcher with all the diffferent clusters. By changing this parameter in the policy, you will then control on which cluster jobs will be dispatched, without having to reconfigure the dispatchers.


public void ClearAllQueues()


public java.lang.String resize(java.lang.String string,
                               int size)


public java.lang.String QueueInfo(java.util.List localQueueList,
                                  java.util.List genericQueueList)


public void addQueue(Queue queue)


public void setBypassQueueTests(boolean bypassQueueTests)


public boolean getBypassQueueTests()

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