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

MultiRowRangeFilter not working correctly if given same start and stop RowKey

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.2.4, 0.98.24, 1.1.9
    • Fix Version/s: 1.4.0, 1.3.1, 1.2.5, 1.1.10, 2.0.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      try (final Connection conn = ConnectionFactory.createConnection(conf);
      final Table scanTable = conn.getTable(table)){
      ArrayList<MultiRowRangeFilter.RowRange> rowRangesList = new ArrayList<>();

      String startRowkey="abc";
      String stopRowkey="abc";
      rowRangesList.add(new MultiRowRangeFilter.RowRange(startRowkey, true, stopRowkey, true));
      Scan scan = new Scan();
      scan.setFilter(new MultiRowRangeFilter(rowRangesList));

      ResultScanner scanner=scanTable.getScanner(scan);

      for (Result result : scanner)

      { String rowkey=new String(result.getRow()); System.out.println(rowkey); }


      }

      In Hbase API of Java, we want to do multiple scans in the table using MultiRowRangeFilter.
      When we give multiple filters of startRowKey and stopRowKey, it is not working Properly with same StartRowKey and StopRowkey.
      Ideally, it should give only one Row with that Rowkey, but instead it is giving all the rows starting from that Rowkey in that Hbase Table

        Attachments

        1. HBASE-17688.master-v1.patch
          6 kB
          Jingcheng Du
        2. HBASE-17688.master.patch
          6 kB
          Jingcheng Du
        3. HBASE-17688.branch-1.x.patch
          6 kB
          Jingcheng Du

          Activity

            People

            • Assignee:
              jingcheng.du Jingcheng Du
              Reporter:
              ahujaravi1 Ravi Ahuj
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: