Package com.taobao.metamorphosis.tools.utils

Examples of com.taobao.metamorphosis.tools.utils.JMXClient.invoke()


        JMXClient jmxClient = JMXClient.getJMXClient(host, port);
        this.println("connected to " + jmxClient.getAddressAsString());
        ObjectInstance metaConfigInstance = jmxClient.queryMBeanForOne(METACONFIG_NAME);

        if (metaConfigInstance != null) {
            jmxClient.invoke(metaConfigInstance.getObjectName(), "closePartitions", new Object[] { topic, start, end },
                new String[] { "java.lang.String", "int", "int" });
            jmxClient.close();
            this.println("invoke " + metaConfigInstance.getClassName() + "#closePartitions success");
        }
        else {
View Full Code Here


        this.println("connected to " + jmxClient.getAddressAsString());

        ObjectInstance metaConfigInstance = jmxClient.queryMBeanForOne(HANDLE_NANE);
        if (metaConfigInstance != null) {
            jmxClient.invoke(metaConfigInstance.getObjectName(), "restart", new Object[0], new String[0]);
            jmxClient.close();
            this.println("invoke " + metaConfigInstance.getClassName() + "#restart success");
        }
        else {
            this.println("û���ҵ� " + HANDLE_NANE);
View Full Code Here

        if (ttInstance == null) {
            this.println("û���ҵ� " + TT_NAME);
            return;
        }
        if (commandLine.hasOption("start")) {
            jmxClient.invoke(ttInstance.getObjectName(), "startSub", new Object[0], new String[0]);
            this.println("invoke " + ttInstance.getClassName() + "#startSub success");
        }
        else if (commandLine.hasOption("stop")) {
            jmxClient.invoke(ttInstance.getObjectName(), "stopSub", new Object[0], new String[0]);
            this.println("invoke " + ttInstance.getClassName() + "#stopSub success");
View Full Code Here

        if (commandLine.hasOption("start")) {
            jmxClient.invoke(ttInstance.getObjectName(), "startSub", new Object[0], new String[0]);
            this.println("invoke " + ttInstance.getClassName() + "#startSub success");
        }
        else if (commandLine.hasOption("stop")) {
            jmxClient.invoke(ttInstance.getObjectName(), "stopSub", new Object[0], new String[0]);
            this.println("invoke " + ttInstance.getClassName() + "#stopSub success");
        }
        else if (commandLine.hasOption("look")) {
            String ret = (String) jmxClient.getAttribute(ttInstance.getObjectName(), "SubStatus");
            this.println(ret);
View Full Code Here

        this.println("connected to " + jmxClient.getAddressAsString());

        ObjectInstance metaConfigInstance = jmxClient.queryMBeanForOne(METACONFIG_NAME);
        if (metaConfigInstance != null) {
            jmxClient.invoke(metaConfigInstance.getObjectName(), "reload", new Object[0], new String[0]);
            jmxClient.close();
            this.println("invoke " + metaConfigInstance.getClassName() + "#reload success");
        }
        else {
            this.println("û���ҵ� " + METACONFIG_NAME);
View Full Code Here

        JMXClient jmxClient = JMXClient.getJMXClient(host, port);
        this.println("connected to " + jmxClient.getAddressAsString());
        ObjectInstance metaConfigInstance = jmxClient.queryMBeanForOne(METACONFIG_NAME);

        if (metaConfigInstance != null) {
            jmxClient.invoke(metaConfigInstance.getObjectName(), "openPartitions", new Object[] { topic },
                new String[] { "java.lang.String" });
            jmxClient.close();
            this.println("invoke " + metaConfigInstance.getClassName() + "#openPartitions success");
        }
        else {
View Full Code Here

        JMXClient jmxClient = JMXClient.getJMXClient(host, port);
        this.println("connected to " + jmxClient.getAddressAsString());
        ObjectInstance brokerInstance = jmxClient.queryMBeanForOne(METABROKER_NAME);

        if (brokerInstance != null) {
            jmxClient.invoke(brokerInstance.getObjectName(), "stop", new Object[0], new String[0]);
            jmxClient.close();
            this.println("invoke " + brokerInstance.getClassName() + "#stop success");
        }
        else {
            this.println("û���ҵ� " + METABROKER_NAME);
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.