Examples of KeyspaceService


Examples of me.prettyprint.cassandra.service.KeyspaceService

  public long createClock() {
    return connectionManager.createClock();
  }

  public <T> ExecutionResult<T> doExecute(KeyspaceOperationCallback<T> koc) throws HectorException {
    KeyspaceService ks = null;
    try {
      ks = new KeyspaceServiceImpl(keyspace, consistencyLevelPolicy, connectionManager, failoverPolicy, credentials);
      return koc.doInKeyspaceAndMeasure(ks);
    } finally {
      if (ks != null) {
View Full Code Here

Examples of me.prettyprint.cassandra.service.KeyspaceService

                         ConsistencyLevelPolicy consistency,
                         boolean readOnly) {
        if (consistency == null) {
            consistency = defaultAllConsistency;
        }
        KeyspaceService ks = new KeyspaceServiceImpl(keyspaceName,
                                                     consistency,
                                                     cluster.getConnectionManager(),
                                                     failoverPolicy);

        if (readOnly) {
View Full Code Here

Examples of me.prettyprint.cassandra.service.KeyspaceService

                         ConsistencyLevelPolicy consistency,
                         boolean readOnly) {
        if (consistency == null) {
            consistency = defaultAllConsistency;
        }
        KeyspaceService ks = new KeyspaceServiceImpl(keyspaceName,
                                                     consistency,
                                                     cluster.getConnectionManager(),
                                                     failoverPolicy);

        if (readOnly) {
View Full Code Here

Examples of me.prettyprint.cassandra.service.KeyspaceService

  }

  @Override
  public <T> ExecutionResult<T> doExecute(KeyspaceOperationCallback<T> koc)
      throws HectorException {
    KeyspaceService ks = null;
    try {
      ks = new VirtualKeyspaceServiceImpl(keyspace, keyPrefix,
          keyPrefixSerializer, consistencyLevelPolicy, connectionManager,
          failoverPolicy, credentials);
      return koc.doInKeyspaceAndMeasure(ks);
View Full Code Here

Examples of me.prettyprint.cassandra.service.KeyspaceService

    return connectionManager.createClock();
  }

  public <T> ExecutionResult<T> doExecute(KeyspaceOperationCallback<T> koc)
      throws HectorException {
    KeyspaceService ks = null;
    try {
      ks = new KeyspaceServiceImpl(keyspace, consistencyLevelPolicy,
          connectionManager, failoverPolicy, credentials);
      return koc.doInKeyspaceAndMeasure(ks);
    } finally {
View Full Code Here

Examples of org.rhq.plugins.cassandra.util.KeyspaceService

            return restartNode();
        } else if (name.equals("updateSeedsList")) {
            return updateSeedsList(parameters);
        } else if (name.equals("takeSnapshot")) {
            if (isStorageServiceReachable()) {
                return new TakeSnapshotOperation(new KeyspaceService(getEmsConnection()), parameters).invoke();
            } else {
                OperationResult result = new OperationResult();
                result.setErrorMessage("Unable to take snaphost, Storage Node is not available");
                return result;
            }
View Full Code Here

Examples of org.rhq.plugins.cassandra.util.KeyspaceService

        return failedOperation;
    }

    public OperationResult repairKeyspace(String... columnFamilies) {
        KeyspaceService keyspaceService = new KeyspaceService(getEmsConnection());

        String keyspace = context.getResourceKey();
        if (columnFamilies == null) {
            columnFamilies = new String[] {};
        }

        log.info("Executing repair on keyspace [" + keyspace + "]");
        long start = System.currentTimeMillis();
        keyspaceService.repair(keyspace, columnFamilies);
        long end = System.currentTimeMillis();
        log.info("Finished repair on keyspace [" + keyspace + "] in " + (end - start) + " ms");

        return new OperationResult();
    }
View Full Code Here

Examples of org.rhq.plugins.cassandra.util.KeyspaceService

        return new OperationResult();
    }

    public OperationResult repairPrimaryRange() {
        KeyspaceService keyspaceService = new KeyspaceService(getEmsConnection());
        String keyspace = context.getResourceKey();

        log.info("Executing primary range repair on keyspace [" + keyspace + "]");
        long start = System.currentTimeMillis();
        keyspaceService.repairPrimaryRange(keyspace);
        long end = System.currentTimeMillis();
        log.info("Finished primary range repair on keyspace [" + keyspace + " in (" + (end - start) + " ms");

        return new OperationResult();
    }
View Full Code Here

Examples of org.rhq.plugins.cassandra.util.KeyspaceService

        return new OperationResult();
    }

    public OperationResult cleanup() {
        KeyspaceService keyspaceService = new KeyspaceService(getEmsConnection());
        String keyspace = context.getResourceKey();

        log.info("Executing cleanup on keyspace [" + keyspace + "]");
        long start = System.currentTimeMillis();
        keyspaceService.cleanup(keyspace);
        long end = System.currentTimeMillis();

        log.info("Finished cleanup on keyspace [" + keyspace + "] in " + (end - start) + " ms");

        return new OperationResult();
View Full Code Here

Examples of org.rhq.plugins.cassandra.util.KeyspaceService

        return new OperationResult();
    }

    public OperationResult compactKeyspace(String... columnFamilies) {
        KeyspaceService keyspaceService = new KeyspaceService(getEmsConnection());

        String keyspace = context.getResourceKey();
        if (columnFamilies == null) {
            columnFamilies = new String[] {};
        }

        log.info("Executing compaction on  keyspace [" + keyspace + "]");
        long start = System.currentTimeMillis();
        keyspaceService.compact(keyspace, columnFamilies);
        long end = System.currentTimeMillis();
        log.info("Finished compaction on keysapce [" + keyspace + "] in " + (end - start) + " ms");

        return new OperationResult();
    }
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.