データを hbase に挿入しようとしています。以下のコードについて言及しました。
try {
Configuration conf = HBaseConfiguration.create();
conf.clear();
conf.set("hbase.zookeeper.quorum", "<HOST_IP>:2181");
conf.set("hbase.zookeeper.property.clientPort", "2181");
conf.set("hbase.zookeeper.dns.nameserver", "<HOST_IP>");
conf.set("hbase.regionserver.port","60020");
conf.set("hbase.master", "<HOST_IP>:9000");
HTable table = new HTable(conf, "test");
Put put = new Put(Bytes.toBytes("row5"));
put.add(Bytes.toBytes("colfam1"), Bytes.toBytes("qual1"),
Bytes.toBytes("val1"));
put.add(Bytes.toBytes("colfam1"), Bytes.toBytes("qual2"),
Bytes.toBytes("val2"));
table.put(put);
} catch (MasterNotRunningException e) {
e.printStackTrace();
} catch (ZooKeeperConnectionException e) {
e.printStackTrace();
} catch (TableNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
次のエラーが表示されます
zookeeper.ClientCnxnSocket: Connected to an old server; r-o mode will be unavailable.
コマンドプロンプトからは正常に動作しており、テーブルを作成してデータを追加できます。しかし、「JPS」を試したところ、次の出力が得られました。
15898 HRegionServer
15359 HMaster
14810 SecondaryNameNode
14616 DataNode
14909 JobTracker
15056 TaskTracker
15988 Jps
14487 NameNode
15302 HQuorumPeer