Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54FB76B6 for ; Wed, 20 Apr 2011 22:02:41 +0000 (UTC) Received: (qmail 51562 invoked by uid 500); 20 Apr 2011 22:02:37 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 51547 invoked by uid 500); 20 Apr 2011 22:02:37 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 51539 invoked by uid 99); 20 Apr 2011 22:02:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 22:02:37 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.212.44 as permitted sender) Received: from [209.85.212.44] (HELO mail-vw0-f44.google.com) (209.85.212.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 22:02:31 +0000 Received: by vws12 with SMTP id 12so1132268vws.31 for ; Wed, 20 Apr 2011 15:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=hPXqvIvHYMz3HdRqielRu01IdqFrD/VUVoEiLHSLe9k=; b=ZKwEdLrEy3pyz9qLC6F40lCx1Wl1lnv+0oawasavaKAHeNA6RpknxWiGUtCF2e5lP5 cHz76ve2G/bpRNhR6dW+maSSFYQewG6WJaIi0MVuzLCltfZHVHBMFYQe7NGI5Bnd/rPw RP7gBDwfdGRJPigN+K5+bfuP6Br7QXPma0aHU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=AfLC/478wYk4rHl0KWYURBrDPi/N0ACIc6CDHR9+qCTnyBOFcUA+cn6/U+gSb7RbXm 0FnJZwjDz2KaGX8u5lHNgHrZMtT18KbJIGbffxmt16xCkzhf73GuVi5lin7ELxHu0Ohu WUaOmP9Ty1XQBPXyR6niOu++dX2f9zgPViHW0= Received: by 10.52.94.48 with SMTP id cz16mr11263447vdb.173.1303336930102; Wed, 20 Apr 2011 15:02:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.185.6 with HTTP; Wed, 20 Apr 2011 15:01:50 -0700 (PDT) In-Reply-To: <4DAF0FBB.4080004@indabamobile.co.za> References: <4DAF0FBB.4080004@indabamobile.co.za> From: Jonathan Ellis Date: Wed, 20 Apr 2011 17:01:50 -0500 Message-ID: Subject: Re: Internal error processing get_range_slices To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf307f3168bdcd3704a160c6a2 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f3168bdcd3704a160c6a2 Content-Type: text/plain; charset=ISO-8859-1 "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> > multigetSliceAcrossAllUsers(String[] colNames){ > ColumnParent cp; > Map> slicemap = new > TreeMap>(); > List lstKeyslice; > List lstColNames = new ArrayList(); > for(String s : colNames) { > lstColNames.add(ByteBufferUtil.bytes(s)); > } > try { > List 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 (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 --20cf307f3168bdcd3704a160c6a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable "internal error" means an error on the server. check the server l= og for the stacktrace.

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

I am just augmenting the information on the following error:

-------------- error ------------------

org.apache.thrift.TApplicationException: Internal error processing get_range_slices
=A0=A0=A0 at org.apache.thrift.TApplicationException.read(TApplicationException.java:108= )
=A0=A0=A0 at org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandr= a.java:724)
=A0=A0=A0 at org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.jav= a:704)
=A0=A0=A0 at com.indaba.cassandra.thrift.ThriftManager.multigetSliceAcrossAllUsers(Thrif= tManager.java:180)
=A0=A0=A0 at com.indaba.cassandra.thrift.ThriftManager.testMultigetSlice(ThriftManager.j= ava:210)
=A0=A0=A0 at com.indaba.cassandra.thrift.ThriftManager.main(ThriftManager.java:260)<= br>
-------------- 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_ke= y and
end_key "keyrange", with a Integer.MAX_VALUE [return count va= lue].

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=A0
=A0=A0=A0 Cassandra.send_get_range_slices(ColumnParent column_parent, <= br> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 SlicePredicate predic= ate,
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 KeyRange range,
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 ConsistencyLevel cons= istency_level)

is called:

------------------ code ------------------


