hbase support

This commit is contained in:
温少
2012-05-19 09:36:59 +08:00
parent 421820bfcb
commit 7ac9fb060f
7 changed files with 87 additions and 14 deletions
@@ -0,0 +1,25 @@
package com.alibaba.druid.hbase;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.Properties;
import junit.framework.TestCase;
public class HBaseDriverInsertTest extends TestCase {
public void test_select_0() throws Exception {
HBaseDriver driver = new HBaseDriver();
Connection conn = driver.connect("jdbc:druid-hbase:10.20.153.63", new Properties());
PreparedStatement stmt = conn.prepareStatement("INSERT INTO test_user (id, name) VALUES (?, ?)");
stmt.setInt(1, 33);
stmt.setString(2, "ljw");
stmt.execute();
stmt.close();
conn.close();
}
}