incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Internal error processing get_range_slices
Date Wed, 20 Apr 2011 22:01:50 GMT
"internal error" means an error on the server. check the server log for the
stacktrace.

On Wed, Apr 20, 2011 at 11:54 AM, Renato Bacelar da Silveira <
renatods@indabamobile.co.za> wrote:

>  Hi all
>
> I am just augmenting the information on the following error:
>
> -------------- error ------------------
>
> org.apache.thrift.TApplicationException: Internal error processing
> get_range_slices
>     at
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
>     at
> org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandra.java:724)
>     at
> org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.java:704)
>     at
> com.indaba.cassandra.thrift.ThriftManager.multigetSliceAcrossAllUsers(ThriftManager.java:180)
>     at
> com.indaba.cassandra.thrift.ThriftManager.testMultigetSlice(ThriftManager.java:210)
>     at
> com.indaba.cassandra.thrift.ThriftManager.main(ThriftManager.java:260)
> -------------- error ------------------
>
> Was able to access the method that sends the cassandra query call,
> and I do not see anything different then to what I have specified,
> as in any values changed, missing or such...
>
> Basically I have a range slice query with and "empty" star_key and
> end_key "keyrange", with a Integer.MAX_VALUE [return count value].
>
> I have also a SlicePredicate with 3 column names I would like to
> find within my column family. I also specify a column parent, but
> NO super column name, as to roll through the entire range of super columns.
> From the documentation I gathered one could leave that out from the Column
> Parent object path so to cause this multiget to work (should be getting a
> book),
> so I think I have it covered.
>
> Below is the code I am using, and just after, the variable values at
> the time when
>     Cassandra.send_get_range_slices(ColumnParent column_parent,
>                     SlicePredicate predicate,
>                     KeyRange range,
>                     ConsistencyLevel consistency_level)
>
> is called:
>
> ------------------ code ------------------
>
>
> public Map<String, List<ColumnOrSuperColumn>>
> multigetSliceAcrossAllUsers(String[] colNames){
>         ColumnParent cp;
>         Map<String, List<ColumnOrSuperColumn>> slicemap = new
> TreeMap<String, List<ColumnOrSuperColumn>>();
>         List<KeySlice> lstKeyslice;
>         List<ByteBuffer> lstColNames = new ArrayList<ByteBuffer>();
>         for(String s : colNames) {
>             lstColNames.add(ByteBufferUtil.bytes(s));
>         }
>         try {
>             List<CfDef> lstColFamDef =
> client.describe_keyspace(getCurrentKeyspaceName()).getCf_defs();
>             for(CfDef def : lstColFamDef) {
>                 cp = new ColumnParent();
>                 cp.setColumn_family(def.getName());
>                 SlicePredicate slicePrd = new SlicePredicate();
>                 slicePrd.setColumn_names(lstColNames);
>                 KeyRange kr = new KeyRange();
>                 kr.setCount(Integer.MAX_VALUE);
>                 kr.setStart_key(new byte[0]);
>                 kr.setEnd_key(new byte[0]);
>                 kr.setStart_keyIsSet(true);
>                 kr.setEnd_keyIsSet(true);
>                 try {
>                     lstKeyslice = client.get_range_slices(cp, slicePrd, kr,
> ConsistencyLevel.ANY);
>                     for(KeySlice kslc : lstKeyslice) {
>                         slicemap.put(new String(kslc.getKey()),
> kslc.getColumns());
>                     }
>                 } catch (UnavailableException e) {
>                     e.printStackTrace();
>                 } catch (TimedOutException e) {
>                     e.printStackTrace();
>                 }
>             }
>         } catch (NotFoundException e) {
>             e.printStackTrace();
>         } catch (InvalidRequestException e) {
>             e.printStackTrace();
>         } catch (TException e) {
>             e.printStackTrace();
>         }
>         return slicemap;
>     }
>
>
> ------------------ code ------------------
>
>
> ------------------ arguments ------------------
>
> args    Cassandra$get_range_slices_args  (id=77)
>     column_parent    ColumnParent  (id=46)
>         column_family    "UserKey_38" (id=97)
>         super_column    null
>     consistency_level    ConsistencyLevel  (id=58)
>         name    "ANY" (id=86)
>         ordinal    5
>         value    6
>     predicate    SlicePredicate  (id=54)
>         column_names    ArrayList<E>  (id=31)
>             [0]    HeapByteBuffer  (id=137)
>             [1]    HeapByteBuffer  (id=138)
>             [2]    HeapByteBuffer  (id=139)
>         slice_range    null
>     range    KeyRange  (id=56)
>         __isset_bit_vector    BitSet  (id=88)
>         count    2147483647
>         end_key    HeapByteBuffer  (id=90)
>             address    0
>             bigEndian    true
>             capacity    0
>             hb     (id=118)
>             isReadOnly    false
>             limit    0
>             mark    -1
>             nativeByteOrder    false
>             offset    0
>             position    0
>         end_token    null
>         start_key    HeapByteBuffer  (id=94)
>             address    0
>             bigEndian    true
>             capacity    0
>             hb     (id=102)
>             isReadOnly    false
>             limit    0
>             mark    -1
>             nativeByteOrder    false
>             offset    0
>             position    0
>         start_token    null
>
> ------------------ arguments ------------------
>
> --
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Mime
View raw message