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

keep Thrift connection open between get_range_slices calls in ColumnFamilyRecordReader

    Details

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

      Activity

      Hide
      johanoskarsson 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
      johanoskarsson 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.
      Hide
      jbellis Jonathan Ellis added a comment -

      can you rename setupConnection to maybeConnect?

      +1 the rest

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

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

      Show
      jbellis Jonathan Ellis added a comment - Stu adds that it may be more hadoop-y to throw IOException on connection error, than RuntimeException
      Hide
      johanoskarsson 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
      johanoskarsson 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
      jbellis Jonathan Ellis added a comment -

      +1

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

      Committed to trunk

      Show
      johanoskarsson Johan Oskarsson added a comment - Committed to trunk

        People

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

          Dates

          • Created:
            Updated:
            Resolved:

            Development