Добрый день! Пытаюсь освоить StreamingConnection в Hive по документации.
Ниже фрагмент кода программы:
public static void main(String[] args) throws SQLException, InterruptedException, ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed {
String dbName = "default";
String tblName = "alerts";
ArrayList<String> partitionVals = new ArrayList<String>(2);
partitionVals.add ("Asia");
partitionVals.add("India");
String serdeClass = "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe";
Connection conn = WorkWithHive.createconnection();
HiveEndPoint hiveEP = new HiveEndPoint("jdbc:hive2://hdp-ci-nmd1.dac.akb-it.ru:10000/default", dbName, tblName, partitionVals);
HiveConf conf = new HiveConf();
conf.addResource(new Path("C:\\dmp-project\\hive_jdbc_driver_maven\\src\\main\\resources\\hive-site1.xml"));
String agentinfo = new String("test");
StreamingConnection Connection = hiveEP.newConnection(true,conf, agentinfo);
Падает на строке StreamingConnection Connection = hiveEP.newConnection(true,conf, agentinfo); с следующей ошибкой:
Exception in thread "main" com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: Unable to instantiate org.apache.hive.hcatalog.common.HiveClientCache$CacheableHiveMetaStoreClient
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2263)
at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4789)
at org.apache.hive.hcatalog.common.HiveClientCache.getOrCreate(HiveClientCache.java:227)
at org.apache.hive.hcatalog.common.HiveClientCache.get(HiveClientCache.java:202)
at org.apache.hive.hcatalog.common.HCatUtil.getHiveMetastoreClient(HCatUtil.java:558)
at org.apache.hive.hcatalog.streaming.HiveEndPoint$ConnectionImpl.getMetaStoreClient(HiveEndPoint.java:545)
at org.apache.hive.hcatalog.streaming.HiveEndPoint$ConnectionImpl.<init>(HiveEndPoint.java:312)
at org.apache.hive.hcatalog.streaming.HiveEndPoint$ConnectionImpl.<init>(HiveEndPoint.java:278)
at org.apache.hive.hcatalog.streaming.HiveEndPoint.newConnectionImpl(HiveEndPoint.java:215)
at org.apache.hive.hcatalog.streaming.HiveEndPoint.newConnection(HiveEndPoint.java:192)
at org.apache.hive.hcatalog.streaming.HiveEndPoint.newConnection(HiveEndPoint.java:162)
at StrConnect.main(StrConnect.java:45)
Как ее лечить и что я делаю не так?
Продвижение своими сайтами как стратегия роста и независимости