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 ...
随机推荐
- JQ关于浏览器宽高的获取方式
JQ关于浏览器宽高的获取方式 alert($(window).height()); //浏览器时下窗口可视区域高度alert($(document).height()); //浏览器时下窗口文档的高度 ...
- Python调用C的SDK出现返回值不符合预期以及Segmentation fault
1.sdk返回值不是int型 1.1 登录函数调用 def login(ip, port, username, password, device_info, error_code):"&qu ...
- Linux下建立Nexus私服
Linux下建立Nexus私服 要安装3个东西,然后配置私服: 1.JDK 2.Maven 3.Nexus 然后配置 1.JDK的安装 下载JDK安装包,格式为RPM格式,安装即可 安装程序 #rpm ...
- zeromq 学习和python实战
参考文档: 官网 http://zeromq.org/ http://www.cnblogs.com/rainbowzc/p/3357594.html 原理解读 zeromq只是一层针对socke ...
- restful架构的理解
资源的表现层状态转化. 简单的理解即: 1 URI对应一种"资源". 2 客户端与服务端传输资源的某种"表现层". 3 客户端通过HTT ...
- css3属性小结
/*border-radius*/ .demo2{ border:2px solid #a1a1a1; padding:10px 40px; background:#dddddd; width:300 ...
- SharePoint 2013 内容部署功能简介
在之前的项目中,当客户有新的需求的时候,我们通常在测试环境上开发或者实施,然后手动在生产环境再弄一次.当发现内容部署这个东西,才知道这样是多么不合理的.我们可以创建两个网站集,一个用来修改,然后通过计 ...
- JAVA EE(简述)
一.平台概述 JavaEE的全称是Java Enterprise Edition,它是一个开发分布式企业级应用的规范和标准 Java 平台三个版本: Java ME(Java Micro Edit ...
- iOS 解决表单被键盘遮住的问题
问题 处理表单的时候,一定会碰到的就是输入控件被键盘遮住的问题,如图: 实例 左边是普通表单,中间是2B表单,右边是文艺表单. 分析 处理这种问题无非就是2个步骤: 键盘弹出时,缩小UITableVi ...
- Android性能优化(一)
Android性能优化典范 1.大多数用户感知到的卡顿等性能问题的最主要根源都是因为渲染性能. 从设计师的角度,他们希望App能够有更多的动画,图片等时尚元素来实现流畅的用户体验. 但是Android ...