Re: Start token sorts after end token

2013-02-02 Thread Manu Zhang

On Fri 01 Feb 2013 06:56:54 PM CST, Jeremy Hanna wrote:

See https://issues.apache.org/jira/browse/CASSANDRA-5168 - should be fixed in 
1.1.10 and 1.2.2.

On Jan 30, 2013, at 9:18 AM, Tejas Patil tejas.patil...@gmail.com wrote:


While reading data from Cassandra in map-reduce, I am getting 
InvalidRequestException(why:Start token sorts after end token)

Below is the code snippet that I used and the entire stack trace.
(I am using Cassandra 1.2.0 and hadoop 0.20.2)
Can you point out the issue here ?

Code snippet:
SlicePredicate predicate = new SlicePredicate();

 SliceRange sliceRange = new SliceRange();
 sliceRange.start = ByteBuffer.wrap((1.getBytes()));
 sliceRange.finish = ByteBuffer.wrap((100.getBytes()));
 sliceRange.reversed = false;
 //predicate.slice_range = sliceRange;

 ListByteBuffer colNames = new ArrayListByteBuffer();
 colNames.add(ByteBuffer.wrap(url.getBytes()));
 colNames.add(ByteBuffer.wrap(Parent.getBytes()));
 predicate.column_names = colNames;

 ConfigHelper.setInputSlicePredicate(job.getConfiguration(), predicate);

Full stack trace:
java.lang.RuntimeException: InvalidRequestException(why:Start token sorts after 
end token)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:384)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:390)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:313)
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:184)
at 
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:456)
at 
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:





tried out on a single node, but the cassandra-cli way showed no 
endpoint details either


Re: Start token sorts after end token

2013-02-02 Thread Manu Zhang

On Fri 01 Feb 2013 06:56:54 PM CST, Jeremy Hanna wrote:

See https://issues.apache.org/jira/browse/CASSANDRA-5168 - should be fixed in 
1.1.10 and 1.2.2.

On Jan 30, 2013, at 9:18 AM, Tejas Patil tejas.patil...@gmail.com wrote:


While reading data from Cassandra in map-reduce, I am getting 
InvalidRequestException(why:Start token sorts after end token)

Below is the code snippet that I used and the entire stack trace.
(I am using Cassandra 1.2.0 and hadoop 0.20.2)
Can you point out the issue here ?

Code snippet:
SlicePredicate predicate = new SlicePredicate();

 SliceRange sliceRange = new SliceRange();
 sliceRange.start = ByteBuffer.wrap((1.getBytes()));
 sliceRange.finish = ByteBuffer.wrap((100.getBytes()));
 sliceRange.reversed = false;
 //predicate.slice_range = sliceRange;

 ListByteBuffer colNames = new ArrayListByteBuffer();
 colNames.add(ByteBuffer.wrap(url.getBytes()));
 colNames.add(ByteBuffer.wrap(Parent.getBytes()));
 predicate.column_names = colNames;

 ConfigHelper.setInputSlicePredicate(job.getConfiguration(), predicate);

Full stack trace:
java.lang.RuntimeException: InvalidRequestException(why:Start token sorts after 
end token)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:384)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:390)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:313)
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at 
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:184)
at 
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:456)
at 
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:





sorry, I replied to the wrong thread


Re: Start token sorts after end token

2013-02-01 Thread Jeremy Hanna
See https://issues.apache.org/jira/browse/CASSANDRA-5168 - should be fixed in 
1.1.10 and 1.2.2.

On Jan 30, 2013, at 9:18 AM, Tejas Patil tejas.patil...@gmail.com wrote:

 While reading data from Cassandra in map-reduce, I am getting 
 InvalidRequestException(why:Start token sorts after end token)
 
 Below is the code snippet that I used and the entire stack trace.
 (I am using Cassandra 1.2.0 and hadoop 0.20.2)
 Can you point out the issue here ?
 
 Code snippet:
SlicePredicate predicate = new SlicePredicate();
 
 SliceRange sliceRange = new SliceRange();
 sliceRange.start = ByteBuffer.wrap((1.getBytes()));
 sliceRange.finish = ByteBuffer.wrap((100.getBytes()));
 sliceRange.reversed = false;
 //predicate.slice_range = sliceRange;
 
 ListByteBuffer colNames = new ArrayListByteBuffer();
 colNames.add(ByteBuffer.wrap(url.getBytes()));
 colNames.add(ByteBuffer.wrap(Parent.getBytes()));
 predicate.column_names = colNames;
 
 ConfigHelper.setInputSlicePredicate(job.getConfiguration(), predicate);
 
 Full stack trace:
 java.lang.RuntimeException: InvalidRequestException(why:Start token sorts 
 after end token)
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:384)
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:390)
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:313)
   at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at 
 org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:184)
   at 
 org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:456)
   at 
 org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
   at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
   at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:
 



Re: Start token sorts after end token

2013-01-31 Thread aaron morton
Out of interest do you have the ticket?

A

-
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 31/01/2013, at 3:19 AM, Edward Capriolo edlinuxg...@gmail.com wrote:

 Fix is simply to switch to random partitioner.
 
 On Wednesday, January 30, 2013, Edward Capriolo edlinuxg...@gmail.com wrote:
  This was unexpected fallout fro the change to murmur partitioner. A jira is 
  open but if you need map red murmers is currently out of the question.
 
  On Wednesday, January 30, 2013, Tejas Patil tejas.patil...@gmail.com 
  wrote:
  While reading data from Cassandra in map-reduce, I am getting 
  InvalidRequestException(why:Start token sorts after end token)
  Below is the code snippet that I used and the entire stack trace.
  (I am using Cassandra 1.2.0 and hadoop 0.20.2)
  Can you point out the issue here ?
  Code snippet:
 SlicePredicate predicate = new SlicePredicate();
  SliceRange sliceRange = new SliceRange();
  sliceRange.start = ByteBuffer.wrap((1.getBytes()));
  sliceRange.finish = ByteBuffer.wrap((100.getBytes()));
  sliceRange.reversed = false;
  //predicate.slice_range = sliceRange;
  ListByteBuffer colNames = new ArrayListByteBuffer();
  colNames.add(ByteBuffer.wrap(url.getBytes()));
  colNames.add(ByteBuffer.wrap(Parent.getBytes()));
  predicate.column_names = colNames;
  ConfigHelper.setInputSlicePredicate(job.getConfiguration(), predicate);
  Full stack trace:
  java.lang.RuntimeException: InvalidRequestException(why:Start token sorts 
  after end token)
  at 
  org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:384)
  at 
  org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:390)
  at 
  org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:313)
  at 
  com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
  at 
  com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
  at 
  org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:184)
  at 
  org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:456)
  at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
  at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
  at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:
 



Re: Start token sorts after end token

2013-01-30 Thread Edward Capriolo
This was unexpected fallout fro the change to murmur partitioner. A jira is
open but if you need map red murmers is currently out of the question.

On Wednesday, January 30, 2013, Tejas Patil tejas.patil...@gmail.com
wrote:
 While reading data from Cassandra in map-reduce, I am getting
InvalidRequestException(why:Start token sorts after end token)
 Below is the code snippet that I used and the entire stack trace.
 (I am using Cassandra 1.2.0 and hadoop 0.20.2)
 Can you point out the issue here ?
 Code snippet:
SlicePredicate predicate = new SlicePredicate();
 SliceRange sliceRange = new SliceRange();
 sliceRange.start = ByteBuffer.wrap((1.getBytes()));
 sliceRange.finish = ByteBuffer.wrap((100.getBytes()));
 sliceRange.reversed = false;
 //predicate.slice_range = sliceRange;
 ListByteBuffer colNames = new ArrayListByteBuffer();
 colNames.add(ByteBuffer.wrap(url.getBytes()));
 colNames.add(ByteBuffer.wrap(Parent.getBytes()));
 predicate.column_names = colNames;
 ConfigHelper.setInputSlicePredicate(job.getConfiguration(),
predicate);
 Full stack trace:
 java.lang.RuntimeException: InvalidRequestException(why:Start token sorts
after end token)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:384)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:390)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:313)
 at
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
 at
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:184)
 at
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:456)
 at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
 at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
 at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:



Re: Start token sorts after end token

2013-01-30 Thread Edward Capriolo
Fix is simply to switch to random partitioner.

On Wednesday, January 30, 2013, Edward Capriolo edlinuxg...@gmail.com
wrote:
 This was unexpected fallout fro the change to murmur partitioner. A jira
is open but if you need map red murmers is currently out of the question.

 On Wednesday, January 30, 2013, Tejas Patil tejas.patil...@gmail.com
wrote:
 While reading data from Cassandra in map-reduce, I am getting
InvalidRequestException(why:Start token sorts after end token)
 Below is the code snippet that I used and the entire stack trace.
 (I am using Cassandra 1.2.0 and hadoop 0.20.2)
 Can you point out the issue here ?
 Code snippet:
SlicePredicate predicate = new SlicePredicate();
 SliceRange sliceRange = new SliceRange();
 sliceRange.start = ByteBuffer.wrap((1.getBytes()));
 sliceRange.finish = ByteBuffer.wrap((100.getBytes()));
 sliceRange.reversed = false;
 //predicate.slice_range = sliceRange;
 ListByteBuffer colNames = new ArrayListByteBuffer();
 colNames.add(ByteBuffer.wrap(url.getBytes()));
 colNames.add(ByteBuffer.wrap(Parent.getBytes()));
 predicate.column_names = colNames;
 ConfigHelper.setInputSlicePredicate(job.getConfiguration(),
predicate);
 Full stack trace:
 java.lang.RuntimeException: InvalidRequestException(why:Start token
sorts after end token)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.maybeInit(ColumnFamilyRecordReader.java:384)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:390)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader$StaticRowIterator.computeNext(ColumnFamilyRecordReader.java:313)
 at
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
 at
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
 at
org.apache.cassandra.hadoop.ColumnFamilyRecordReader.nextKeyValue(ColumnFamilyRecordReader.java:184)
 at
org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:456)
 at
org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
 at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
 at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java: