org.griphyn.cPlanner.poolinfo
Class MdsQuery

java.lang.Object
  extended by org.griphyn.cPlanner.poolinfo.MdsQuery

public class MdsQuery
extends Object

This Class queries the GT2 based Monitoring and Discovery Service (MDS) and stores the remote sites information into a single data class.

Version:
$Revision: 50 $
Author:
Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu

Field Summary
private static int Avg_Bandwidth
           
private static int Avg_Bandwidth_range1
           
private static int Avg_Bandwidth_range2
           
private static int Avg_Bandwidth_range3
           
private static int Avg_Bandwidth_range4
           
private  String DEFAULT_CTX
           
private static int Dest_Subnet_Id
           
private  Hashtable env
           
private static int Gvds_Pool_Gridlaunch
           
private static int Gvds_Pool_Id
           
private static int Gvds_Pool_Lrc
           
private static int Gvds_Pool_Profile
           
private static int Gvds_Pool_Storage
           
private static int Gvds_Pool_Universe
           
private static int Gvds_Pool_WorkDir
           
private static int Host_Subnet_Id
           
private  ArrayList m_identifiers
           
private static int Max_Bandwidth
           
private static int Mds_Computer_Isa
           
private static int Mds_Computer_Total_Free_NodeCount
           
private static int Mds_Computer_Total_NodeCount
           
private static int Mds_Gram_Job_Queue_MaxCount
           
private static int Mds_Gram_Job_Queue_MaxCpuTime
           
private static int Mds_Gram_Job_Queue_MaxJobsInQueue
           
private static int Mds_Gram_Job_Queue_MaxRunningJobs
           
private static int Mds_Memory_Ram_FreeSizeMB
           
private static int Mds_Memory_Ram_Total_SizeMB
           
private static int Mds_Os_Name
           
private static int Mds_Service_Gram_SchedulerType
           
private static int Mds_Subnetid
           
private  String mdsbaseDN
           
private  String mdshost
           
private  int mdsport
           
private static int Min_Bandwidth
           
 
Constructor Summary
MdsQuery()
          C'tor for the class.
MdsQuery(String host, int port)
          Valid C'tor for the class to create a MdsQuery object.
 
Method Summary
 LdapContext connectMds()
          Create and return a MDS LdapContext.
 void displayResults(NamingEnumeration results, String baseDN)
          Displays the result on stdout instead of putting it in data classes.
 NamingEnumeration searchMDS(LdapContext mdsctx, String baseDN, String filter)
          Still Thinking how to eable this option.
 void setLdapConnectionEnv(String index, String value)
          Enables a user to set new or overide existing connection settings to the MDS.
 void setLdapSearchConstraints()
           
 PoolConfig StoreGvdsMdsInfo(NamingEnumeration results, String baseDN, PoolConfig poolconfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mdshost

private String mdshost

mdsport

private int mdsport

mdsbaseDN

private String mdsbaseDN

DEFAULT_CTX

private String DEFAULT_CTX

env

private Hashtable env

Gvds_Pool_Id

private static final int Gvds_Pool_Id
See Also:
Constant Field Values

Gvds_Pool_Universe

private static final int Gvds_Pool_Universe
See Also:
Constant Field Values

Gvds_Pool_WorkDir

private static final int Gvds_Pool_WorkDir
See Also:
Constant Field Values

Gvds_Pool_Lrc

private static final int Gvds_Pool_Lrc
See Also:
Constant Field Values

Gvds_Pool_Gridlaunch

private static final int Gvds_Pool_Gridlaunch
See Also:
Constant Field Values

Gvds_Pool_Storage

private static final int Gvds_Pool_Storage
See Also:
Constant Field Values

Gvds_Pool_Profile

private static final int Gvds_Pool_Profile
See Also:
Constant Field Values

Mds_Computer_Total_Free_NodeCount

private static final int Mds_Computer_Total_Free_NodeCount
See Also:
Constant Field Values

Mds_Computer_Total_NodeCount

private static final int Mds_Computer_Total_NodeCount
See Also:
Constant Field Values

Mds_Gram_Job_Queue_MaxCount

private static final int Mds_Gram_Job_Queue_MaxCount
See Also:
Constant Field Values

Mds_Gram_Job_Queue_MaxCpuTime

private static final int Mds_Gram_Job_Queue_MaxCpuTime
See Also:
Constant Field Values

Mds_Gram_Job_Queue_MaxRunningJobs

private static final int Mds_Gram_Job_Queue_MaxRunningJobs
See Also:
Constant Field Values

Mds_Gram_Job_Queue_MaxJobsInQueue

private static final int Mds_Gram_Job_Queue_MaxJobsInQueue
See Also:
Constant Field Values

Mds_Memory_Ram_Total_SizeMB

private static final int Mds_Memory_Ram_Total_SizeMB
See Also:
Constant Field Values

Mds_Memory_Ram_FreeSizeMB

private static final int Mds_Memory_Ram_FreeSizeMB
See Also:
Constant Field Values

Mds_Service_Gram_SchedulerType

private static final int Mds_Service_Gram_SchedulerType
See Also:
Constant Field Values

Mds_Computer_Isa

private static final int Mds_Computer_Isa
See Also:
Constant Field Values

Mds_Os_Name

private static final int Mds_Os_Name
See Also:
Constant Field Values

Mds_Subnetid

private static final int Mds_Subnetid
See Also:
Constant Field Values

Host_Subnet_Id

private static final int Host_Subnet_Id
See Also:
Constant Field Values

Dest_Subnet_Id

private static final int Dest_Subnet_Id
See Also:
Constant Field Values

Avg_Bandwidth_range1

private static final int Avg_Bandwidth_range1
See Also:
Constant Field Values

Avg_Bandwidth_range2

private static final int Avg_Bandwidth_range2
See Also:
Constant Field Values

Avg_Bandwidth_range3

private static final int Avg_Bandwidth_range3
See Also:
Constant Field Values

Avg_Bandwidth_range4

private static final int Avg_Bandwidth_range4
See Also:
Constant Field Values

Avg_Bandwidth

private static final int Avg_Bandwidth
See Also:
Constant Field Values

Max_Bandwidth

private static final int Max_Bandwidth
See Also:
Constant Field Values

Min_Bandwidth

private static final int Min_Bandwidth
See Also:
Constant Field Values

m_identifiers

private ArrayList m_identifiers
Constructor Detail

MdsQuery

public MdsQuery()
C'tor for the class.


MdsQuery

public MdsQuery(String host,
                int port)
Valid C'tor for the class to create a MdsQuery object. Sets the SECURITY_ATHENTICATION with simple authentication. Sets the PROVIDER_URL to the MDS host and port. Sets the INTITIAL CONTEXT FACTORY.

Parameters:
host - the hostname of the machine on which a GRIS or GIIS is running.
port - the Port number on which a GRIS or GIIS is running.
Method Detail

setLdapConnectionEnv

public void setLdapConnectionEnv(String index,
                                 String value)
Enables a user to set new or overide existing connection settings to the MDS.

Parameters:
index - Holds the index string for the connection environment.
value - Holds the value corresponding to the index fro the connnection environment.

setLdapSearchConstraints

public void setLdapSearchConstraints()

connectMds

public LdapContext connectMds()
                       throws NamingException
Create and return a MDS LdapContext.

Returns:
LdapContext
Throws:
NamingException

searchMDS

public NamingEnumeration searchMDS(LdapContext mdsctx,
                                   String baseDN,
                                   String filter)
Still Thinking how to eable this option.


StoreGvdsMdsInfo

public PoolConfig StoreGvdsMdsInfo(NamingEnumeration results,
                                   String baseDN,
                                   PoolConfig poolconfig)
                            throws NamingException,
                                   Exception
Throws:
NamingException
Exception

displayResults

public void displayResults(NamingEnumeration results,
                           String baseDN)
                    throws NamingException
Displays the result on stdout instead of putting it in data classes.

Parameters:
results - Takes a NamingEnumeration returned by the MDS search
baseDN - Takes the baseDN provided to the MDS search.
Throws:
NamingException


Copyright © 2007 The University of Southern California. All Rights Reserved.