关键词:

hive创建表卡住了

创建hive和hbase关联表卡住了

其实针对这一问题在info级别的日志下是看出哪里有问题的(为什么只能在debug下才能看见呢,不太理解开发者的想法)。

以调试模式进入hive客户端:

hive --hiveconf hive.root.logger=DEBUG,console

执行创建关联表的语句

create table IF NOT EXISTS event_content_temp
(id string,pack string,activity string,title string, sx string, dx string, num bigint)
stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
with serdeproperties ("hbase.columns.mapping" = ":key,cf:pack,cf:activity,cf:title,cf:sx,cf:dx,cf:num")
tblproperties ("hbase.table.name" = "event_content_temp");

显示错误日志:

// :: INFO util.RetryCounter: Sleeping 4000ms before retry #...
// :: INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:. Will not attempt to authenticate using SASL (java.lang.SecurityException: Unable to locate a login configuration)
// :: WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:)
// :: DEBUG zookeeper.ClientCnxnSocketNIO: Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:)
at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:)
// :: DEBUG zookeeper.ClientCnxnSocketNIO: Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:)
at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:)
Interrupting... Be patient, this might take some time.
// :: INFO CliDriver: Interrupting... Be patient, this might take some time.

很显然是zookeeper的问题,可是在ClouderaManager中已经设置了呀,核对之后发现只有Hive Service Configuration Safety Valve for hive-site.xml里加了属性

<property>
<name>hive.aux.jars.path</name>
<value>
file:///opt/cloudera/parcels/CDH-4.7.1-1.cdh4.7.1.p0.47/lib/hive/lib/hive-hbase-handler-0.10.0-cdh4.7.1.jar,
file:///opt/cloudera/parcels/CDH-4.7.1-1.cdh4.7.1.p0.47/lib/hive/lib/hbase.jar,
file:///opt/cloudera/parcels/CDH-4.7.1-1.cdh4.7.1.p0.47/lib/hive/lib/zookeeper.jar
</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>ip-xxx.cn-north-.compute.internal:,ip-xxxx.cn-north-.compute.internal:,ip-xxxx-.cn-north-.compute.internal:,ip-xxxx-.cn-north-.compute.internal:,ip-xxxx.cn-north-.compute.internal:</value>
</property>

Hive Client Configuration Safety Valve for hive-site.xml里没有添加,这里很好理解,hive服务里配置了hbase的zk,但是hive客户端没有配置(hive-site.xml),建议二者配置一致!

配置完之后,对于关联表的操作都可以顺利完成。

总结:建议hive服务端和客户端的hive-site.xml一样

另外,我建了个QQ群:305994766,希望对大数据、算法研发、系统架构感兴趣的朋友能够加入进来,大家一起学习,共同进步(进群请说明自己的公司-职业-昵称)

hadoop系列 第二坑: hive hbase关联表问题的更多相关文章

  1. JPA 系列教程10-双向一对一关联表

    双向一对一关联表的ddl语句 CREATE TABLE `t_person` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(255 ...

  2. hadoop系列 第一坑: hdfs JournalNode Sync Status

    今天早上来公司发现cloudera manager出现了hdfs的警告,如下图: 解决的思路是: 1.首先解决简单的问题,查看警告提示的设置的阀值时多少,这样就可以快速定位到问题在哪了,果然Journ ...

  3. Mybatis系列(三):Mybatis实现关联表查询

    原文链接:http://www.cnblogs.com/xdp-gacl/p/4264440.html 一.一对一关联 1.1.提出需求 根据班级id查询班级信息(带老师的信息) 1.2.创建表和数据 ...

  4. hive on hbase 数据表关联

    有时,数据可以容易的存储在hive中,但是要导入到hbase里,可以不用写MR程序来操作,可以使用hive on hbase方式来创建相应的表关联关系来将hive中的数据导入到对应的hbase的表里, ...

  5. 二十、Hadoop学记笔记————Hive On Hbase

    Hive架构图: 一般用户接口采用命令行操作, hive与hbase整合之后架构图: 使用场景 场景一:通过insert语句,将文件或者table中的内容加入到hive中,由于hive和hbase已经 ...

  6. Spark访问与HBase关联的Hive表

    知识点1:创建关联Hbase的Hive表 知识点2:Spark访问Hive 知识点3:Spark访问与Hbase关联的Hive表 知识点1:创建关联Hbase的Hive表 两种方式创建,内部表和外部表 ...

  7. 创建Hive/hbase相关联的表异常

    hive> CREATE TABLE hperson(id string, name string,email string) STORED BY 'org.apache.hadoop.hive ...

  8. 创建hive与hbase关联的hive表与hbase表

    创建hive与hbase的关联表 create external table hive_hbase(rowkey string,name string,addr string,topic string ...

  9. 大数据学习系列之九---- Hive整合Spark和HBase以及相关测试

    前言 在之前的大数据学习系列之七 ----- Hadoop+Spark+Zookeeper+HBase+Hive集群搭建 中介绍了集群的环境搭建,但是在使用hive进行数据查询的时候会非常的慢,因为h ...

随机推荐

  1. Kafka文件存储机制那些事

    Kafka是什么 Kafka是最初由Linkedin公司开发,是一个分布式.分区的.多副本的.多订阅者,基于zookeeper协调的分布式日志系统(也可以当做MQ系统),常见可以用于web/nginx ...

  2. [译]初试C# 8.0

    原文地址: https://blogs.msdn.microsoft.com/dotnet/2018/12/05/take-c-8-0-for-a-spin/ 初试C# 8.0 昨天我们宣布了Visu ...

  3. [NOI 2017]整数

    Description 题库链接 P 博士将他的计算任务抽象为对一个整数的操作. 具体来说,有一个整数 \(x\) ,一开始为 \(0\) . 接下来有 \(n\) 个操作,每个操作都是以下两种类型中 ...

  4. /proc文件系统(一):cpuinfo

    0. 前言 /proc 文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间. 它以文件系统的方式为内核与进程提供通信的接口.用户和应用程序可以通过/proc得到系统的信息,并可以改变内核的某 ...

  5. 《深入理解Java虚拟机:JVM高级特性与最佳实践》读书笔记

    第一部分 走进Java 一.走进Java 1.概述 java广泛应用于嵌入式系统.移动终端.企业服务器.大型机等各种场合,摆脱了硬件平台的束缚,实现了“一次编写,到处运行”的理想 2.java技术体系 ...

  6. 【Java基础】4、java中的内部类

    内部类的分类:常规内部类.静态内部类.私有内部类.局部内部类.匿名内部类. 实例1:常规内部类 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 ...

  7. What are the differences between a pointer variable and a reference variable in C++?

    Question: I know references are syntactic sugar, so code is easier to read and write. But what are t ...

  8. 网页三剑客:HTML+CSS+JavaScript 之 HTML的概述

    HTML(超文本标记语言) 什么是HTML? HTML 是用来描述网页的一种语言. HTML 指的是超文本标记语言: HyperText Markup Language HTML 不是一种编程语言,而 ...

  9. CSS 3D transforms

    https://www.creativebloq.com/css3/20-stunning-examples-css-3d-transforms-11112759 https://github.com ...

  10. 【代码笔记】Web-ionic checkbox(复选框)

    一,效果图. 二,代码. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...