XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.0.0-alpha-4, 2.0.0
    • Coprocessors
    • None
    • Incompatible change, Reviewed
    • Hide
      RegionObserver#preScannerOpen signature changed
      RegionScanner preScannerOpen( ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) -> void preScannerOpen( ObserverContext<RegionCoprocessorEnvironment> c, Scan scan)
      The pre hook can no longer return a RegionScanner instance.
      Show
      RegionObserver#preScannerOpen signature changed RegionScanner preScannerOpen( ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) -> void preScannerOpen( ObserverContext<RegionCoprocessorEnvironment> c, Scan scan) The pre hook can no longer return a RegionScanner instance.

    Description

      Shipper is a IA.Private interface and very much internal..
      Right now CP exposed RegionScanner is extending this and so exposing the shipped() method. This by mistake is called, can harm the correctness of the cells in the Results.

      preScannerOpen() allowing to return a new Scanner is also problematic now. This can allow users to create a Region scanner from Region and then wrap it and return back (Well same can be done by postScannerOpen also), it can so happen that the wrapper is not implementing the shipped() properly. In any way exposing the shipped () is problematic.

      Solution Steps
      1. Remove preScannerOpen() , the use case I can think of is wrapping the original scanner. The original scanner can be created by Region.getScanner way only.. May be no need to remove this hook. Just remove the ability for it to return a RegionScanner instance. Call this with the Scan object and the CP can change the Scan object if they want.
      2. Let RegionScanner not extending Shipper but only RegionScannerImpl implements this
      3. We have ref to the RegionScanner created by core and let that be used by RegionScannerShippedCallBack when the post hook doing a wrap.

      Attachments

        1. HBASE-19047_V2.patch
          30 kB
          Anoop Sam John
        2. HBASE-19047_V2.patch
          30 kB
          Anoop Sam John
        3. HBASE-19047_V3.patch
          30 kB
          Anoop Sam John
        4. HBASE-19047_V4.patch
          33 kB
          Anoop Sam John
        5. HBASE-19047_V4.patch
          31 kB
          Michael Stack
        6. HBASE-19047_V4.patch
          31 kB
          Anoop Sam John
        7. HBASE-19047_V5.patch
          36 kB
          Anoop Sam John
        8. HBASE-19047.patch
          30 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            anoop.hbase Anoop Sam John
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: