
hive
Joy CR
欢迎关注我的公众号: 小秋的博客
https://blog.youkuaiyun.com/xiaoqiu_cr
https://github.com/crr121
https://segmentfault.com/u/chenrong_flying
联系邮箱:rongchen633@gmail.com
展开
-
启动hive出现 org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyExceptio
启动hive出现standbyexception:Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not support...原创 2018-08-19 11:22:28 · 5431 阅读 · 2 评论 -
加载表数据的时候一定要注意分隔符一致
创建表的时候使用的字段分隔符和加载的文本数据里面的分隔符一致,否则加载到表里面的数据为NULLps:创建表结构,使用逗号为字段分隔符。hive> create table order_info(oid int,oname string,price int,cid int) row format delimited fields terminated by ',' stored ...原创 2018-09-03 21:15:58 · 503 阅读 · 0 评论 -
hive实现单词统计
参考博客:一个hive小案例:使用HIVE进行单词统计, 并把结果存入mysql问题:统计客户某个年龄有多少人客户表信息hive> desc customer_info;OKid intname stringage intTime taken: 0.2...原创 2018-09-03 11:20:50 · 1388 阅读 · 0 评论 -
hive-事务
参考:hive-事务支持背景介绍在0.13.0版本之前,hive只能进行块级事务的操作,由于hive是基于HDFS的操作,所以都是以块为单位进行存储继0.13.0版本之后,hive开始支持事务处理,也就是说hive可以支持以行为单位的原子性操作,以及具有acid的特性(atmoic原子性 consistency 一致性 isolation 隔离性 durability 永久性)hiv...原创 2018-09-04 17:02:28 · 325 阅读 · 0 评论 -
hive-连接查询
内连接查询hive> select * from customer as c , orderInfo as o where c.id = o.cid;11 tom1 1 cc price1 1112 tom2 2 dd price2 1212 tom2 3 ss p...原创 2018-08-28 17:21:14 · 478 阅读 · 0 评论 -
hive初始化元数据 Access denied for user 'xiaoqiu'@'%' to database 'hive_metastore'
[xiaoqiu@s150 /soft/hive/conf]$ schematool -initSchema -dbType mysqlSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/soft/apache-hive-2.3.3-bin/lib/log4j-slf4j-...原创 2018-08-19 11:24:53 · 1978 阅读 · 2 评论 -
beeline执行insert命令时报错Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn":xiao
0: jdbc:hive2://localhost:10000/cr> insert into student values(4,'sunny');WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different ...原创 2018-08-19 11:25:37 · 3810 阅读 · 1 评论 -
hive创建桶表
创建桶表hive> create table house_1(id int,name string,age int) clustered by (id) into 3 buckets row format delimited fields terminated by ',';查看表详细信息hive> desc formatted house_1;OK# col_name...原创 2018-08-19 11:26:15 · 1951 阅读 · 0 评论 -
hive创建表-加载表数据-创建分区表
创建表(条件之间不能有逗号 fields terminated by ',' 字段之间以逗号分隔)0: jdbc:hive2://localhost:10000/cr> create table if not exists teacher(id int,name string, age int) comment 'teacher' row format delimite...原创 2018-08-19 11:26:05 · 887 阅读 · 0 评论 -
beeline连接数据库报错Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/cr: java.n
beeline> !connect jdbc:hive2://localhost:10000/crConnecting to jdbc:hive2://localhost:10000/crEnter username for jdbc:hive2://localhost:10000/cr:Enter password for jdbc:hive2://localhost:10000/...原创 2018-08-19 11:25:55 · 13250 阅读 · 4 评论 -
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
2018-08-06T13:40:10,699 ERROR [41e6cbb7-d859-4b90-8375-c9808c786abc main] metastore.RetryingHMSHandler: Retrying HMSHandler after 2000 ms (attempt 9 of 10) with error: javax.jdo.JDOFatalDataStoreExce...原创 2018-08-19 11:24:25 · 426 阅读 · 0 评论 -
java.net.ConnectException: Call From s150/192.168.109.150 to s153:8020 failed on connection
java.net.ConnectException: Call From s150/192.168.109.150 to s153:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/had...原创 2018-08-19 11:24:16 · 939 阅读 · 0 评论 -
hive执行insert语句时报错
错误提示如下:FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTaskMapReduce Jobs Launched:Stage-Stage-1: HDFS Read: 0 HDFS Write: 0 FAILresolution:修改yarn-site.xml...原创 2018-08-19 11:24:07 · 5081 阅读 · 0 评论 -
hive的访问:通过JDBC远程连接hive数据仓库
hive的访问:终端访问 远程访问终端访问:安装hive,利用shell脚本访问 不可并发访问远程访问:通过JDBC连接数据仓库 支持并发访问启动hiveserver2服务:查看该命令可知hiveserver2,等价于hive --service hiveserver2 &[xiaoqiu@s150 /soft/hive/bin]$ cat hiveserver2#...原创 2018-08-19 11:25:46 · 10837 阅读 · 0 评论 -
hive learing_1
1、什么是hivehive是基于Hadoop的一种数据库仓库工具,将结构化数据映射为一张数据表,并提供SQL查询,分析等功能2、hive的特点将数据结构(shema)存储在数据库中,数据存储在HDFS中 适用于联机分析处理(OLAP:on-line analytic process) 支持HQL查询3、hive的缺点不支持关系数据库 不支持联机事务处理(OLTP:on-li...原创 2018-08-19 11:22:11 · 252 阅读 · 0 评论 -
在hive中执行sql语句:SemanticException org.apache.hadoop.hive.ql.metadata.HiveException:
hive> show databases;FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMe...原创 2018-08-19 11:21:52 · 35987 阅读 · 18 评论 -
hive的排序方式的比较
order by :全排序 ,所有的任务分配在一个reduce上面,将会花费大量的时间,可以保证全局有序同时还需要设置下面两个参数:hive> set sethive.strict.checks.large.query=false;#大规模查询的检查为falsehive> set hive.mapred.mode=nonstrict;#mapreduce的模式为非严格#一部...原创 2018-09-03 22:10:43 · 1045 阅读 · 0 评论