Examples of QHostOptions


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

        return ret;
    }

    public QHostOptions newQHostOptions() throws JGDIException {
        log.entering("JGDIJMXBase", "newQHostOptions");
        QHostOptions ret = new QHostOptions();
        log.exiting("JGDIJMXBase", "newQHostOptions", ret);
        return ret;
    }
View Full Code Here

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

        List<String> argList = new LinkedList<String>();
        for (String arg : args) {
            argList.add(arg);
        }
        try {
            QHostOptions options = parse(argList);
            if (options != null) {
                QHostResult res = jgdi.execQHost(options);
                if (options.showAsXML()) {
                    /*TODO LP: -xml is not implemented for object other that GEObjects
                    we could use a JAXB and some generator to get the schema for other objects*/
                    out.println("XML OUTPUT NOT IMPLEMENTED");
                } else {
                    QueueInstanceSummaryPrinter.print(out, res, options);
View Full Code Here

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

                err.println("error: ERROR! invalid option argument \"" + arg + "\"");
                return null;
            }
        }

        QHostOptions options = new QHostOptions();

        options.setIncludeJobs(showJobs);
        options.setIncludeQueue(showQueues);
        options.setShowAsXML(showAsXML);
        if (hostFilter != null) {
            options.setHostFilter(hostFilter);
        }
        if (userFilter != null) {
            options.setUserFilter(userFilter);
        }
        if (resourceFilter != null) {
            options.setResourceFilter(resourceFilter);
        }
        if (resourceAttributeFilter != null) {
            options.setResourceAttributeFilter(resourceAttributeFilter);
        }

        return options;
    }
View Full Code Here

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

   
    public void testAllHostValues() throws Exception {
       
        JGDI jgdi = createJGDI();
        try {
            QHostOptions qhostOptions = new QHostOptions();
           
            ResourceAttributeFilter resourceAttributeFilter = new ResourceAttributeFilter();
           
            qhostOptions.setResourceAttributeFilter(resourceAttributeFilter);
           
            QHostResult res = jgdi.execQHost(qhostOptions);
           
            printResult(res);
        } finally {
View Full Code Here

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

   
    public void testQueueFilter() throws Exception {
       
        JGDI jgdi = createJGDI();
        try {
            QHostOptions qhostOptions = new QHostOptions();
            List<ExecHost> ehList = jgdi.getRealExecHostList();
            List<ClusterQueue> cqList = jgdi.getClusterQueueList();
            qhostOptions.setIncludeQueue(true);
            for (ExecHost eh : ehList) {
                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) {
View Full Code Here

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

   
    public void testHostValueFilter() throws Exception {
       
        JGDI jgdi = createJGDI();
        try {
            QHostOptions qhostOptions = new QHostOptions();
            List<ExecHost> ehList = jgdi.getRealExecHostList();
            for (ExecHost eh : ehList) {
                for (String loadValueName : eh.getLoadKeys()) {
                    String loadValue = eh.getLoad(loadValueName);
                    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));
View Full Code Here

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

   
    public void testHostFilter() throws Exception {
       
        JGDI jgdi = createJGDI();
        try {
            QHostOptions qhostOptions = new QHostOptions();
            List<ExecHost> ehList = jgdi.getRealExecHostList();
            for (ExecHost eh : ehList) {
                HostFilter hostFilter = new HostFilter();
                hostFilter.addHost(eh.getName());
                qhostOptions.setHostFilter(hostFilter);
                QHostResult res = jgdi.execQHost(qhostOptions);
                printResult(res);
                Set<String> hostNames = res.getHostNames();
                assertTrue("host " + eh.getName() + " not found", hostNames.contains(eh.getName()));
                assertTrue("host global not found", hostNames.contains("global"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.