[英]Hive throws: WstxParsingException: Illegal character entity: expansion character (code 0x8)
I installed hadoop and hive following this tutorial. 我按照本教程安装了hadoop和hive。 The tutorial is outdated so I used the current versions.
该教程已过时,因此我使用了当前版本。 When I start hive I get the following error:
当我启动配置单元时,我收到以下错误:
hive SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8 at [row,col,system-id]: [3210,96,"file:.../software/apache-hive-3.1.0-bin/conf/hive-site.xml"] at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3003) at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2931) at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2806) at org.apache.hadoop.conf.Configuration.get(Configuration.java:1460) at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:4990) at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:5063) at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5150) at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:5093) at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97) at org.apache.hadoop.hive
hive SLF4J:实际绑定的类型为[org.apache.logging.slf4j.Log4jLoggerFactory]线程“main”中的异常java.lang.RuntimeException:com.ctc.wstx.exc.WstxParsingException:非法字符实体:扩展字符(代码0x8)在[row,col,system-id]:org.apache.hadoop的[3210,96,“file:... / software / apache-hive-3.1.0-bin / conf / hive-site.xml”]位于org.apache.hadoop.conf.confo.conf.:::::: org.apache.hadoop.conf.Configuration.getProps上的org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2931)中的.conf.Configuration.loadResource(Configuration.java:3003),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的org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5150)。(HiveConf.java) :5093)在org.apache.hadoop.hive上的org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97) .common.LogUtils.initHiveLog4j(LogUtils.java:81) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:699) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:318) at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
.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(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at 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)
I had a look at the specified file and found this entry: 我看了一下指定的文件,发现了这个条目:
<description>
Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks fortransactional tables. This ensures that inserts (w/o overwrite) running concurrently
are not hidden by the INSERT OVERWRITE.
</description>
I am running on Ubuntu 16.04, hive 3.1.0, derby 10.8.1.2, hadoop 3.1.1, Java: openjdk version "1.8.0_181" . 我正在运行Ubuntu 16.04,hive 3.1.0,derby 10.8.1.2,hadoop 3.1.1,Java:openjdk version“1.8.0_181”。 I added some lines to the file for configuration as outlined in the tutorial, though I did not touch this lines at all.
我在教程中添加了一些行文件以进行配置,但我根本没有触及这一行。 Do I have to download a different version of hive?
我是否必须下载不同版本的配置单元?
You have something like this in hive-site.xml
你在
hive-site.xml
有这样的东西
Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks for?transactional tables.
确保使用OVERWRITE(例如INSERT OVERWRITE)的命令获取?事务表的Exclusive锁。 This ensures that inserts (w/o overwrite) running concurrently are not hidden by the INSERT OVERWRITE.
这可确保INSERT OVERWRITE不会隐藏并发运行的插入(无覆盖)。
It is throwing that error, as there is a special character () between the words for and transactional . 它抛出了这个错误,因为在for和transactional之间有一个特殊的字符()。 Either delete that character or copy and paste (replace) which is in between
<description>
and </description>
. 删除该字符或复制并粘贴(替换)在
<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>
Remove Special charters at 3210,96 line and column and just re-run the hive. 删除3210,96行和列的特殊章程,然后重新运行配置单元。 [3210,96,"file:/usr/local/hive/conf/hive-site.xml"]
[3210,96, “文件:/usr/local/hive/conf/hive-site.xml”]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.