取り敢えず下記のように変更したら繋がった
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.client.HTable;
public class HBaseNewConnector {
private Configuration conf;
private HTable hTable;
public void run() {
this.conf = new Configuration();
this.conf.set("hbase.zookeeper.quorum", "192.168.0.2"); ←取り敢えずMasterのIP
this.conf.set("hbase.zookeeper.property.clientPort", "2181");
try {
this.hTable = new HTable(this.conf, "Pokemon");
} catch (IOException e) {
e.printStackTrace();
}
try {
this.hTable.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
0 件のコメント:
コメントを投稿