org.globus.mds.usefulrp
Class GLUEResourceProperty

java.lang.Object
  extended byorg.globus.wsrf.impl.BaseResourceProperty
      extended byorg.globus.wsrf.impl.ReflectionResourceProperty
          extended byorg.globus.mds.usefulrp.GLUEResourceProperty
All Implemented Interfaces:
ResourceProperty

public class GLUEResourceProperty
extends ReflectionResourceProperty

An MDS ResourceProperty that will allow services to easily publish queue and host status information in the GLUE schema.
This Resource property requires cluster and queue status provider scripts to generate the actual data based on the batch system and cluster monitoring system in place.
The output of the queue status provider should be an XML document with root element a Scheduler element, as defined in the MDS usefulrp schema package.
The output of the cluster status provider should be an XML document with root element a GLUE Cluster element, as defined in the GLUE schema XML mapping.
The provider scripts will be executed approximately every 5 minutes. TODO this could become configurable, or even perhaps become non-timebased, for example, by receiving push information.


Nested Class Summary
(package private)  class GLUEResourceProperty.ClusterListener
          This Listener performs simple caching of a single Cluster.
(package private) static interface GLUEResourceProperty.Listener
          This is the callback interface that PeriodicExecutors will call to deliver collected objects.
(package private)  class GLUEResourceProperty.PeriodicExecutor
          This class will periodically execute a specified script.
(package private)  class GLUEResourceProperty.SchedulerListener
          This performs some post-processing on the output of a scheduler provider, to convert from the internal scheduler schema to GLUE schema.
 
Field Summary
private  java.lang.String baseDir
           
private  org.globus.mds.glue.ClusterType[] clusterCache
          Cluster element cache, from the cluster provider.
private  GLUEResourceProperty.PeriodicExecutor clusterExecuter
           
private  java.lang.String clusterProviderName
          The name of the cluster provider executable, null if none is available.
private  org.globus.mds.glue.ComputingElementType[] computingElementCache
          Computing element cache, from the batch provider.
private  org.globus.mds.glue.config.GLUERPConfiguration config
          Holds the cached configuration read from configFile.
private  java.lang.String configFile
          config file
TODO: pull this from JNDI?
private static org.apache.commons.logging.Log logger
           
private  GLUEResourceProperty.PeriodicExecutor schedulerExecuter
           
private  java.lang.String schedulerName
           
 
Fields inherited from class org.globus.wsrf.impl.ReflectionResourceProperty
 
Fields inherited from class org.globus.wsrf.impl.BaseResourceProperty
metaData
 
Constructor Summary
GLUEResourceProperty(javax.xml.namespace.QName name, java.lang.String scheduler)
           
 
Method Summary
private static java.lang.String getBaseDirectory()
           
 org.globus.mds.glue.GLUECERPType getDynamicValue()
          This method assembles cached data into a GLUE RP value.
(package private)  void loadConfig()
           
private  void startClusterExecutor()
           
private  void startSchedulerExecutor()
           
 
Methods inherited from class org.globus.wsrf.impl.ReflectionResourceProperty
add, clear, get, getValueSimple, initialize, isArray, isEmpty, iterator, remove, set, setObject, setPropertyName, size, toElements, toSOAPElements
 
Methods inherited from class org.globus.wsrf.impl.BaseResourceProperty
convert, convertObject, convertPrimitive, getMetaData, setMetaData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.commons.logging.Log logger

clusterProviderName

private java.lang.String clusterProviderName
The name of the cluster provider executable, null if none is available.
TODO: needs to be set in config, keyed by the scheduler name, or scheduler name and queue name. A multilevel heirarchy is probably the best: default, then default per scheduler, then per scheduler+queuename


baseDir

private java.lang.String baseDir

configFile

private java.lang.String configFile
config file
TODO: pull this from JNDI?


config

private org.globus.mds.glue.config.GLUERPConfiguration config
Holds the cached configuration read from configFile.


computingElementCache

private org.globus.mds.glue.ComputingElementType[] computingElementCache
Computing element cache, from the batch provider.


clusterCache

private org.globus.mds.glue.ClusterType[] clusterCache
Cluster element cache, from the cluster provider. This will be populated by a ClusterListener


schedulerName

private java.lang.String schedulerName

clusterExecuter

private GLUEResourceProperty.PeriodicExecutor clusterExecuter

schedulerExecuter

private GLUEResourceProperty.PeriodicExecutor schedulerExecuter
Constructor Detail

GLUEResourceProperty

public GLUEResourceProperty(javax.xml.namespace.QName name,
                            java.lang.String scheduler)
                     throws java.lang.Exception
Throws:
java.lang.Exception - passes along any exception encountered during construction of underlying ReflectionResourceProperty.
Method Detail

getBaseDirectory

private static java.lang.String getBaseDirectory()

startClusterExecutor

private void startClusterExecutor()

startSchedulerExecutor

private void startSchedulerExecutor()

getDynamicValue

public org.globus.mds.glue.GLUECERPType getDynamicValue()
This method assembles cached data into a GLUE RP value. It should return fast, with other threads populating the cache.


loadConfig

void loadConfig()