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

Scanning .META. with startRow and/or stopRow is not giving proper results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.94.5
    • None
    • Usability
    • None

    Description

          try {
            HTable metaTable = new HTable(config, Bytes.toBytes(".META."));
            Scan scan = new Scan();
            scan.setStartRow(Bytes.toBytes("e"));
            scan.setStopRow(Bytes.toBytes("z"));
            ResultScanner scanner = metaTable.getScanner(scan);
            Result[] results = scanner.next(100);
            while (results.length > 0) {
              for (Result result : results) {
                System.out.println(Bytes.toString(result.getRow()));
              }
              results = scanner.next(100);
            }
            scanner.close();
            metaTable.close();
          } catch (Exception e) {
            e.printStackTrace();
          }
      

      This code will not return any result even if there is 10 tables with names starting with "d" to "w", including one table called "entry". If you comment the setStopRow you will get results, but will still get rows starting with "d" even if setStartRow is set to "e".

      Same code using with a user table is working fine.

      Facing the same issue with the shell.

      scan '.META.' ,

      {STARTROW => 'e', LIMIT => 10}

      is returning rows starting by "d".

      scan '.META.' ,

      {STARTROW => 'e', STOPROW => 'v', LIMIT => 10}

      is not returning anything.

      Attachments

        1. HBASE-7928_0.94_1.patch
          3 kB
          ramkrishna.s.vasudevan
        2. HBASE-7928_0.94_2.patch
          4 kB
          ramkrishna.s.vasudevan
        3. HBASE-7928_0.94_3.patch
          4 kB
          ramkrishna.s.vasudevan
        4. HBASE-7928_0.94_3.patch
          4 kB
          ramkrishna.s.vasudevan
        5. HBASE-7928_0.94.patch
          3 kB
          ramkrishna.s.vasudevan
        6. HBASE-7928_trunk_1.patch
          4 kB
          ramkrishna.s.vasudevan
        7. HBASE-7928_trunk_2.patch
          4 kB
          ramkrishna.s.vasudevan
        8. HBASE-7928_trunk_2.patch
          4 kB
          ramkrishna.s.vasudevan
        9. HBASE-7928_trunk.patch
          3 kB
          ramkrishna.s.vasudevan

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmspaggi Jean-Marc Spaggiari
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: