本帖最后由 pig2 于 2014-9-4 17:14 编辑
我的hbase代码如下:
public static Configuration conf = null;
static {
conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum",
"slave1.hadoop,slave2.hadoop,slave3.hadoop");
}
@Test
public void testPut() throws Exception {
HTable hTable = new HTable(conf, "test");
Put put = new Put(Bytes.toBytes("13566344547"));
put.add(Bytes.toBytes("info"), Bytes.toBytes("name"),
Bytes.toBytes("lisi"));
hTable.put(put);
hTable.close();
}
报如下错误:
|