Examples of CassandraClient


Examples of org.apache.cassandra.stress.util.CassandraClient

        // random node selection for fake load balancing
        String currentNode = nodes[Stress.randomizer.nextInt(nodes.length)];

        TSocket socket = new TSocket(currentNode, port);
        TTransport transport = transportFactory.getTransport(socket);
        CassandraClient client = new CassandraClient(new TBinaryProtocol(transport));

        try
        {
            if(!transport.isOpen())
                transport.open();

            if (enable_cql)
                client.set_cql_version(cqlVersion);

            if (setKeyspace)
            {
                client.set_keyspace("Keyspace1");
            }
        }
        catch (InvalidRequestException e)
        {
            throw new RuntimeException(e.getWhy());
View Full Code Here

Examples of org.apache.cassandra.stress.util.CassandraClient

                    }
                }
            }
            else
            {
                CassandraClient connection = client.getClient();

                for (int i = 0; i < items; i++)
                {
                    if (stop)
                        break;
View Full Code Here

Examples of org.apache.gora.cassandra.client.CassandraClient

      endTokenOrKey = cassandraQuery.getEndKey().toString();
    }

    Select select = store.createSelect(fields);

    CassandraClient client = store.getClientByLocation(getLocation(query));
    if (isUsingTokens) {
      rowIter =
        client.getTokenRange(startTokenOrKey, endTokenOrKey,
            batchRowCount, select).iterator();
    } else {
      rowIter = client.getRange(startTokenOrKey, endTokenOrKey,
          batchRowCount, select).iterator();
    }
  }
View Full Code Here

Examples of org.yosemite.jcsadra.CassandraClient

  private static void runCassandraClient() throws NoSuchElementException,
      IllegalStateException, Exception {

    CassandraClientPool pool = getClientPool();

    CassandraClient cl = pool.getClient();
    KeySpace ks = cl.getKeySpace(KEYSPACE);

    // Insert values
    insertValue(ks, "Linguagem", "java", "1");
    insertValue(ks, "Linguagem", "ruby", "2");
    insertValue(ks, "Linguagem", "python", "3");
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.