hbase support

This commit is contained in:
温少
2012-05-19 15:18:17 +08:00
3 changed files with 36 additions and 1 deletions
@@ -13,7 +13,9 @@ public class HBaseDriverTest extends TestCase {
HBaseDriver driver = new HBaseDriver();
Connection conn = driver.connect("jdbc:druid-hbase:10.20.153.63", new Properties());
PreparedStatement stmt = conn.prepareStatement("SELECT id, name, gender, salary FROM test_user");
PreparedStatement stmt = conn.prepareStatement("SELECT id, name, gender, salary FROM test_user where id > 3 and id < ?");
stmt.setInt(1, 6);
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
System.out.print(rs.getInt("id"));