Examples of CmdAgent


Examples of com.sun.faban.harness.agent.CmdAgent

        // and look it up in the machinesList. Fetch the command agent and add
        // the real name to the machinesList -> cmdp mapping.
        for (String hostName : realHosts) {
            if (!machinesList.contains(hostName)) {
                String[] aliases = hostRoles.getAliasesByHost(hostName);
                CmdAgent a = findCmdAgent(aliases[0]); // Just one is enough
                machinesList.add(hostName);
                cmdp.add(a);
            }
        }
    }
View Full Code Here

Examples of com.sun.faban.harness.agent.CmdAgent

        try {
            String s = Config.CMD_AGENT + "@" + mach;
            logger.fine("CmdService: Connecting to " + s);
            int retry = 1;
            CmdAgent c = (CmdAgent) registry.getService(s);
            for (; c == null && retry <= 10; retry++) {
                Thread.sleep(10000);
                logger.warning("Retry connecting to " + s + ", count " +
                        retry + '.');
                c = (CmdAgent) registry.getService(s);
            }
            if (c == null) {
                logger.severe("Could not connect to " + s);
                return (false);
            }

            cmdp.add(c);

            /* Note the agent registration process:
             * 1. Create and register the command agent.
             * 2. Download benchmark code
             * 3. Create the lib classpath
             * 4. Create and register file agent
             * So it may take quite some time between the registration of
             * the command agent and the file agent. But we can be pretty
             * sure it'll happen. So just wait. Timeout after 100 retries.            
             */
            s = Config.FILE_AGENT + "@" + mach;
            logger.fine("FileService: Connecting to " + s);
            retry = 1;
            FileAgent f = (FileAgent) registry.getService(s);
            for (; f == null && retry <= 100; retry++) {
                Thread.sleep(1000);
                logger.fine("Retry obtaining file service from " + s +
                        ", count " + retry + '.');
                f = (FileAgent) registry.getService(s);
            }
            if (f == null) {
                logger.severe("Timed out obtaining file service from " + s);
                return (false);
            }
            filep.add(f);

            // Added by Ramesh to get the real hostnames of the servers
            logger.info("CmdService: Configured " + s + " on server " +
                    c.getHostName());
            return true;

        } catch (Exception e) {
            logger.log(Level.SEVERE, "Error accessing command agent on system " + mach, e);
            return (false);
View Full Code Here

Examples of com.sun.faban.harness.agent.CmdAgent

        HashSet<String> hostSet = new HashSet<String>();
        ArrayList<NameValuePair<Future<Boolean>>> tasks =
                new ArrayList<NameValuePair<Future<Boolean>>>();
        hostSet.add(master); // Don't try to set clock for master.
        for (Object o : cmdp) {
            CmdAgent agent = (CmdAgent) o;
            String hostName = null;
            try {
                hostName = agent.getHostName();
                if (hostSet.add(hostName)) {
                    NameValuePair<Future<Boolean>> future =
                            new NameValuePair<Future<Boolean>>();
                    future.name = hostName;
                    future.value = Config.THREADPOOL.submit(
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.