Package com.sun.grid.jgdi.monitoring

Examples of com.sun.grid.jgdi.monitoring.HostInfo


        return suite;
    }
   
    private void printResult(QHostResult res) {
        for (String hostname : res.getHostNames()) {
            HostInfo hostInfo = res.getHostInfo(hostname);
            logger.fine("Host " + hostname + " ---------------------");
            for (String hostValueNames : hostInfo.getHostValueKeys()) {
                logger.fine("HostValue: " + hostValueNames + " = " + hostInfo.getHostValue(hostValueNames));
            }
           
            for (QueueInfo qi : hostInfo.getQueueList()) {
                logger.fine("  Queue: " + qi.getQname());
                logger.fine("  Qtype: " + qi.getQtype());
                logger.fine("  State: " + qi.getState());
                logger.fine("  total: " + qi.getTotalSlots());
                logger.fine("  used:  " + qi.getUsedSlots());
            }
           
            for (String dom : hostInfo.getDominanceSet()) {
                for (String resourceValueName : hostInfo.getResourceValueNames(dom)) {
                    logger.fine("Resource: " + dom + ": " + resourceValueName + " = " + hostInfo.getResourceValue(dom, resourceValueName));
                }
            }
        }
    }
View Full Code Here


                HostFilter hf = new HostFilter();
                hf.addHost(eh.getName());
                qhostOptions.setHostFilter(hf);
                QHostResult res = jgdi.execQHost(qhostOptions);
                printResult(res);
                HostInfo hi = res.getHostInfo(eh.getName());
                assertNotNull(hi);
                for (ClusterQueue cq : cqList) {
                    for (QueueInstance cqi : cq.getQinstancesList()) {
                        if (cqi.getQhostname().equals(eh.getName())) {
                            boolean foundq = false;
                            for (QueueInfo qi : hi.getQueueList()) {
                                String hqname = qi.getQname();
                                // System.out.println("++ comparing cq.getName() " + cq.getName() +
                                //                      " and hqname " + hqname);
                                if (cq.getName().equals(hqname)) {
                                    //   System.out.println("-- matching cq.getName() " + cq.getName() +
View Full Code Here

                    ResourceAttributeFilter resourceAttributeFilter = new ResourceAttributeFilter();
                    resourceAttributeFilter.addValueName(loadValueName);
                    qhostOptions.setResourceAttributeFilter(resourceAttributeFilter);
                    QHostResult res = jgdi.execQHost(qhostOptions);
                    printResult(res);
                    HostInfo hi = res.getHostInfo(eh.getName());
                    assertNotNull(hi);
                    assertNotNull("Resource Value " + loadValueName + " not found", hi.getResourceValue("hl", loadValueName));
                }
            }
        } finally {
            jgdi.close();
        }
View Full Code Here

TOP

Related Classes of com.sun.grid.jgdi.monitoring.HostInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.