gov.bnl.star.offline.scheduler.policy.copyselector
Class MinMaxSingleCopySelector

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.policy.copyselector.MinMaxSingleCopySelector
All Implemented Interfaces:
CopySelector
Direct Known Subclasses:
RootdMinMaxSingleCopySelector

public class MinMaxSingleCopySelector
extends java.lang.Object
implements CopySelector

Select the copies trying to comply with the minFilesPerProcess parameter. The selection is split in five staged.

1) Assigns all the files that are on one machine only. There is no chioce to be made there.

2) Checks if, due to the min limit, some groups can't be split into valid jobs. In that case, looks for files that have one copy on that machines, and assigns them

3) Assigns all the files that have multiple copies. If preferStorage is used, it chooses a file on the given storage. Local copies as chosen randomly.

4) Checks if, due to the min limits, some groups can't be split correctly. In that cases, uses files on NFS to fill the minimum requirements.

5) Assigns the rest of the files on NFS. First, it fills to the max all the processes already created. Then it assigns the rest to processes that run on NFS

Author:
Gabreile Carcassi & Pavel Jakl

Constructor Summary
MinMaxSingleCopySelector()
           
 
Method Summary
 int selectCopy(QueryResult list, CatalogQuery query, FileAssignment assignment)
          Selects the physical copies from the query result according to the parameters of the query, and puts them in the assignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinMaxSingleCopySelector

public MinMaxSingleCopySelector()
Method Detail

selectCopy

public int selectCopy(QueryResult list,
                      CatalogQuery query,
                      FileAssignment assignment)
Description copied from interface: CopySelector
Selects the physical copies from the query result according to the parameters of the query, and puts them in the assignment. The selector has to guarantee not to remove files from the received assignment, but only add them.

Specified by:
selectCopy in interface CopySelector
Parameters:
list - the result of the query
query - the query that generated the result
assignment - the assignment where to add the copies
Returns:
the number of files added to the assignment


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