hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamal B <jm151...@gmail.com>
Subject Weird ColumnPaginationFilter Results
Date Thu, 19 Jan 2012 13:18:29 GMT
Hi, I was hoping that someone would be able to help me out with this weird
behavior.  I have some code which attempts to page through a set of columns
in the same column family, making N number of get requests to retrieve 32
columns at a time.  I noticed that for some reason, the data being returned
from the get request does't match my expected behavior.  So I created a
simple unit test like beow to figure out what's going on with my code. The
simple test code is:

public void getPage() throws IOException{

int limit = 5, start =0;
byte[] rowKey = Bytes
        HTable table = new HTable(TABLE_NAME);

             Get get = new Get(rowKey);

              Filter filter = new ColumnPaginationFilter(limit, start);

              Result result = table.get(get);

              NavigableMap<byte[], byte[]> map = result
              LOG.info("size: " + map.size());
              Iterator<byte[]> iter = map.keySet().iterator();

             while (iter.hasNext())
                 LOG.info("qual:" + Bytes.toString(iter.next()));

             Assert.assertTrue(map.size() == 5);

When I run this test code against a test table where row1 contains 12
columns in the column family, I don't receive the expected 5 columns, but
instead I only receive 3.  If I re-run this test, adjusting the limit
higher & higher (5,6, 7, 8, etc..) I receive more columns being returned
which is weird.  It almost seems as if there is some position index being
used by the client???

Any ideas as to what I need to do in my code, or configuration to
consistently retrieve a batch of columns?  Am I using the
ColumnPaginationFilter correctly?

Any help would be greatly appreciated.


I am using hbase 0.90.4 & apache hadoop 0.20.205.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message