public Map<String, List<ColumnOrSuperColumn>> multigetSliceAcrossAllUsers(String[] colNames){
=A0=A0=A0 =A0=A0=A0 ColumnParent cp;
=A0=A0=A0 =A0=A0=A0 Map<String, List<ColumnOrSuperColumn>> = slicemap =3D new TreeMap<String, List<ColumnOrSuperColumn>>();
=A0=A0=A0 =A0=A0=A0 List<KeySlice> lstKeyslice;
=A0=A0=A0 =A0=A0=A0 List<ByteBuffer> lstColNames =3D new ArrayList<ByteBuffer>();
=A0=A0=A0 =A0=A0=A0 for(String s : colNames) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 lstColNames.add(ByteBufferUtil.bytes(s));=
=A0=A0=A0 =A0=A0=A0 }
=A0=A0=A0 =A0=A0=A0 try {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 List<CfDef> lstColFamDef =3D client.describe_keyspace(getCurrentKeyspaceName()).getCf_defs();
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 for(CfDef def : lstColFamDef) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 cp =3D new ColumnParent();
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 cp.setColumn_family(def.getName= ());
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 SlicePredicate slicePrd =3D new= SlicePredicate();
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 slicePrd.setColumn_names(lstCol= Names);
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 KeyRange kr =3D new KeyRange();=
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 kr.setCount(Integer.MAX_VALUE);=
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 kr.setStart_key(new byte[0]); =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 kr.setEnd_key(new byte[0]);
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 kr.setStart_keyIsSet(true);
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 kr.setEnd_keyIsSet(true);
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 try {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 lstKeyslice =3D clien= t.get_range_slices(cp, slicePrd, kr, ConsistencyLevel.ANY);
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 for(KeySlice kslc : l= stKeyslice) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 slicemap.pu= t(new String(kslc.getKey()), kslc.getColumns());
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 }
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 } catch (UnavailableException e= ) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 e.printStackTrace();<= br> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 } catch (TimedOutException e) {=
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 e.printStackTrace();<= br> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 }
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 }
=A0=A0=A0 =A0=A0=A0 } catch (NotFoundException e) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 e.printStackTrace();
=A0=A0=A0 =A0=A0=A0 } catch (InvalidRequestException e) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 e.printStackTrace();
=A0=A0=A0 =A0=A0=A0 } catch (TException e) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 e.printStackTrace();
=A0=A0=A0 =A0=A0=A0 }
=A0=A0=A0 =A0=A0=A0 return slicemap;
=A0=A0=A0 }


------------------ code ------------------


------------------ arguments ------------------

args=A0=A0=A0 Cassandra$get_range_slices_args=A0 (id=3D77)=A0=A0=A0 =A0=A0=A0 column_parent=A0=A0=A0 ColumnParent=A0 (id=3D46)=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 column_family=A0=A0=A0 "UserKey_38" (id= =3D97)=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 super_column=A0=A0=A0 null=A0=A0=A0
=A0=A0=A0 consistency_level=A0=A0=A0 ConsistencyLevel=A0 (id=3D58)=A0= =A0=A0
=A0=A0=A0 =A0=A0=A0 name=A0=A0=A0 "ANY" (id=3D86)=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 ordinal=A0=A0=A0 5=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 value=A0=A0=A0 6=A0=A0=A0
=A0=A0=A0 predicate=A0=A0=A0 SlicePredicate=A0 (id=3D54)=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 column_names=A0=A0=A0 ArrayList<E>=A0 (id=3D3= 1)=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 [0]=A0=A0=A0 HeapByteBuffer=A0 (id=3D137)= =A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 [1]=A0=A0=A0 HeapByteBuffer=A0 (id=3D138)= =A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 [2]=A0=A0=A0 HeapByteBuffer=A0 (id=3D139)= =A0=A0=A0
=A0=A0=A0 =A0=A0=A0 slice_range=A0=A0=A0 null=A0=A0=A0
=A0=A0=A0 range=A0=A0=A0 KeyRange=A0 (id=3D56)=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 __isset_bit_vector=A0=A0=A0 BitSet=A0 (id=3D88)=A0= =A0=A0
=A0=A0=A0 =A0=A0=A0 count=A0=A0=A0 2147483647=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 end_key=A0=A0=A0 HeapByteBuffer=A0 (id=3D90)=A0=A0= =A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 address=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 bigEndian=A0=A0=A0 true=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 capacity=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 hb=A0=A0=A0 =A0(id=3D118)=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 isReadOnly=A0=A0=A0 false=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 limit=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 mark=A0=A0=A0 -1=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 nativeByteOrder=A0=A0=A0 false=A0=A0=A0 <= br> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 offset=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 position=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 end_token=A0=A0=A0 null=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 start_key=A0=A0=A0 HeapByteBuffer=A0 (id=3D94)=A0= =A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 address=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 bigEndian=A0=A0=A0 true=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 capacity=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 hb=A0=A0=A0 =A0(id=3D102)=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 isReadOnly=A0=A0=A0 false=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 limit=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 mark=A0=A0=A0 -1=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 nativeByteOrder=A0=A0=A0 false=A0=A0=A0 <= br> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 offset=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 position=A0=A0=A0 0=A0=A0=A0
=A0=A0=A0 =A0=A0=A0 start_token=A0=A0=A0 null=A0=A0=A0

------------------ arguments ------------------

--



--
Jonathan Ellis
Proje= ct Chair, Apache Cassandra
co-founder of DataStax, the source for profes= sional Cassandra support
http://www.datastax.com
--20cf307f3168bdcd3704a160c6a2--