Tag: hbase playframework 2.2

无法连接到Docker实例中的HBase

我创build了一个在Docker容器上运行的HBase实例。 我已经能够使用Docker容器的bash shell从HBase Shell中创build一个表,并且能够从HBase Rest API访问它。 但是我无法使用Scala从Play框架访问它,我经常会遇到以下exception。 MasterNotRunningException |com.google.protobuf.ServiceException: java.net.UnknownHostException: unknown host: 238b057263fb 这是抛出exception的Scala代码。 val config = HBaseConfiguration.create() var hbaseRunning = false; config.clear config.set("hbase.zookeeper.quorum", "172.18.0.2"); // This ip Address was retrieved by doing a docker inspect on the docker container config.set("hbase.zookeeper.property.clientPort","2181") config.set("hbase.master", "172.18.0.2:60000"); config.setInt("timeout", 25000); try{ println(" Check if HBase is Running") HBaseAdmin.checkHBaseAvailable(config); // This […]