簡體   English   中英

HBase:主服務器未運行異常(HDP沙盒)

[英]HBase : Master Not Running Exception (HDP SandBox)

我正在嘗試編寫Java客戶端,以從我的mac客戶端訪問HBase到在VM中運行的HBASE服務器。 (HDP沙盒2.2)。 這是我正在使用的代碼。 我看到了類似的帖子,但是這些答案都無法解決我的問題。 我驗證了HBASE在VM中運行,並且可以使用HBASE Shell訪問和創建表。

 {
    try
    {
        System.out.println( "HBase Client!" );
        Configuration conf = HBaseConfiguration.create();
        conf.clear();
        conf.set("hbase.master", "192.168.240.131:6000");
        conf.set("hbase.zookeeper.quorum", "192.168.240.131");
        conf.set("hbase.zookeeper.property.clientPort", "2181");
        HBaseAdmin.checkHBaseAvailable(conf);
        System.out.println("HBase running !");
    }
    catch(Exception e)
    {
        System.out.println("HBase not running !");
    }

}

我驗證了IP和ports,根據HBASE-site.xml,一切都正確。

任何幫助表示贊賞!

hbase.zookeeper.quorum應該是主機名,而不是IP地址。 在主機文件中設置該映射,並在配置中使用主機名。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM