Hive beeline update
Hive cli vs beeline
The primary difference between the two involves how the clients connect to Hive.
The Hive CLI connects directly to the Hive Driver and requires that Hive be installed on the same machine as the client.
Beeline connects to HiveServer2 and does not require the installation of Hive libraries on the same machine as the client. Beeline is a thin client that also uses the Hive JDBC driver but instead executes queries through HiveServer2, which allows multiple concurrent client connections and supports authentication.
1.load data local inpath is not support in beeline.
Solution: a. we can use 'put' and 'load data inpath' to replace this command.
b. create these stage table as external table, then we just add new partitions and then just put file, not need load.
beeline -n username -u "jdbc:hive2://hiveserver:10000/dbname;principal=hive/hiveserve@domain"
run kinit before run beeline.
Echo 'password' | kinit
drop table evan_test2;
CREATE EXTERNAL TABLE evan_test2 (
userId BIGINT,
type INT,
filename String
)
COMMENT 'User Infomation'
PARTITIONED BY (country String)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE
LOCATION 'hdfs:////evan_test/';
alter table evan_test2 add partition(country='tet');
2.
INSERT OVERWRITE LOCAL DIRECTORY 'temp'
FIELDS TERMINATED BY ','
select * from evan_test2;
This is not support in beeline .
Solution: we can use beeline's new command to implement the same function.
beeline --showHeader=false --outputformat=dsv --delimiterForDSV=$'\001' -e 'select * from evan_test3' >test.csv
Show data test.csv
Cat -a test.csv
Cat -a test.csv | tr $'\001' '\t'
Hive beeline update的更多相关文章
- Hive Beeline 官方文档学习
Beeline 是什么? 它是一个命令行形式的jdbc客户端.搞Java开发的同学,看到这里就应该知道这货是什么了 ── 它是一个连接数据库的工具. 只不过Beeline连接的数据库是HiveServ ...
- hive beeline详解
Hive客户端工具后续将使用Beeline 替代HiveCLI ,并且后续版本也会废弃掉HiveCLI 客户端工具,Beeline是 Hive 0.11版本引入的新命令行客户端工具,它是基于SQLLi ...
- Hive Beeline 命令行参数
[hadoop@hive ~]$ beeline --help[中文版] The Beeline CLI 支持以下命令行参数: Option Description --autoCommit=[tru ...
- [转]Hive/Beeline 使用笔记
FROM : http://www.7mdm.com/1407.html Hive: 利用squirrel-sql 连接hive add driver -> name&example u ...
- 关于 HIVE Beeline 问题
1 启动 hiveserver2 服务,启动 beeline -u jdbc:hive2:// 正常 ,启动 beeline -u jdbc:hive2://127.0.0.1:10000 包如下错 ...
- hive Beeline plus HiveServer2简单使用
HiveServer2是经常与beeline一起使用,可以用jdbc客户端远程连接,一般用于生产环境. 在提供传统客服端的功能之外,还提供其他功能: Beeline连接 1.先在hadoop集群启动H ...
- HIve:beeline终端上在输错hive语句时,无论 Backspace还是delete 都删除不掉错误的语句,没有办法退格
通过SecureCRT工具连上linux后,通过beeline连接上hive后,在输错hive语句时,无论 Backspace还是delete 都删除不掉错误的语句,没有办法退格. 解决方案: 第一步 ...
- hive orc update
hive-site.xml --><configuration> <!-- WARNING!!! This file is auto generated for documen ...
- hive & hive beeline常用参数
Hive 1参数如下: usage: hive -d,--define <key=value> Variable substitution to apply to Hive command ...
随机推荐
- 测试驱动开发(TDD)的思考
极限编程 敏捷开发是一种思想,极限编程也是一种思想,它与敏捷开发某些目标是一致的.只是实现方式不同.测试驱动开发是极限编程的一部分. 1.极限编程这个思路的来源 Kent Beck先生最早在其极限编程 ...
- SQL Server SQL语句执行顺序
执行顺序: 1.FROM:对FROM子句中前两个表执行笛卡尔积生成虚拟表vt1 2.ON:对vt1表应用ON筛选器只有满足 为真的行才被插入vt2 3.OUTER(join):如果指定了 OUTER ...
- jQuery UI resizble、draggable的div包含iframe导致缩放和拖拽的不平滑解决方法
前言 不仅仅是jQuery UI resizble的div包含iframe会导致缩放的不平滑,draggable也会出现包含iframe会导致拖放的不平滑,但是因为jQuery UI有为draggab ...
- Javascript一些小细节
1.判断class存在 $(obj).hasClass('BTCheck_ON') $obj.attr('class')=="BTCheck_ON" 有时我们判断样式存在会写成第二 ...
- 微信支付redirect_uri参数错误
在做微信支付的时候,点击提交,出现“redirect_uri参数错误”.经过查找,需要在后台正确设置授权域名.大致步骤如下:1.首先登录微信公众号管理后台2.点击开发者中心3.找到 网页账号—> ...
- IOS 开发一些常用的地址
1.开发者中心 https://developer.apple.com/membercenter/index.action 2.itunesconnect https://itunesconnect. ...
- [Android]编译错误:Could not get unknown property 'release' for SigningConfig container
使用Gradle进行安卓编译时,出现如下错误: Could not get unknown property 'release' for SigningConfig container. 原因: 在主 ...
- 【读书笔记】iOS-GCD-系统提供的dispatch方法
系统提供的dispatch方法如下: //系统提供的dispatch方法 //后台执行: dispatch_async(dispatch_get_global_queue(0, 0), ^{ // s ...
- MyBatis入门(七)---逆向工程
一.逆向工程 1.1.概述 mybatis需要程序号自己编写的SQL. mybatis官方提供了逆向工程,可以针对单表自动生成mybatis执行所需要的代码 (mapper,java,maper.xm ...
- JAVA基础学习day23--GUI基础
一.GUI概述 1.1.GUI概述 Graphical User Interface(图形用户接口) 用图形的方式,来显示计算机操作的界面, CLI: Command line User Interf ...