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

          Jeremy Hanna created issue -
          Jeremy Hanna made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          Brandon Williams made changes -
          Summary word count example fails with InvalidRequestException(why:Start token sorts after end token) word count example fails with InvalidRequestException(why:Start key's token sorts after end token)
          Brandon Williams made changes -
          Fix Version/s 1.2.1 [ 12322953 ]
          Brandon Williams made changes -
          Assignee Jonathan Ellis [ jbellis ]
          Reviewer brandon.williams
          Sylvain Lebresne made changes -
          Fix Version/s 1.2.2 [ 12323924 ]
          Fix Version/s 1.2.1 [ 12322953 ]
          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.
          Brandon Williams made changes -
          Attachment 5168.txt [ 12566541 ]
          Brandon Williams made changes -
          Affects Version/s 1.1.9 [ 12323843 ]
          Brandon Williams made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Assignee Jonathan Ellis [ jbellis ] Brandon Williams [ brandon.williams ]
          Reviewer brandon.williams jbellis
          Hide
          Jonathan Ellis added a comment -

          +1

          Show
          Jonathan Ellis added a comment - +1
          Jonathan Ellis made changes -
          Fix Version/s 1.1.10 [ 12323947 ]
          Hide
          Brandon Williams added a comment -

          Committed.

          Show
          Brandon Williams added a comment - Committed.
          Brandon Williams made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Gavin made changes -
          Workflow no-reopen-closed, patch-avail [ 12746523 ] patch-available, re-open possible [ 12749868 ]
          Gavin made changes -
          Workflow patch-available, re-open possible [ 12749868 ] reopen-resolved, no closed status, patch-avail, testing [ 12754472 ]
          Jeremy Hanna made changes -
          Link This issue is duplicated by CASSANDRA-5217 [ CASSANDRA-5217 ]

            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