Package com.sun.grid.jgdi.monitoring.filter

Examples of com.sun.grid.jgdi.monitoring.filter.ResourceAttributeFilter


        }
    }

    //TODO LP: Add correct exitCodes
    private QHostOptions parse(List<String> argList) throws Exception {
        ResourceAttributeFilter resourceAttributeFilter = null;
        ResourceFilter resourceFilter = null;
        boolean showQueues = false;
        boolean showJobs = false;
        boolean showAsXML = false;
        UserFilter userFilter = null;
        HostFilter hostFilter = null;

        while (!argList.isEmpty()) {
            String arg = argList.remove(0);

            if (arg.equals("-help")) {
                out.println(getUsage());
                return null;
            } else if (arg.equals("-h")) {
                if (argList.isEmpty()) {
                    err.println("error: ERROR! -h option must have argument");
                    return null;
                }
                arg = argList.remove(0);
                //TODO LP: Qmaster should check if the value exists and is correct not the client
                //E.g.: qhost -h dfds -> qmaster should try to resolve the host a return error message
                hostFilter = HostFilter.parse(arg);
            } else if (arg.equals("-F")) {
                if (!argList.isEmpty()) {
                    arg = argList.get(0);
                    // we allow only a comma separated arg string
                    // qhost CLI allows also whitespace separated arguments
                    if (!arg.startsWith("-")) {
                        arg = argList.remove(0);
                        resourceAttributeFilter = ResourceAttributeFilter.parse(arg);
                    } else {
                        resourceAttributeFilter = new ResourceAttributeFilter();
                    }
                } else {
                    resourceAttributeFilter = new ResourceAttributeFilter();
                }
            } else if (arg.equals("-j")) {
                showJobs = true;
            } else if (arg.equals("-l")) {
                if (argList.isEmpty()) {
View Full Code Here


    public void testAllResourceAttributes() throws Exception {
       
        JGDI jgdi = createJGDI();
        try {
            QueueInstanceSummaryOptions options = new QueueInstanceSummaryOptions();
            ResourceAttributeFilter raf = new ResourceAttributeFilter();
            options.setResourceAttributeFilter(raf);
            QueueInstanceSummaryResult result = jgdi.getQueueInstanceSummary(options);
            if (logger.isLoggable(Level.FINE)) {
                PrintWriter pw = new PrintWriter(System.out);
                QueueInstanceSummaryPrinter.print(pw, result, options);
View Full Code Here

       
        JGDI jgdi = createJGDI();
        try {
            QHostOptions qhostOptions = new QHostOptions();
           
            ResourceAttributeFilter resourceAttributeFilter = new ResourceAttributeFilter();
           
            qhostOptions.setResourceAttributeFilter(resourceAttributeFilter);
           
            QHostResult res = jgdi.execQHost(qhostOptions);
           
View Full Code Here

            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);
View Full Code Here

            }
        }
    }
   
    private QQuotaOptions parse(String[] args) throws Exception {
        ResourceAttributeFilter resourceAttributeFilter = null;
        ResourceFilter resourceFilter = null;
        UserFilter userFilter = null;
        HostFilter hostFilter = null;
        ProjectFilter projectFilter = null;
        ParallelEnvironmentFilter peFilter = null;
View Full Code Here

TOP

Related Classes of com.sun.grid.jgdi.monitoring.filter.ResourceAttributeFilter

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.