创建Hbase Hive外部表报错: Unable to determine ZooKeeper ensemble

创建HBase的Hive外部表

  1: create external table ttt(rowkey string,info map<string,string>)STORED BY ‘org.apache.hadoop.hive.hbase.HBaseStorageHandler‘ WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,info:") TBLPROPERTIES ("hbase.table.name" = "lwg");

报错,提示无法获得Zookeeper集群地址

  1: hive> create external table ttt(rowkey string,info map<string,string>)STORED BY ‘org.apache.hadoop.hive.hbase.HBaseStorageHandler‘ WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,info:") TBLPROPERTIES ("hbase.table.name" = "lwg");
  2: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.io.IOException: Unable to determine ZooKeeper ensemble
  3:   at org.apache.hadoop.hbase.zookeeper.ZKUtil.connect(ZKUtil.java:120) #当连接Zookeeper时,抛异常无法获取zookeeper集群地址
  4:   at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:165)
  5:   at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:134)
  6:   at org.apache.hadoop.hbase.catalog.CatalogTracker.<init>(CatalogTracker.java:176)
  7:   at org.apache.hadoop.hbase.catalog.CatalogTracker.<init>(CatalogTracker.java:150)
  8:   at org.apache.hadoop.hbase.catalog.CatalogTracker.<init>(CatalogTracker.java:132)
  9:   at org.apache.hadoop.hbase.client.HBaseAdmin.getCatalogTracker(HBaseAdmin.java:229)
 10:   at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:277)
 11:   at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:293)
 12:   at org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:182)
 13:   at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:602)
 14:   at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:595)
 15:   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 16:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 17:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 18:   at java.lang.reflect.Method.invoke(Method.java:606)
 19:   at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:90)
 20:   at com.sun.proxy.$Proxy9.createTable(Unknown Source)
 21:   at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:670)
 22:   at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3959)
 23:   at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:295)
 24:   at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)
 25:   at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85)
 26:   at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1604)
 27:   at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1364)
 28:   at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1177)
 29:   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1004)
 30:   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:994)
 31:   at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:247)
 32:   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:199)
 33:   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:410)
 34:   at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:783)
 35:   at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
 36:   at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
 37:   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 38:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 39:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 40:   at java.lang.reflect.Method.invoke(Method.java:606)
 41:   at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

在Hive命令行环境下,指定Zookeeper配置,能够正常访问Zookeeper、HBase

  1: set hbase.zookeeper.quorum=zk1,zk2,zk3,zk4,zk5
  2: set zookeeper.znode.parent=/hbase # hbase在zookeeper上root node

将这两个参数加入到~/.hiverc,这样hive在启动的时候,会自动加载给配置

时间: 2024-10-10 06:00:36

创建Hbase Hive外部表报错: Unable to determine ZooKeeper ensemble的相关文章

hbase异常:java.io.IOException: Unable to determine ZooKeeper ensemble

项目中用到hbase,有时候可能会报一些异常,比如java.io.IOException: Unable to determine ZooKeeper ensemble 等等,当出现这个问题时,某某说是项目中用到线程池的问题导致的,但查看异常之后,并非跟啥线程池有关系,异常信息如下: java.io.IOException: Unable to determine ZooKeeper ensemble at org.apache.hadoop.hbase.zookeeper.ZKUtil.con

【原创】问题定位分享(16)spark写数据到hive外部表报错ClassCastException: org.apache.hadoop.hive.hbase.HiveHBaseTableOutputFormat cannot be cast to org.apache.hadoop.hive.ql.io.HiveOutputFormat

spark 2.1.1 spark在写数据到hive外部表(底层数据在hbase中)时会报错 Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.hbase.HiveHBaseTableOutputFormat cannot be cast to org.apache.hadoop.hive.ql.io.HiveOutputFormat at org.apache.spark.sql.hive.SparkHiveWrit

hive删除表报错:Specified key was too long; max key length&amp;nb

我是在hive删除表的时候出现这个错误的,看到这个错误应该就知道是字符集错误. 但是我用? alter database hive character set latin1; 这个命令将其改成拉丁之后还是不行,然后我想到是不是这次hive是重装的,然后还保留有上次存在的hive表结构等存在mysql的数据信息,所以果断将mysql里面的hive数据库删了,然后重新: create database hive; alter database hive character set latin1; 之

hive删除表报错

metastore.RetryingHMSHandler: HMSHandler Fatal error: javax.jdo.JDODataStoreException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFA

0015-如何使用Sentry管理Hive外部表权限

温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看. 1.文档编写目的 本文档主要讲述如何使用Sentry对Hive外部表权限管理,并基于以下假设: 1.操作系统版本:RedHat6.5 2.CM版本:CM 5.11.1 3.集群已启用Kerberos和Sentry 4.采用具有sudo权限的ec2-user用户进行操作 2.前置准备 2.1创建外部表数据父目录 1.使用hive用户登录Kerberos [[email protected] 1874-hive-HIVESERVER2]

Hadoop企业级完整训练:Rocky的16堂课(HDFS&amp;MapReduce&amp;HBase&amp;Hive&amp;Zookeeper&amp;Sqoop&amp;Pig&amp;Flume&amp;Project) - 0515

Hadoop是云计算的事实标准软件框架,是云计算理念.机制和商业化的具体实现,是整个云计算技术学习中公认的核心和最具有价值内容. 如何从企业级开发实战的角度开始,在实际企业级动手操作中深入浅出并循序渐进的掌握Hadoop是本课程的核心.   云计算学习者的心声: 如何从企业级开发的角度,不断动手实际操作,循序渐进中掌握Hadoop,直到能够直接进行企业级开始,是困惑很多对云计算感兴趣的朋友的核心问题,本课程正是为解决此问题而生,学习者只需要按照一步步的跟着视频动手操作,即可完全无痛掌握Hadoo

HIVE外部表 分区表

HIVE外部表 分区表    外部表        创建hive表,经过检查发现TBLS表中,hive表的类型为MANAGED_TABLE. 在真实开发中,很可能在hdfs中已经有了数据,希望通过hive直接使用这些数据作为表内容.        此时可以直接创建出hdfs文件夹,其中放置数据,再在hive中创建表管来管理,这种方式创建出来的表叫做外部表. #创建目录,上传已有文件        hadoop fs -mkdir /data        hadoop fs -put stude

expdp 导出sys用户下的表报错ORA-39165 和ORA-39166

同事在用expdp导出sys用户下的table,结果报错,全部的log 如下: [[email protected] ~]$ expdp sys/**** directory=exp_dir dumpfile=fga_log.dmp logfile=fga_log.log tables=fga_log$ Export: Release 11.2.0.3.0 - Production on Thu Jan 17 13:07:23 2014 Copyright (c) 1982, 2011, Ora

CentOS7图形界面启动报错unable to connect to X server

以前还可以正常启动图形界面,这次启动失败,报错unable to connect to X server 使用的是oracle用户,因为我是在oracle用户下创建的oracle数据库等 解决办法: 在/var/run/console/下touch oracle生成oracle文件,重新startx启动就可以了