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

ClientSideRegionScanner's reaction to Scan#setBatch is not consistent between HBase versions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.3, 1.1.3, 0.98.17
    • 1.0.4, 0.98.18
    • None
    • None
    • Reviewed

    Description

      In 1.1.3, ClientSideRegionScanner calls RegionScannerImpl#next() with single argument, so it honors Scan#setBatch(through defaultScannerContext in RegionScannerImpl).

      // 1.1.3
      public class ClientSideRegionScanner extends AbstractClientScanner {
        ...
        @Override
        public Result next() throws IOException {
          values.clear();
          scanner.nextRaw(values);
          ...
      


      But in 1.0.3 and 0.98.17, ClientSideRegionScanner calls RegionScannerImpl#next() with limit=-1, so it ignores Scan#setBatch.

      // 1.0.3 and 0.98.17
      public class ClientSideRegionScanner extends AbstractClientScanner {
        ...
        @Override
        public Result next() throws IOException {
          values.clear();
      
          scanner.nextRaw(values, -1); // pass -1 as limit so that we see the whole row.
          ...
      

      Attachments

        1. HBASE-15274-0.98.patch
          1 kB
          Youngjoon Kim
        2. HBASE-15274-branch-1.0.patch
          1 kB
          Youngjoon Kim

        Activity

          People

            y0un5 Youngjoon Kim
            y0un5 Youngjoon Kim
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: