Package me.prettyprint.hector.api

Examples of me.prettyprint.hector.api.Keyspace


   
    public static void main(String[] args) throws Exception {
       
        Cluster cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");

        Keyspace keyspace = HFactory.createKeyspace("Keyspace1", cluster);
               
        try {
            Mutator<String> mutator = HFactory.createMutator(keyspace, stringSerializer);
           
            for (int i = 0; i < 24; i++) {           
View Full Code Here


    private static StringSerializer stringSerializer = StringSerializer.get();
   
    public static void main(String[] args) throws Exception {
        Cluster cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");

        Keyspace keyspaceOperator = HFactory.createKeyspace("Keyspace1", cluster);
        try {
            Mutator<String> mutator = HFactory.createMutator(keyspaceOperator, StringSerializer.get());
            mutator.insert("jsmith", "Standard1", HFactory.createStringColumn("first", "John"));
           
            ColumnQuery<String, String, String> columnQuery = HFactory.createStringColumnQuery(keyspaceOperator);
View Full Code Here

   
    public static void main(String[] args) throws Exception {
       
        Cluster cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");

        Keyspace keyspaceOperator = HFactory.createKeyspace("Keyspace1", cluster);
               
        try {
            Mutator<String> mutator = HFactory.createMutator(keyspaceOperator, stringSerializer);

            for (int i = 0; i < 20; i++) {           
View Full Code Here

   
    public static void main(String[] args) throws Exception {
       
        Cluster cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");

        Keyspace keyspaceOperator = HFactory.createKeyspace("Keyspace1", cluster);
       
        try {
            Mutator<String> mutator = HFactory.createMutator(keyspaceOperator, stringSerializer);
            mutator.insert("billing", "Super1", HFactory.createSuperColumn("jsmith",
                    Arrays.asList(HFactory.createStringColumn("first", "John")),
View Full Code Here

   
    public static void main(String[] args) throws Exception {
       
        Cluster cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");

        Keyspace keyspaceOperator = HFactory.createKeyspace("Keyspace1", cluster);
               
        try {
            Mutator<String> mutator = HFactory.createMutator(keyspaceOperator, stringSerializer);

            for (int i = 0; i < 5; i++) {           
View Full Code Here

    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(keyspaces.size(), is(3));
    assertThat(cluster.describeKeyspace("mykeyspacename"), notNullValue());
    assertThat(cluster.describeKeyspace("mykeyspacename").getName(), is("mykeyspacename"));

    Keyspace keyspace = HFactory.createKeyspace("mykeyspacename", cluster);
    RangeSlicesQuery<byte[], byte[], byte[]> query = HFactory.createRangeSlicesQuery(
        keyspace,
        BytesArraySerializer.get(),
        BytesArraySerializer.get(),
        BytesArraySerializer.get());
View Full Code Here

    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(keyspaces.size(), is(3));
    assertThat(cluster.describeKeyspace("mykeyspacename"), notNullValue());
    assertThat(cluster.describeKeyspace("mykeyspacename").getName(), is("mykeyspacename"));

    Keyspace keyspace = HFactory.createKeyspace("mykeyspacename", cluster);
    RangeSlicesQuery<byte[], byte[], byte[]> query = HFactory.createRangeSlicesQuery(
        keyspace,
        BytesArraySerializer.get(),
        BytesArraySerializer.get(),
        BytesArraySerializer.get());
View Full Code Here

    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(keyspaces.size(), is(3));
    assertThat(cluster.describeKeyspace("mykeyspacename"), notNullValue());
    assertThat(cluster.describeKeyspace("mykeyspacename").getName(), is("mykeyspacename"));

    Keyspace keyspace = HFactory.createKeyspace("mykeyspacename", cluster);
    RangeSlicesQuery<byte[], byte[], byte[]> query = HFactory.createRangeSlicesQuery(
        keyspace,
        BytesArraySerializer.get(),
        BytesArraySerializer.get(),
        BytesArraySerializer.get());
View Full Code Here

            cluster.addColumnFamily(columnFamilyDefinition);
          }
        }

        log.info("creating keyspace : {}", keyspaceDefinition.getName());
        Keyspace keyspace = HFactory.createKeyspace(dataSet.getKeyspace().getName(), cluster);

        if (!loadingOption.isOnlySchema()) {
            log.info("loading data into keyspace : {}", keyspaceDefinition.getName());
            loadData(dataSet, keyspace);
        }
View Full Code Here

        String port = "9171";
        String[] args = {"-f", targetFileDataSet, "-h", host, "-p", port};
        CassandraUnitCommandLineLoader.main(args);

        Cluster cluster = HFactory.getOrCreateCluster(clusterName, host + ":" + port);
        Keyspace keyspace = HFactory.createKeyspace("beautifulKeyspaceName", cluster);
        assertDataSetLoaded(keyspace);
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }
View Full Code Here

TOP

Related Classes of me.prettyprint.hector.api.Keyspace

Copyright © 2018 www.massapicom. 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.