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

The default value for hbase.client.scanner.max.result.size is never actually set on Scans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.1.0, 0.98.12, 1.2.0, 2.0.0
    • 1.1.0, 0.98.12, 1.0.2, 2.0.0
    • None
    • None
    • Reviewed

    Description

      Now that max result size is driven from the client side like caching (HBASE-13362), we also need to set Scan.maxResultSize to the default value of hbase.client.scanner.max.result.size which is never performed. I think this has gone unnoticed because the server used to read the configuration hbase.client.scanner.max.result.size for itself, but now we expect the serialized Scan sent from the client side to contain this information. Realistically this should have been set on the Scans even before HBASE-13362, it's surprising that it's not as the scanner code seems to indicate otherwise.

      Ultimately, the end result is that, by default, scan RPC's are limited by hbase.server.scanner.max.result.size (note this is the new server side config not the client side config) which has a default value of 100 MB. The scan RPC's should instead be limited by hbase.client.scanner.max.result.size which has a default value of 2 MB.

      The reason why this issue occurs is because, by default, a new Scan() initializes Scan.maxResultSize to -1. This initial value of -1 will never be changed unless Scan#setMaxResultSize() is called. In the event that this value is not changed, the Scan that is serialized and sent to the server will also have Scan.maxResultSize = -1. Then, when the server is deciding what size limit should be enforced, it sees that Scan.maxResultSize = -1 so it uses the most relaxed size restriction possible, which is hbase.server.scanner.max.result.size (default value 100 MB).

      Attachments

        1. HBASE-13527-v1.patch
          8 kB
          Jonathan Lawlor
        2. HBASE-13527-0.98.patch
          8 kB
          churro morales
        3. HBASE-13527-branch-1.0-addendum.patch
          2 kB
          Jonathan Lawlor

        Issue Links

          Activity

            People

              jonathan.lawlor Jonathan Lawlor
              jonathan.lawlor Jonathan Lawlor
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: