Dear All,
I am trying to extract Grid information from the MDS. I can extract
some of the parameters as specirfied in the returnAttributes array
which i pass to ldapContext. Search method.
What i want is to extract all the information from MDS without
specifiying any returnAttributes.
Can Anyone help me with it please?
Below is the code i use for extracting the information from MDS.
If there is anyother method available to get all the information from
GRIS please let me know that as well.
I dont want to miss any single piece of data that Grid Information
Service offers about the grid sites.
Any help would be greatly appreciated.
Many thanks
===================
public Hashtable<String, Vector<String>> getinfo() {
Hashtable<String, Vector<String>> information=new Hashtable<String,
Vector<String>>();
env = new Hashtable();
String url = "ldap://" + hostname + ":" + port;
env.put("java.naming.ldap.version",
String.valueOf(ldapVersion));
env.put(Context.INITIAL_CONTEXT_FACTORY, DEFAULT_CTX);
env.put(Context.PROVIDER_URL, url);
if (bindDN != null) {
env.put(Context.SECURITY_PRINCIPAL, bindDN);
}
env.put("javax.security.sasl.client.pkgs",
"org.globus.mds.gsi.jndi");
env.put("javax.security.sasl.qop", qop);
try {
ctx = new InitialLdapContext(env, null);
SearchControls constraints = new SearchControls();
constraints.setSearchScope(scope);
constraints.setCountLimit(sizeLimit);
constraints.setTimeLimit(timeLimit);
// String[] retAttribs={};
String[] retAttribs = { "GlueCE",
"GlueCEAccessControlBase",
"GlueCEAccessControlBaseRule",
"GlueCEHostingCluster",
"GlueCEInfo",
"GlueCEInfoApplicationDir",
"GlueCEInfoContactString",
"GlueCEInfoDataDir",
"GlueCEInfoDefaultSE",
"GlueCEInfoGatekeeperPort",
"GlueCEInfoHostName",
"GlueCEInfoJobManager",
"GlueCEInfoLRMSType",
"GlueCEInfoLRMSVersion",
"GlueCEInfoTotalCPUs",
"GlueCEName",
"GlueCEPolicy",
"GlueCEPolicyMaxCPUTime",
"GlueCEPolicyMaxRunningJobs",
"GlueCEPolicyMaxTotalJobs",
"GlueCEPolicyMaxWallClockTime",
"GlueCEPolicyPriority",
"GlueCEState",
"GlueCEStateEstimatedResponseTime",
"GlueCEStateFreeCPUs",
"GlueCEStateRunningJobs",
"GlueCEStateStatus",
"GlueCEStateTotalJobs",
"GlueCEStateWaitingJobs",
"GlueCEStateWorstResponseTime",
"GlueCETop",
"GlueCEUniqueID",
"GlueChunkKey",
"GlueCluster",
"GlueClusterName",
"GlueClusterService",
"GlueClusterTop",
"GlueClusterUniqueID",
"GlueForeignKey",
"GlueHostApplicationSoftware",
"GlueHostApplicationSoftwareRunTimeEnvironment",
"GlueHostArchitecture",
"GlueHostArchitecturePlatformType",
"GlueHostArchitectureSMPSize",
"GlueHostBenchmark",
"GlueHostBenchmarkSF00",
"GlueHostBenchmarkSI00",
"GlueHostMainMemory",
"GlueHostMainMemoryRAMSize",
"GlueHostMainMemoryVirtualSize",
"GlueHostNetworkAdapter",
"GlueHostNetworkAdapterInboundIP",
"GlueHostNetworkAdapterOutboundIP",
"GlueHostOperatingSystem",
"GlueHostOperatingSystemName",
"GlueHostOperatingSystemRelease",
"GlueHostOperatingSystemVersion",
"GlueHostProcessor",
"GlueHostProcessorClockSpeed",
"GlueHostProcessorModel",
"GlueHostProcessorVendor",
"GlueInformationService",
"GlueInformationServiceURL",
"GlueKey",
"GlueSchemaVersion",
"GlueSchemaVersionMajor",
"GlueSchemaVersionMinor",
"GlueSite",
"GlueSiteUniqueID",
"GlueSubCluster",
"GlueSubClusterLogicalCPUs",
"GlueSubClusterName",
"GlueSubClusterPhysicalCPUs",
"GlueSubClusterTmpDir",
"GlueSubClusterUniqueID",
"GlueSubClusterWNTmpDir",
"GlueTop"
};
HashMap<String, HashMap<String, String>> mdsinfo=new
HashMap<String, HashMap<String,String>>();
HashMap<String, String> clusterinfo=new HashMap<String,
String>();
constraints.setReturningAttributes(retAttribs);
NamingEnumeration results = ctx.search(baseDN, "(&)",
constraints);
==================================================================
----------------------------------------------------------------
This message was sent using HORDE - IMP at DPS.