Trying admin API

Hi there,

I try to use the admin API following the sample code in the wiki. I have installed GigaSpacces XAP 7.0.0-m5 with all default configurations intact. I started GSC, GSM and an unmanaged space from the management UI and then wrote a script like this in groovy as a test:

import org.openspaces.admin.Admin import org.openspaces.admin.AdminFactory import org.openspaces.admin.machine.Machine import org.openspaces.admin.space.* import org.openspaces.admin.pu.* import org.openspaces.admin.lus.* import org.openspaces.admin.gsm.*

Admin admin = new AdminFactory().addGroup("gigaspaces-7.0.0-XAPPremium-m5").createAdmin() GridServiceManagers gsms = admin.getGridServiceManagers() gsms.waitFor(1) for (Machine machine : admin.getMachines()) { println("Machine [" + machine.getUid() + "], " + "TotalPhysicalMem [" + machine.getOperatingSystem().getDetails().getTotalPhysicalMemorySizeInGB() + "GB], " + "FreePhysicalMem [" + machine.getOperatingSystem().getStatistics().getFreePhysicalMemorySizeInGB() + "GB]]"); for (SpaceInstance spaceInstance : machine.getSpaceInstances()) { System.out.println(" -> Space [" + spaceInstance.getUid() + "]"); } for (ProcessingUnitInstance processingUnitInstance : machine.getProcessingUnitInstances()) { System.out.println(" -> PU [" + processingUnitInstance.getUid() + "]"); } } admin.close()

the waitFor(1) never returns. It seems that it has trouble to locate the gsms, gscs and lus (I tried each of them). Any idea of what is the possible cause of it?

Regards,

Jerry

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2949]{quote}

asked 2009-03-16 07:57:32 -0500

superwai gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete