hello guys, sorry to bother you.

I'm using hcatalog to write hive tables, but I don't know how to do with
namenode HA
my code was copied from
https://github.com/apache/hive/blob/master/hcatalog/core/src/test/java/org/apache/hive/hcatalog/data/TestReaderWriter.java

*below is my config:*

    hiveConf.setVar(HiveConf.ConfVars.HADOOPBIN, "/opt/modules/hadoop/bin");

    hiveConf.setVar(HiveConf.ConfVars.LOCALSCRATCHDIR, "/opt/modules/hive/
temp");

    hiveConf.setVar(HiveConf.ConfVars.DOWNLOADED_RESOURCES_DIR,
"/opt/modules/hive/temp");

    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);

    hiveConf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, "/warehouse");

    hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://
127.0.0.1:9083");

    hiveConf.setVar(HiveConf.ConfVars.METASTORE_CONNECTION_DRIVER,
"com.mysql.jdbc.Driver");

    hiveConf.setVar(HiveConf.ConfVars.METASTORECONNECTURLKEY, "jdbc:mysql://
192.168.5.29:3306/hive?createDatabaseIfNotExist=true");

    hiveConf.setVar(HiveConf.ConfVars.METASTORE_CONNECTION_USER_NAME,
"hive");

    hiveConf.setVar(HiveConf.ConfVars.METASTOREPWD, "123456");

    hiveConf.setVar(HiveConf.ConfVars.HIVEHISTORYFILELOC,
"/opt/modules/hive/temp");

*and the error is:*

Caused by: java.lang.IllegalArgumentException:
java.net.UnknownHostException: cluster

at
org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:374)

at
org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:312)

at
org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:178)

at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:665)

*Is anyone can help me? thank you !!!!*

Reply via email to