Examples of EmsBean


Examples of org.mc4j.ems.connection.bean.EmsBean

    String jmxName = defaultConfig.getSimple(CACHE_JMX_NAME).getStringValue();

        beanName += ((jmxName==null || jmxName.equals("")) ? "" : "," + jmxName);

        // This is a singleton ResourceType, so we are only looking for a single MBean.
        EmsBean emsBean = connection.getBean(beanName);
        if (emsBean == null) {
            connection.refresh();
            emsBean = connection.getBean(beanName);
        }
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

        }

        log.info("Taking snapshot of keyspace [" + keyspace + "]");
        log.info("Snapshot name set to [" + snapshotName + "]");
        long start = System.currentTimeMillis();
        EmsBean emsBean = loadBean(KeyspaceService.STORAGE_SERVICE_BEAN);
        if (columnFamilies == null || columnFamilies.length == 0) {
            EmsOperation operation = emsBean.getOperation("takeSnapshot", String.class, String[].class);
            operation.invoke(snapshotName, new String[]{keyspace});
        } else {
            EmsOperation operation = emsBean.getOperation("takeColumnFamilySnapshot", String.class, String.class,
                String.class);

            for (String columnFamily : columnFamilies) {
                if (log.isDebugEnabled()) {
                    log.debug("Taking snapshot of column family [" + columnFamily + "]");
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

        return new OperationResult();
    }

    public PropertyList getKeySpaceDataFileLocations() {
        EmsBean emsBean = loadBean(KeyspaceService.STORAGE_SERVICE_BEAN);
        EmsAttribute attribute = emsBean.getAttribute("AllDataFileLocations");

        PropertyList list = new PropertyList("keyspaceFileLocations");
        String[] dirs = (String[]) attribute.getValue();
        for (String dir : dirs) {
            if (!dir.endsWith("/")) {
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

        return list;
    }

    public PropertySimple getCommitLogProperty() {
        EmsBean emsBean = loadBean(KeyspaceService.STORAGE_SERVICE_BEAN);
        EmsAttribute attribute = emsBean.getAttribute("CommitLogLocation");
        return new PropertySimple("CommitLogLocation", attribute.refresh());
    }
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

     */
    protected EmsBean loadBean(String objectName) {
        EmsConnection emsConnection = getEmsConnection();

        if (emsConnection != null) {
            EmsBean bean = emsConnection.getBean(objectName);
            if (bean == null) {
                // In some cases, this resource component may have been discovered by some means other than querying its
                // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
                // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
                // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

    public KeyspaceService(EmsConnection emsConnection) {
        this.emsConnection = emsConnection;
    }

    public void repair(String keyspace, String... columnFamilies) {
        EmsBean emsBean = loadBean(STORAGE_SERVICE_BEAN);
        EmsOperation operation = emsBean.getOperation(REPAIR_OPERATION, String.class, boolean.class,
            boolean.class, String[].class);

        //  The isSequential param has to be false; otherwise, repair will fail as a result
        // of https://issues.apache.org/jira/browse/CASSANDRA-5512.
        boolean isSequential = false// perform sequential repair using snapshot
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

        operation.invoke(keyspace, isSequential, isLocal, columnFamilies);
    }

    public void repairPrimaryRange(String keyspace, String... columnFamilies) {
        EmsBean emsBean = loadBean(KeyspaceService.STORAGE_SERVICE_BEAN);
        EmsOperation operation = emsBean.getOperation(REPAIR_PRIMARY_RANGE, String.class, boolean.class, boolean.class,
            String[].class);

        //  The isSequential param has to be false; otherwise, repair will fail as a result
        // of https://issues.apache.org/jira/browse/CASSANDRA-5512.
        boolean isSequential = false// perform sequential repair using snapshot
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

        operation.invoke(keyspace, isSequential, isLocal, columnFamilies);
    }

    public void cleanup(String keyspace) {
        EmsBean emsBean = loadBean(STORAGE_SERVICE_BEAN);
        EmsOperation operation = emsBean.getOperation(CLEANUP_OPERATION, String.class, String[].class);

        operation.invoke(keyspace, new String[] {});
    }
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

        operation.invoke(keyspace, new String[] {});
    }

    public void compact(String keyspace, String... columnFamilies) {
        EmsBean emsBean = loadBean(STORAGE_SERVICE_BEAN);
        EmsOperation operation = emsBean.getOperation(COMPACT_OPERATION, String.class, String[].class);

        operation.invoke(keyspace, columnFamilies);
    }
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean

    public void takeSnapshot(String keyspace, String snapshotName) {
        takeSnapshot(new String[]{keyspace}, snapshotName);
    }

    public void takeSnapshot(String[] keySpaces, String snapshotName) {
        EmsBean emsBean = loadBean(STORAGE_SERVICE_BEAN);
        EmsOperation operation = emsBean.getOperation(SNAPSHOT_OPERATION, String.class, String[].class);
        operation.invoke(snapshotName, keySpaces);
    }
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.