Package edu.isi.pegasus.planner.common
Class PegasusConfiguration
- java.lang.Object
-
- edu.isi.pegasus.planner.common.PegasusConfiguration
-
public class PegasusConfiguration extends java.lang.Object
A utility class that returns JAVA Properties that need to be set based on a configuration value- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONDOR_CONFIGURATION_VALUE
The value for the condor configuration.static java.lang.String
DEFAULT_DATA_CONFIGURATION_VALUE
The default data configuration valuestatic java.lang.String
DEPRECATED_CONDOR_CONFIGURATION_VALUE
The value for the condor configuration.static java.lang.String
DEPRECATED_S3_CONFIGURATION_VALUE
The value for the S3 configuration.private LogManager
mLogger
The logger to use.static java.lang.String
NON_SHARED_FS_CONFIGURATION_VALUE
The value for the non shared filesystem configuration.static java.lang.String
PEGASUS_CONFIGURATION_PROPERTY_KEY
The property key for pegasus configuration.static java.lang.String
SHARED_FS_CONFIGURATION_VALUE
The value for the non shared filesystem configuration.
-
Constructor Summary
Constructors Constructor Description PegasusConfiguration(LogManager logger)
Overloaded Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkAndSetProperty(PegasusProperties properties, java.lang.String key, java.lang.String value)
Checks for a property, if it does not exist then sets the property to the value passedprotected java.lang.String
deprecatedValueMessage(java.lang.String property, java.lang.String deprecatedValue, java.lang.String updatedValue)
Returns the deperecated value messagejava.util.Properties
getConfigurationProperties(java.lang.String configuration)
Returns Properties corresponding to a particular configuration.private void
loadConfigurationProperties(PegasusProperties properties)
Loads configuration specific properties into PegasusPropertiesvoid
loadConfigurationPropertiesAndOptions(PegasusProperties properties, PlannerOptions options)
Loads configuration specific properties into PegasusProperties, and adjusts planner options accordingly.boolean
setupForCondorIO(PegasusProperties properties)
Returns a boolean indicating if properties are setup for condor iovoid
updateSiteStoreAndOptions(SiteStore store, PlannerOptions options)
Updates Site Store and options based on the planner options set by the user on the command line
-
-
-
Field Detail
-
PEGASUS_CONFIGURATION_PROPERTY_KEY
public static final java.lang.String PEGASUS_CONFIGURATION_PROPERTY_KEY
The property key for pegasus configuration.- See Also:
- Constant Field Values
-
DEPRECATED_S3_CONFIGURATION_VALUE
public static final java.lang.String DEPRECATED_S3_CONFIGURATION_VALUE
The value for the S3 configuration.- See Also:
- Constant Field Values
-
SHARED_FS_CONFIGURATION_VALUE
public static final java.lang.String SHARED_FS_CONFIGURATION_VALUE
The value for the non shared filesystem configuration.- See Also:
- Constant Field Values
-
DEFAULT_DATA_CONFIGURATION_VALUE
public static java.lang.String DEFAULT_DATA_CONFIGURATION_VALUE
The default data configuration value
-
NON_SHARED_FS_CONFIGURATION_VALUE
public static final java.lang.String NON_SHARED_FS_CONFIGURATION_VALUE
The value for the non shared filesystem configuration.- See Also:
- Constant Field Values
-
CONDOR_CONFIGURATION_VALUE
public static final java.lang.String CONDOR_CONFIGURATION_VALUE
The value for the condor configuration.- See Also:
- Constant Field Values
-
DEPRECATED_CONDOR_CONFIGURATION_VALUE
public static final java.lang.String DEPRECATED_CONDOR_CONFIGURATION_VALUE
The value for the condor configuration.- See Also:
- Constant Field Values
-
mLogger
private LogManager mLogger
The logger to use.
-
-
Constructor Detail
-
PegasusConfiguration
public PegasusConfiguration(LogManager logger)
Overloaded Constructor- Parameters:
logger
- the logger to use.
-
-
Method Detail
-
loadConfigurationPropertiesAndOptions
public void loadConfigurationPropertiesAndOptions(PegasusProperties properties, PlannerOptions options)
Loads configuration specific properties into PegasusProperties, and adjusts planner options accordingly.- Parameters:
properties
- the Pegasus Propertiesoptions
- the PlannerOptions .
-
updateSiteStoreAndOptions
public void updateSiteStoreAndOptions(SiteStore store, PlannerOptions options)
Updates Site Store and options based on the planner options set by the user on the command line- Parameters:
store
- the outputSite storeoptions
- the planner options.
-
loadConfigurationProperties
private void loadConfigurationProperties(PegasusProperties properties)
Loads configuration specific properties into PegasusProperties- Parameters:
properties
- the Pegasus Properties.
-
getConfigurationProperties
public java.util.Properties getConfigurationProperties(java.lang.String configuration)
Returns Properties corresponding to a particular configuration.- Parameters:
configuration
- the configuration value.- Returns:
- Properties
-
setupForCondorIO
public boolean setupForCondorIO(PegasusProperties properties)
Returns a boolean indicating if properties are setup for condor io- Parameters:
properties
-- Returns:
- boolean
-
checkAndSetProperty
protected void checkAndSetProperty(PegasusProperties properties, java.lang.String key, java.lang.String value)
Checks for a property, if it does not exist then sets the property to the value passed- Parameters:
key
- the property keyvalue
- the value to set to
-
deprecatedValueMessage
protected java.lang.String deprecatedValueMessage(java.lang.String property, java.lang.String deprecatedValue, java.lang.String updatedValue)
Returns the deperecated value message- Parameters:
property
- the propertydeprecatedValue
- the deprecated valueupdatedValue
- the updated value- Returns:
- message
-
-