Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-3607

Cursor functionality for results generated by Coprocessors

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Coprocessors
    • None

    Description

      I tried to come up with a scanner like functionality for results generated by coprocessors at region level.
      This is just a poc, and it will be good to have your comments on it.

      It has support for both Incremental and In-memory Result sets. Attached is a patch that has a test case for an incremental result (i.e., client receives a cursorId from the CP core method, it instantiates a cursor object and iterates over the result set. He can set a cache limit on the CursorCallable object to reduce the number of rpc --> just like scanners.

      In its current state, it has some limitations too ), like, it is region specific only, i.e., one can instantiate and use cursor at one region only (and that region is determined by the input row while instantiating the cursor). I will try to expand it so that it can have atleast a sequential access to other regions, but as I said, I want the opinion of experts to know whether this approach really makes some sense or not.
      I have tested it with the inbuilt testing framework on my laptop only.

      It will be good if I copy the use case here in the description too:
      Test table has rows like:
      /**

      • The scenario is that I have these rows keys in the test table:
        'aaa-123'
        'aaa-456'
        'abc-111'
        'abd-111'
        'abd-222'

      & I want to return:
      ('aaa', 2)
      ('abc', 1)
      ('abd', 2)

      Attachments

        1. patch-3607-3.txt
          62 kB
          Himanshu Vashishtha
        2. patch-2.txt
          25 kB
          Himanshu Vashishtha

        Activity

          People

            Unassigned Unassigned
            v.himanshu Himanshu Vashishtha
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: