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

Setter for Result#getStats is #addResults; confusing!

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0, 2.0.0
    • Client
    • Reviewed
    • Deprecates Result#addResults in favor of Result#setStatistics

    Description

      Below is our larsgeorge on a finding he made reviewing our API:

      "Result class having getStats() and addResults(Stats) makes little sense..."

      "...the naming is just weird. You have a getStats() getter and an addResults(Stats) setter???"

      "...Especially in the Result class and addResult() is plain misleading..."

      This issue is about deprecating addResults and replacing it with addStats in its place.

      The getStats/addResult is recent. It came in with:

      commit a411227b0ebf78b4ee8ae7179e162b54734e77de
      Author: Jesse Yates <jesse.k.yates@gmail.com>
      Date:   Tue Oct 28 16:14:16 2014 -0700
      
          HBASE-5162 Basic client pushback mechanism
      ...
      

      RegionLoadStats don't belong in Result if you ask me but better in the enveloping on invocations... but that is another issue.

      Attachments

        1. HBASE-13270-v2.patch
          2 kB
          Mikhail Antonov
        2. HBASE-13270.patch
          1 kB
          Mikhail Antonov

        Activity

          People

            mantonov Mikhail Antonov
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: