HbaseQueryImpl implements HbaseQuery { @Override public List<DynaBean> select(String sql) throws SQLSyntaxErrorException, IOException { return select(sql, null, null); }  @Override List<DynaBean> select(String sql); @Override List<DynaBean> select(String sql, String startRow,
            String stopRow);  }
@Test public void testSelectAsterisk() throws SQLSyntaxErrorException, IOException { String sql = "SELECT * FROM report1"; HbaseQuery hbaseQuery = new HbaseQueryImpl(); List<DynaBean> rows = hbaseQuery.select(sql); printBean(rows); Assert.assertEquals(13, rows.size()); }
@Test public void testWhere() throws SQLSyntaxErrorException, IOException { String sql = "SELECT * FROM report1 WHERE TIME_ID = 201206 and AREA_ID = 730"; HbaseQuery hbaseQuery = new HbaseQueryImpl(); List<DynaBean> rows = hbaseQuery.select(sql); printBean(rows); Assert.assertEquals(1, rows.size()); }
@Test public void testLimit() throws SQLSyntaxErrorException, IOException { String sql = "SELECT TIME_ID, AREA_NAME FROM report1 limit 3 offset 2"; HbaseQuery hbaseQuery = new HbaseQueryImpl(); List<DynaBean> rows = hbaseQuery.select(sql); printBean(rows); Assert.assertEquals(3, rows.size()); }