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

FastLongHistogram#getCountAtOrBelow method is broken.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-alpha-1, 2.3.0, 1.6.0, 2.2.3
    • Fix Version/s: None
    • Component/s: metrics
    • Labels:
      None

      Description

      FastLongHistogram#getCountAtOrBelow method is broken.
      If I revert HBASE-23245 then it works fine.
      Wrote a small test case in TestHistogramImpl.java :

        @Test
        public void testAdd1() {
          HistogramImpl histogram = new HistogramImpl();
          for (int i = 0; i < 100; i++) {
            histogram.update(i);
          }
          Snapshot snapshot = histogram.snapshot();
          // This should return count as 6 since we added 0, 1, 2, 3, 4, 5
          Assert.assertEquals(6, snapshot.getCountAtOrBelow(5));
      

      It fails as below:

      java.lang.AssertionError:
      Expected :6
      Actual :100

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                shahrs87 Rushabh Shah
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: