HBase
  1. HBase
  2. HBASE-8157

Allow better control over lease timeouts on a per-scan basis

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Changing the global scanner lease timeout is a heavy-handed solution for long scans on a cluster that may be used by a variety of applications. Two additions would make this easier to manage in this circumstance:

      1) Allow overriding hbase.regionserver.lease.period on a per-scan basis.

      2) Allow manual reporting of progress, similar to Hadoop's context.progress(). Example usage:

      Scan scan = new Scan(startRow, endRow);
      scan.setCaching(someVal); // based on what we expect most rows to take for processing time
      
      ResultScanner scanner = table.getScanner(scan);
      
      for (Result r : scanner) {
        //
        // usual processing, the time for which we accounted for in our caching and global lease timeout settings
        //
      
        if (someCondition) {
          //
          // More time-intensive processing necessary on this record, which is hard to account for in the caching
          //
      
          scanner.progress();
        }
      }
      

        Issue Links

          Activity

          Bryan Beaudreault created issue -
          Bryan Beaudreault made changes -
          Field Original Value New Value
          Description Changing the global scanner lease timeout is a heavy-handed solution for long scans on a cluster that may be used by a variety of applications. Two additions would make this easier to manage in this circumstance:

          1) Allow overriding hbase.regionserver.lease.period on a per-scan basis.

          2) Allow manual reporting of progress, similar to Hadoop's context.progress(). Example usage:

          {noformat}
          Scan scan = new Scan(startRow, endRow);
          scan.setCaching(someVal); // based on what we expect most rows to take for processing time

          ResultScanner scanner = table.getScanner(scan);

          for (Result r : scanner) {
            
            // usual processing, the time for which we accounted for in our caching and global lease timeout settings
            
            if (someCondition) {
              // More time-intensive processing necessary on this record, which is hard to account for in the caching

              scanner.progress();

            }
          }
          {noformat}
          Changing the global scanner lease timeout is a heavy-handed solution for long scans on a cluster that may be used by a variety of applications. Two additions would make this easier to manage in this circumstance:

          1) Allow overriding hbase.regionserver.lease.period on a per-scan basis.

          2) Allow manual reporting of progress, similar to Hadoop's context.progress(). Example usage:

          {noformat}
          Scan scan = new Scan(startRow, endRow);
          scan.setCaching(someVal); // based on what we expect most rows to take for processing time

          ResultScanner scanner = table.getScanner(scan);

          for (Result r : scanner) {
            //
            // usual processing, the time for which we accounted for in our caching and global lease timeout settings
            //

            if (someCondition) {
              //
              // More time-intensive processing necessary on this record, which is hard to account for in the caching
              //

              scanner.progress();
            }
          }
          {noformat}
          Bryan Beaudreault made changes -
          Link This issue duplicates HBASE-13333 [ HBASE-13333 ]
          Bryan Beaudreault made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Bryan Beaudreault
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development