Connect to HBase running in Docker

前端 未结 2 1747
北荒
北荒 2021-02-14 14:11

I cannot connect to HBase running in Docker on Windows (banno/hbase-standalone image). However, I can connect to locally installed HBase.

banno/hbase-standalone image is

2条回答
  •  眼角桃花
    2021-02-14 14:17

    I used oddpoet/hbase-cdh5 docker image to avoid this issue.

    docker run -d -p 2181:2181 -p 60000:60000 -p 60010:60010 -p 60020:60020 -p 60030:60030 -h hbase oddpoet/hbase-cdh5
    

    fig.yml

    hbase:
        image: oddpoet/hbase-cdh5
        hostname: hbase
        ports:
         - "3181:2181"
         - "60000:60000"
         - "60010:60010"
         - "60020:60020"
         - "60030:60030"
    

    my configuration file

        conf.set("hbase.zookeeper.quorum", zkPath);
        conf.set("hbase.zookeeper.property.clientPort","2181");
        conf.set("zookeeper.znode.parent", "/hbase");
    
        conf.set("hbase.client.retries.number", "3");  // default 35
        conf.set("hbase.rpc.timeout", "10000");  // default 60 secs
        conf.set("hbase.rpc.shortoperation.timeout", "5000"); // default 10 secs
    

提交回复
热议问题