蜂巢引发:WstxParsingException:非法字符实体:扩展字符(代码0x8)

时间:2018-10-12 16:10:08

标签: hadoop hive

我按照this教程安装了hadoop和hive。该教程已过时,因此我使用了当前版本。当我启动配置单元时,出现以下错误:

  

蜂巢   SLF4J:实际绑定类型   [org.apache.logging.slf4j.Log4jLoggerFactory]线程中的异常   “主要” java.lang.RuntimeException:   com.ctc.wstx.exc.WstxParsingException:非法字符实体:   扩展字符([row,col,system-id]处的代码0x8:   [3210,96,“文件:... / software / apache-hive-3.1.0-bin / conf / hive-site.xml”]     在   org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3003)     在   org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2931)     在   org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2806)     在org.apache.hadoop.conf.Configuration.get(Configuration.java:1460)     在org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:4990)     在org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:5063)     在   org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5150)     在org.apache.hadoop.hive.conf.HiveConf。(HiveConf.java:5093)     在   org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97)     在   org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:81)     在org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:699)处   org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)在   sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)位于   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)在   org.apache.hadoop.util.RunJar.run(RunJar.java:318)在   org.apache.hadoop.util.RunJar.main(RunJar.java:232)

我查看了指定的文件并找到以下条目:

<description>
  Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks for&#8;transactional tables.  This ensures that inserts (w/o overwrite) running concurrently
  are not hidden by the INSERT OVERWRITE.
</description>

我正在Ubuntu 16.04,hive 3.1.0,derby 10.8.1.2,hadoop 3.1.1,Java上运行:openjdk版本“ 1.8.0_181” 。我已按照本教程中的概述在文件中添加了一些行以进行配置,尽管我根本没有涉及到这些行。我是否需要下载其他版本的Hive?

2 个答案:

答案 0 :(得分:9)

您在hive-site.xml

中有类似的内容
  

    确保带有OVERWRITE的命令(例如INSERT OVERWRITE)获得事务表的互斥锁。这确保插入(不覆盖)并发运行     不会被INSERT OVERWRITE隐藏。   

引发该错误,因为 for transactional 一词之间有一个特殊字符() >。要么删除该字符,要么复制并粘贴(替换)介于<description></description>之间的字符。

<description>
     Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks for 
     transactional tables. This ensures that inserts (w/o overwrite) running concurrently
     are not hidden by the INSERT OVERWRITE.
</description>

答案 1 :(得分:0)

删除3210,96行和列处的特殊宪章,然后重新运行配置单元。 [3210,96,“文件:/usr/local/hive/conf/hive-site.xml”]