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 ...
随机推荐
- 记录一次redis故障
ResponseError: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persi ...
- Python20-Day03
##########文件操作相关########## 一.文件操作 文件就是操作系统提供给应用程序来操作硬盘虚拟概念,用户或应用程序通过操作文件,可以将自己的数据永久保存下来. 文件操作的流程: * ...
- django_models_Meta字段详解
Django模型类的Meta是一个内部类,它用于定义一些Django模型类的行为特性.而可用的选项大致包含以下几类 abstract 这个属性是定义当前的模型是不是一个抽象类.所谓抽象类是不会对应数据 ...
- jenkins配置01--用户添加及权限配置
原文出自:https://www.cnblogs.com/kevingrace/p/6019707.html 下面重点记录下jenkins安装后的一些配置: (1)添加用户权限 jenkins初次登陆 ...
- Beta周王者荣耀交流协会第五次Scrum会议
1. 立会照片 成员王超,高远博,冉华,王磊,王玉玲,任思佳,袁玥全部到齐. master:王磊 2. 时间跨度 2017年11月14日 19:00 — 19:50 ,总计50分钟. 3. 地点 一食 ...
- 第三次作业— C++计算器项目的初始部分
作业题目: C++计算器项目的初始部分 仓库 代码: Scan.h #ifndef SCAN_H #define SCAN_H #include<string> #include<i ...
- SpringMVC(四)-- springmvc的系统学习之文件上传、ajax&json处理
资源:尚学堂 邹波 springmvc框架视频 一.文件上传 1.步骤: (1)导入jar包 commons-fileupload,commons-io (2)在springmvc的配置文件中配置解析 ...
- mvc 路由配置-学习2
public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { r ...
- Unity3D游戏开发——物品存储:List与Dictionary
本篇简介 本文介绍如何将碰撞处理后的物体存储在管理器中,分别用到两种不同的数据结构--List和Dictionary.我们将继续在上一篇博客的编程基础上进行完善. List和Dictionary的区别 ...
- es6箭头函数的注意要点
具有一个参数的简单函数 var single = a => a single('hello, world') // 'hello, world' 没有参数的需要用在箭头前加上小括号 var lo ...