hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Meil <doug.m...@explorysmedical.com>
Subject Re: Scan.addFamiliy reduces results
Date Thu, 15 Mar 2012 16:39:34 GMT

re:  "However, I am getting different number of results, depending on
which families are added"

Yes.

I'd suggest you read this in the RefGuide.

http://hbase.apache.org/book.html#datamodel





On 3/15/12 12:08 PM, "Peter Wolf" <opus111@gmail.com> wrote:

>Hi all,
>
>I am doing a scan on a table with multiple families.  My code looks like
>this...
>
>         Scan scan = new Scan(calculateStartRowKey(a),
>calculateEndRowKey(b));
>
>         scan.setCaching(10000);
>         Filter filter = new SingleColumnValueFilter(xFamily, xColumn,
>CompareFilter.CompareOp.EQUAL, Bytes.toBytes(x));
>         scan.setFilter(filter);
>         scan
>                 .addFamily(xFamily)
>                 .addFamily(yFamily)
>                 .addFamily(zFamily);
>
>         ResultScanner scanner = hTable.getScanner(scan);
>
>         Iterator<Result> it = scanner.iterator();
>         int resultCount = 0;
>         while (it.hasNext()) {
>               Result result = it.next();
>
>               resultCount++;
>         }
>
>However, I am getting different number of results, depending on which
>families are added.  For example these give different result counts
>
>         scan
>                 //.addFamily(xFamily)
>                 .addFamily(yFamily)
>                 .addFamily(zFamily);
>and
>         scan
>                 .addFamily(xFamily)
>                 .addFamily(yFamily)
>                 .addFamily(zFamily);
>
>
>There is no error message, and I don't see anything in the Scan
>documentation.  Does anyone know what is going on?
>
>Thanks
>Peter
>
>
>



Mime
View raw message