Hplsql报错:...HiveSQLExpection:Error while compiling statement:No privilege 'Select' found for inputs {.....}
实践hplsql时,遇到的问题总结一下,若有不对的地方,欢迎交流。
一、Hplsql简介
hplsql的介绍详见:http://lxw1234.com/archives/2015/09/492.htm
二、hpsql的配置文件为hplsql-site.xml
2.1 常见的选项列表:
| hplsql.conn.default | 指定默认的连接配置文件,默认值为hive2conn |
| hplsql.conn.hive2conn | 指定HiveServer2JDBC连接 |
| hplsql.conn.init.hive2conn |
定义执行SQL语句连接后执行hive2conn 的一些默认设置,如:set system:user.name=mr; set hive.execution.engine=mr(mr为MapReduce,也可以设置为spark); |
| hplsql.conn.convert.hive2conn | 定义是否对即时SQL转换已启用hive2conn,默认为true |
| hplsql.conn.mysqlconn | 指定MySQL数据库的连接配置文件 |
2.2 对hplsql-site.xml配置
|
编辑hplsql-site.xml 修改或添加以下变量: <property> <name>hplsql.conn.default</name> <value>hive2conn</value> <description>The default connection profile</description> </property> <property> <name>hplsql.conn.init.hive2conn</name> <value>set system:user.name=mr;set hive.execution.engine=mr</value> </property> <property> <name>hplsql.conn.hive2conn</name> <value>org.apache.hive.jdbc.HiveDriver;jdbc:hive2://IPAddress:10000;username;password</value> <description>HiveServer2 JDBC connection</description> </property> |
三、执行报错
1)使用hplsql执行HPL/SQL语句,如下:
./hplsql -e "CURRENT_DATE+1"
正确显示时间;
2)运行 bin/beeline.sh,然后输入 !connect jdbc:hive2://IPAddress:10000;username;password;
发现连接成功。
3)执行的命令:
./hplsql -e "SELECT * FROM default.test LIMIT 10"
3.1 报错信息:...HiveSQLExpection:Error while compiling statement:No privilege 'Select' found for inputs {.....}
显示对表没有select权限。
分析过程:
1)使用命令vim hplsql脚本发现,该脚本主要是调用hive脚本;
2)查看hive脚本,发现脚本使用环境变量HIVE_CONF_DIR;
3)使用命令env|grep hive发现,环境变量HIVE_CONF_DIR未设置;
4)在/etc/profile中加入export HIVE_CONF_DIR=/etc/hive/conf(根据hplsql-site.xml路径指定)
3.2 报错信息:java.sql.SQLExpection:Could not open client transport with JDBC Uri:jdbc:hive2://localhost:10000:java.net.ConnetcExpection:拒绝连接
一般为hive-site.xml文件配置问题
分析过程:
1)检查端口10000是否启动
netstat -anp|grep
2)检查hive-site.xml配置
|
<configuration> |
注:IPAddress为hive服务对应的IP地址。
Hplsql报错:...HiveSQLExpection:Error while compiling statement:No privilege 'Select' found for inputs {.....}的更多相关文章
- HiveSQLException: Error while compiling statement: No privilege 'Create' found for outputs { database:default }
今天用Hive的JDBC实例时出现了HiveSQLException: Error while compiling statement: No privilege 'Create' found for ...
- [ThinkPHP]报错:Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in E:\wamp\www\jdlh\application\index\controller\Index.php on line
错误提示说命名空间声明语句必须是第一句,可我看就是第一句没毛病呀,这是为啥呢,后面发现<?php 前面有个空格,删掉就正常了 去掉空格之后页面能正常显示
- Hive 报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported here (state=42000,code=40000)
Hive报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported h ...
- JS function document.onclick(){}报错Syntax error on token "function", delete this token
JS function document.onclick(){}报错Syntax error on token "function", delete this token func ...
- 一个参数大小写引发的uploadify报错 "Syntax error, unrecognized expression: #"
上传控件uploadify 报错"Syntax error, unrecognized expression: #" 版本为 uploadify3.2 报错原因:参数ID[hi ...
- yum报错:Error: xz compression not available
测试服务器(centos6.5)经过一段时间的折腾,有一天在上面进行yum操作时突然出现下面的报错: Error: xz compression not available 最后经过一番排查,发现原因 ...
- yum报错: Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
在Centos 5.x或6.x上安装RHEL EPEL Repo repository,资源库,源的意思.RHEL EPEL(Extra Packages for Enterprise Linux) ...
- redis报错Windows error 0x70(a large memory)
redis报错Windows error 0x70 redis 嫌弃你内存不够了,就给你不开第二个实例. The Windows version of Redis allocates a large ...
- ASSERT报错:error C2664: “AfxAssertFailedLine”: 不能将参数 1 从“TCHAR []”转换为“LPCSTR”
转载请注明来源:崨雁嫀筝 http://www.cnblogs.com/xuesongshu 这个错误是我在把tinyxml修改为宽字符(Unicode)版本时候遇到的问题,我首先按关键字把所有有ch ...
随机推荐
- 关于jsp中引用css外部样式无效时的处理方法
今天做项目遇到的一个小问题,如下所示: <link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet ...
- Django数据库 相关之select_related/prefetch_related
- 性能相关 user_list = models.UserInfo.objects.all() for row in user_list: # 只去取当前表数据 select_related,主动连 ...
- [转载]GBK 汉字内码扩展规范编码表(1.0 版)
编码表源地址:http://ff.163.com/newflyff/gbk-list/ 编码在线查询:http://www.qqxiuzi.cn/bianma/zifuji.php GBK 汉字内码扩 ...
- Redis Jedis简介
Redis是一种基于内存类型的数据存储工具 Jedis是一个用java写的Redis数据库操作的客户端,通过Jedis,可以很方便的对redis数据库进行操作.Jedis通过Jedis Pool进行R ...
- 插件使用_kindeditor
1.官网 进入官网:http://kindeditor.net/demo.php 插件下载:http://kindeditor.net/down.php 2.使用 (1)文件夹说明 ├── asp a ...
- string类型和int类型之间的转换
一.string转int 1. 使用string流 /* 字符串转整型 */ /* * istringstream:从 string 读取数据 * ostringstream:向 string 写入数 ...
- VS AI 手写数字识别应用
看过我上一篇文章的朋友应该知道,我用VS训练出了minst模型.output目录中有.pb文件. 关于.pb文件的介绍见[参考链接] (https://stackoverflow.com/questi ...
- 软件工程第十周psp
1.PSP表格 2.进度条 3.饼状图 4.折线图
- 20172308 实验三《Java面向对象程序设计 》实验报告
20172308 2017-2018-2 <程序设计与数据结构>实验三报告 课程:<程序设计与数据结构> 班级: 1723 姓名: 周亚杰 学号:20172308 实验教师:王 ...
- sql索引的填充因子多少最好,填充因子有什么用
和索引重建最相关的是填充因子.当创建一个新索引,或重建一个存在的索引时,你可以指定一个填充因子,它是在索引创建时索引里的数据页被填充的数量.填充因子设置为100意味着每个索引页100%填满,50%意味 ...