hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chunhui shen (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-5020) MetaReader#fullScan doesn't stop scanning when vistor returns false in 0.90 version
Date Wed, 14 Dec 2011 03:28:31 GMT
MetaReader#fullScan doesn't  stop scanning when vistor returns false in 0.90 version

                 Key: HBASE-5020
                 URL: https://issues.apache.org/jira/browse/HBASE-5020
             Project: HBase
          Issue Type: Bug
            Reporter: chunhui shen
         Attachments: hbase-5020.patch

In current 0.90 code,
 public static void fullScan(CatalogTracker catalogTracker,
      final Visitor visitor, final byte [] startrow)
  throws IOException {
    HRegionInterface metaServer =
    Scan scan = new Scan();
    if (startrow != null) scan.setStartRow(startrow);
    long scannerid = metaServer.openScanner(
        HRegionInfo.FIRST_META_REGIONINFO.getRegionName(), scan);
    try {
      Result data;
      while((data = metaServer.next(scannerid)) != null) {
        if (!data.isEmpty()) visitor.visit(data);
    } finally {

If visitor.visit(data) return false, the scan will not stop;
However, it is not the same as the description of Visitor
public interface Visitor {
     * Visit the catalog table row.
     * @param r A row from catalog table
     * @return True if we are to proceed scanning the table, else false if
     * we are to stop now.
    public boolean visit(final Result r) throws IOException;

I think it is a miss, and trunk doesn't exist this hole.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message