Package me.prettyprint.hector.api.beans

Examples of me.prettyprint.hector.api.beans.Row


    CqlQuery<byte[], String, byte[]> query = new CqlQuery<byte[], String, byte[]>(cassandraUnit.keyspace,
        BytesArraySerializer.get(), StringSerializer.get(), BytesArraySerializer.get());
    query.setQuery("SELECT * FROM MyColumnFamily");
    QueryResult<CqlRows<byte[], String, byte[]>> result = query.execute();
    List<Row<byte[], String, byte[]>> rows = result.get().getList();
    Row row = rows.get(0);
    assertThat(row, notNullValue());
    assertThat((byte[]) row.getKey(), is(decodeHex("369ff963196dc2e5fe174dad2c0c6e9149b1acd9")));
  }
View Full Code Here


    super(thriftRet, nameSerializer, valueSerializer);
    this.resultType = CqlResultType.ROWS;
    // test for a count object. eeewww.
   
    if ( getCount() == 1 ) {
      Row row = iterator().next();
      if ( row.getColumnSlice().getColumnByName("count") != null ) {  
        count = LongSerializer.get().fromByteBuffer(row.getColumnSlice().getColumnByName("count").getValueBytes()).intValue();
      }
    }
  }
View Full Code Here

TOP

Related Classes of me.prettyprint.hector.api.beans.Row

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.