You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/07/19 09:43:11 UTC

[GitHub] [iceberg] lordk911 opened a new issue #2839: iceberg.flink.TableLoader from hive , can't resolve hdfs nameservice

lordk911 opened a new issue #2839:
URL: https://github.com/apache/iceberg/issues/2839


   I'm tring to write data using DataStream api, which the table was created by spark with catalog.type=hive.
   My hdfs cluster was configed HA.
   But when I run my code in IDEA, I got ERROR: **Caused by: java.net.UnknownHostException: nsdev**
   
   this is my code:
   ```
   Map hiveMetaInfo = new HashMap();
   hiveMetaInfo.put("uri", "thrift://host-10-0-105-244:9083,thrift://host-10-0-105-248:9083");
   hiveMetaInfo.put("warehouse", "hdfs://host-10-0-105-244:8020/warehouse/tablespace/managed/hive/");
   
   Configuration conf = new Configuration(false);
   conf.set("fs.defaultFS", "hdfs://nsdev");
   conf.set("dfs.ha.namenodes.nsdev", "nn1,nn2");
   conf.set("dfs.internal.nameservices", "nsdev");
   conf.set("dfs.namenode.rpc-address.nsdev.nn1", "host-10-0-105-248:8020");
   conf.set("dfs.namenode.rpc-address.nsdev.nn2", "host-10-0-105-244:8020");
   
   TableLoader loader = TableLoader.fromCatalog(CatalogLoader.hive("hive_catalog",conf,hiveMetaInfo),TableIdentifier.of("test.radius_log"));
   ```
   I also tried to config the environment variable :HADOOP_CONF_DIR
   
   both dosn't work.
   How to resolve it? thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org