Hive Hql配置单元2无法使用Hql jdbc设置auxpath
参考: 我将jar放在两个节点共享的HDFS上。奇怪的是,当我从一个蜂箱移动到另一个蜂箱2时,以下各项停止工作: stmt.executeset hive.aux.jars.path=/users/myHDFSPath 现在它似乎已经停止工作了,请帮忙 这是我的代码: Class.forNameorg.apache.hive.jdbc.HiveDriver; org.apache.hadoop.conf.conf=new org.apache.hadoop.conf.conf; System.setPropertyHADOOP_用户名,rootHive Hql配置单元2无法使用Hql jdbc设置auxpath,hive,hiveql,cloudera-cdh,Hive,Hiveql,Cloudera Cdh,参考: 我将jar放在两个节点共享的HDFS上。奇怪的是,当我从一个蜂箱移动到另一个蜂箱2时,以下各项停止工作: stmt.executeset hive.aux.jars.path=/users/myHDFSPath 现在它似乎已经停止工作了,请帮忙 这是我的代码: Class.forNameorg.apache.hive.jdbc.HiveDriver; org.apache.hadoop.conf.conf=new org.apache.hadoop.conf.conf; System.
Connection conn1=DriverManager.getConnection("jdbc:hive2://hostname:10000/default","", "");
System.out.println("connection done");
final HiveConf hiveConf = new HiveConf(SessionState.class);
;
/* String auxJars = HiveConf.getVar(conf, HiveConf.ConfVars.HIVEAUXJARS);
ClassLoader loader = Utilities.addToClassPath(hiveConf.getClassLoader(), StringUtils.split(auxJars, ","));*/
Statement stmt=conn1.createStatement();
stmt.execute("set hive.aux.jars.path=hdfs:/users/MyJars/MySerde");
String createQry="create external Table sample1_new" +
" ( Field0 STRING, Field1 STRING, Field2 STRING, Field3 STRING, Field4 STRING ) " +
" row format serde 'com.bizo.hive.serde.csv.MySerde' WITH SERDEPROPERTIES " +
" ( 'separatorChar' = '#' , 'quoteChar'= '\'') location '/users/sampleFile'";
stmt.execute(createQry);
你说的蜂巢和蜂巢2到底是什么意思?HiveCLI和Beeline?HiveServer2在哪个主机上运行?它是否与运行Hive CLI的边缘节点具有完全相同的Hadoop conf文件?您是否尝试过完全合格的HDFS路径,例如。hdfs://hostel:666/users/some/where?