Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hbase的count竟然不兼容 #17

Open
zhang-xzhi opened this issue Nov 24, 2014 · 0 comments
Open

hbase的count竟然不兼容 #17

zhang-xzhi opened this issue Nov 24, 2014 · 0 comments

Comments

@zhang-xzhi
Copy link
Collaborator

老版本的hbase count时可以用不存在的列count,结果是包含该行的。
较新版本的hbase count时用不存在的列count,结果是0。

@Test
public void testCount_NonExistColumn() throws Throwable {
    LongColumnInterpreter columnInterpreter = new LongColumnInterpreter();
    AggregationClient aggregationClient = new AggregationClient(
            Config.getConfiguration());

    Scan scan = new Scan();
    scan.addColumn(ColumnFamilyName, QName_NotExistColumn);

    Long count = aggregationClient.rowCount(TableNameBytes,
            columnInterpreter, scan);
    //        Assert.assertTrue(count.longValue() == 4);
    Assert.assertTrue(count.longValue() == 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant