Cassandra
  1. Cassandra
  2. CASSANDRA-1017

keep Thrift connection open between get_range_slices calls in ColumnFamilyRecordReader

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 0.7 beta 1
    • Component/s: Core
    • Labels:
      None
    1. CASSANDRA-1017.patch
      5 kB
      Johan Oskarsson
    2. CASSANDRA-1017.patch
      5 kB
      Johan Oskarsson

      Activity

      Hide
      Johan Oskarsson added a comment -

      Committed to trunk

      Show
      Johan Oskarsson added a comment - Committed to trunk
      Hide
      Jonathan Ellis added a comment -

      +1

      Show
      Jonathan Ellis added a comment - +1
      Hide
      Johan Oskarsson added a comment -

      Renamed the method as suggested.
      Throwing IOException would be preferable, but can't neatly propagate that up to nextKeyValue(). Would have to add it to the computeNext() method and that would conflict the AbstractIterator interface. Could make a nasty hack of it but I think that's outside the scope of this patch.

      Show
      Johan Oskarsson added a comment - Renamed the method as suggested. Throwing IOException would be preferable, but can't neatly propagate that up to nextKeyValue(). Would have to add it to the computeNext() method and that would conflict the AbstractIterator interface. Could make a nasty hack of it but I think that's outside the scope of this patch.
      Hide
      Jonathan Ellis added a comment -

      Stu adds that it may be more hadoop-y to throw IOException on connection error, than RuntimeException

      Show
      Jonathan Ellis added a comment - Stu adds that it may be more hadoop-y to throw IOException on connection error, than RuntimeException
      Hide
      Jonathan Ellis added a comment -

      can you rename setupConnection to maybeConnect?

      +1 the rest

      Show
      Jonathan Ellis added a comment - can you rename setupConnection to maybeConnect? +1 the rest
      Hide
      Johan Oskarsson added a comment -

      This patch moves connecting, logging in and setting up the comparator into a new method. If we have previously created the connection the method returns without reconnecting. The patch also correctly closes the connection when the recordreader's close method is called.

      Show
      Johan Oskarsson added a comment - This patch moves connecting, logging in and setting up the comparator into a new method. If we have previously created the connection the method returns without reconnecting. The patch also correctly closes the connection when the recordreader's close method is called.

        People

        • Assignee:
          Johan Oskarsson
          Reporter:
          Jonathan Ellis
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development