Examples of describeRing()


Examples of me.prettyprint.cassandra.service.ThriftCluster.describeRing()

        }

        List<TokenRangeInformation> tokenRangeInformations = new ArrayList<TokenRangeInformation>();

        if (!KEYSPACE_SYSTEM.equals(keyspace)) {
            List<TokenRange> tokenRanges = thriftCluster.describeRing(keyspace);
            for (TokenRange tokenRange : tokenRanges) {
                if (tokenRange != null) {
                    TokenRangeInformation tokenRangeInformation = new TokenRangeInformation();
                    tokenRangeInformation.setStartToken(tokenRange.getStart_token());
                    tokenRangeInformation.setEndToken(tokenRange.getEnd_token());
View Full Code Here

Examples of me.prettyprint.cassandra.service.ThriftCluster.describeRing()

      //this could be suspect, but we need this
      ThriftCluster cluster = (ThriftCluster) HFactory.getCluster(clusterName);

      for(KeyspaceDefinition keyspaceDefinition: cluster.describeKeyspaces()) {       
        if (!keyspaceDefinition.getName().equals(Keyspace.KEYSPACE_SYSTEM)) {
          List<TokenRange> tokenRanges = cluster.describeRing(keyspaceDefinition.getName());
          for (TokenRange tokenRange : tokenRanges) {
            for (String host : tokenRange.getEndpoints()) {
              CassandraHost foundHost = new CassandraHost(host,cassandraHostConfigurator.getPort());
              if ( !existingHosts.contains(foundHost) ) {
                log.info("Found a node we don't know about {} for TokenRange {}", foundHost, tokenRange);
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.