Note that there are some explanatory texts on larger screens.

plurals
  1. POCassandra createSliceQuery clarification
    primarykey
    data
    text
    <p>I'm trying to retrieve all columns of a row in Cassandra using Thrift 1.0 lib. I found some examples by Googling , in particular:</p> <pre><code>SliceQuery&lt;String, String, String&gt; sliceQuery = hectorTemplate.createSliceQuery( StringSerializer.get(), StringSerializer.get(), StringSerializer.get()); sliceQuery.setColumnFamily("myname"); sliceQuery.setKey("myid"); sliceQuery.setRange(null, null, false, 20); QueryResult&lt;ColumnSlice&lt;String,String&gt;&gt; queryResult = sliceQuery.execute(); ColumnSlice&lt;String,String&gt; slice = queryResult.get(); List&lt;HColumn&lt;String, String&gt;&gt; retrievedColumns = slice.getColumns(); for (HColumn&lt;String, String&gt; column : retrievedColumns) { System.out.println(column.getName() +"::"+ column.getValue()); } </code></pre> <p>However, I could not find any information on what those parameters and types in Hector objects are?? </p> <p>For example, here: </p> <pre><code>SliceQuery&lt;String, String, String&gt; </code></pre> <ul> <li>all types here are String - what are they types of? Column name type? column value types? </li> </ul> <p>Then, we specify parameters to the createSliceQuery(): </p> <pre><code>hectorTemplate.createSliceQuery( StringSerializer.get(), StringSerializer.get(), StringSerializer.get()); </code></pre> <p>Again - what are those serializers for? why are there only 3 serializers - is if for the first and last column, and something else? What if I get many columns, how do I specify serializers for them?</p> <p>Then, we retrieve </p> <pre><code>List&lt;HColumn&lt;String, String&gt;&gt; </code></pre> <p>-- again, what are these String types for? If I have a column of type BytesType - where do I specify that?</p> <p>If there are some decent API docs (not just method signatures with no explanation of what their parameters are) - could you point me to them?</p> <p>thanks! Marina</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload