Cassandra
  1. Cassandra
  2. CASSANDRA-5168

word count example fails with InvalidRequestException(why:Start key's token sorts after end token)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.10, 1.2.2
    • Component/s: Hadoop
    • Labels:
      None

      Description

      Tried with the latest 1.2 branch (commit d64dc2eb3a1a3c3771bbe3218af9ce9629ec67bf) and got this error. Seems related to but different than CASSANDRA-5106.

      1. 5168.txt
        0.8 kB
        Brandon Williams

        Issue Links

          Activity

          Hide
          Brandon Williams added a comment -
          java.lang.RuntimeException: InvalidRequestException(why:Start key's token sorts after end token)
                  at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.maybeInit(ColumnFamilyRecordReader.java:475)
                  at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.computeNext(ColumnFamilyRecordReader.java:481)
                  at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.computeNext(ColumnFamilyRecordReader.java:427)
                  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.getProgress(ColumnFamilyRecordReader.java:109)
                  at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.getProgress(MapTask.java:411)
                  at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:427)
                  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:621)
                  at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
                  at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
          Caused by: InvalidRequestException(why:Start key's token sorts after end token)
                  at org.apache.cassandra.thrift.Cassandra$get_paged_slice_result.read(Cassandra.java:13685)
                  at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
                  at org.apache.cassandra.thrift.Cassandra$Client.recv_get_paged_slice(Cassandra.java:731)
                  at org.apache.cassandra.thrift.Cassandra$Client.get_paged_slice(Cassandra.java:715)
                  at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.maybeInit(ColumnFamilyRecordReader.java:460)
                  ... 12 more
          

          Only affects the wide row iterator. In this case it's setting start key to -5551577223485402047 (key808) and comparing to -9223372036854775808

          Show
          Brandon Williams added a comment - java.lang.RuntimeException: InvalidRequestException(why:Start key's token sorts after end token) at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.maybeInit(ColumnFamilyRecordReader.java:475) at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.computeNext(ColumnFamilyRecordReader.java:481) at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.computeNext(ColumnFamilyRecordReader.java:427) 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.getProgress(ColumnFamilyRecordReader.java:109) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.getProgress(MapTask.java:411) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:427) 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:621) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177) Caused by: InvalidRequestException(why:Start key's token sorts after end token) at org.apache.cassandra.thrift.Cassandra$get_paged_slice_result.read(Cassandra.java:13685) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) at org.apache.cassandra.thrift.Cassandra$Client.recv_get_paged_slice(Cassandra.java:731) at org.apache.cassandra.thrift.Cassandra$Client.get_paged_slice(Cassandra.java:715) at org.apache.cassandra.hadoop.ColumnFamilyRecordReader$WideRowIterator.maybeInit(ColumnFamilyRecordReader.java:460) ... 12 more Only affects the wide row iterator. In this case it's setting start key to -5551577223485402047 (key808) and comparing to -9223372036854775808
          Hide
          Brandon Williams added a comment -

          I think we need to check that end token is not minimum here too.

          Show
          Brandon Williams added a comment - I think we need to check that end token is not minimum here too.
          Hide
          Jonathan Ellis added a comment -

          +1

          Show
          Jonathan Ellis added a comment - +1
          Hide
          Brandon Williams added a comment -

          Committed.

          Show
          Brandon Williams added a comment - Committed.

            People

            • Assignee:
              Brandon Williams
              Reporter:
              Jeremy Hanna
              Reviewer:
              Jonathan Ellis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development