gov.bnl.star.offline.scheduler.dataset
Class SubsetValidator

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.dataset.SubsetValidator

public class SubsetValidator
extends java.lang.Object

Used to verify that this class meets the users requirements and the system requirements after processing.

Author:
Levetne B. Hajdu

Constructor Summary
SubsetValidator()
          Creates a new instance of validateDataset
 
Method Summary
 java.util.List getDatasetIndexList()
           
 java.lang.String getErrors()
           
 int getIndexCount()
          This function returns the number of indexs is the dataset.
 int getMaxFiles()
           
 int getMinFiles()
           
 boolean getMustHaveHomogeneousHost()
           
 boolean getMustHaveHomogeneousSite()
           
 boolean isErrorFatal()
           
 void setMaxFiles(int maxFiles)
           
 void setMinFiles(int minFiles)
           
 void setMustHaveHomogeneousHost(boolean mustHaveHomogeneousHost)
          Test that each split has only only files from one host
 void setMustHaveHomogeneousSite(boolean mustHaveHomogeneousSite)
           
 boolean validate(Dataset dataset)
          Returns the sum of all tested anded together.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubsetValidator

public SubsetValidator()
Creates a new instance of validateDataset

Method Detail

setMustHaveHomogeneousHost

public void setMustHaveHomogeneousHost(boolean mustHaveHomogeneousHost)
Test that each split has only only files from one host

Parameters:
mustHaveHomogeneousHost - set to ture o run this test, set to false not to run this test

getMustHaveHomogeneousHost

public boolean getMustHaveHomogeneousHost()
Returns:
true if object will test for files with homogeneous, else it will return false

setMustHaveHomogeneousSite

public void setMustHaveHomogeneousSite(boolean mustHaveHomogeneousSite)
Parameters:
mustHaveHomogeneousSite - set to true to test if all entries in an index delog to the same site

getMustHaveHomogeneousSite

public boolean getMustHaveHomogeneousSite()
Returns:
true if the testing that all entries in an index delog to the same site, if not testing return false

setMaxFiles

public void setMaxFiles(int maxFiles)
Parameters:
maxFiles - Test that no index has more files than this value

getMaxFiles

public int getMaxFiles()
Returns:
A number <=-1. Will -1 if this test will not be run else it will test that no index has more files than the value returned

setMinFiles

public void setMinFiles(int minFiles)
Parameters:
minFiles - Test that no index has less files than this value

getMinFiles

public int getMinFiles()
Returns:
A number <=-1. Will -1 if this test will not be run else it will test that no index has less files than the value returned

validate

public boolean validate(Dataset dataset)
Returns the sum of all tested anded together. In other words it returns ture if all tested passed and false if any one or more test faild.


isErrorFatal

public boolean isErrorFatal()

getErrors

public java.lang.String getErrors()

getIndexCount

public int getIndexCount()
This function returns the number of indexs is the dataset. If validate(dataset) has not yet been called it will return zero.


getDatasetIndexList

public java.util.List getDatasetIndexList()


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