Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-5504

Eternal iteration when using older hadoop version due to next() call and empty key value

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.5
    • None
    • None
    • Low

    Description

      Currently, when using newer hadoop versions, due to the call to

      next(ByteBuffer key, SortedMap<ByteBuffer, IColumn> value)

      within ColumnFamilyRecordReader, because `key.clear();` is called, key is emptied. That causes the StaticRowIterator and WideRowIterator to glitch, namely, when Iterables.getLast(rows).key is called, key is already empty. This will cause Hadoop to request the same range again and again all the time.

      Please see the attached patch/diff, it simply adds lastRowKey (ByteBuffer) and saves it for the next iteration along with all the rows, this allows query for the next range to be fully correct.

      This patch is branched from 1.2.3 version.

      Tested against Cassandra 1.2.3, with Hadoop 1.0.3, 1.0.4 and 0.20.2

      Attachments

        1. 5504-v3.txt
          0.6 kB
          Jonathan Ellis
        2. patch.diff
          3 kB
          Alex Petrov
        3. patch2.diff
          3 kB
          Alex Petrov

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ifesdjeen Alex Petrov Assign to me
            ifesdjeen Alex Petrov
            Alex Petrov
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment