问题

配置完hive,运行遇到以下问题

hive-site.xml:2787:3: The element type "configuration" must be terminated by the matching end-tag "</configuration>

现象

详细的输出是

“`xml
[Fatal Error] hive-site.xml:2787:3: The element type “configuration” must be terminated by the matching end-tag “”.
17/04/01 18:03:12 FATAL conf.Configuration: error parsing conf file:/usr/local/hive/conf/hive-site.xml
org.xml.sax.SAXParseException; systemId: file:/usr/local/hive/conf/hive-site.xml; lineNumber: 2787; columnNumber: 3; The element type “configuration” must be terminated by the matching end-tag “”.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2325)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2313)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2381)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2347)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2254)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1081)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1526)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:1471)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:649)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Exception in thread “main” java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/usr/local/hive/conf/hive-site.xml; lineNumber: 2787; columnNumber: 3; The element type “configuration” must be terminated by the matching end-tag “”.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2490)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2347)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2254)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:1081)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1526)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:1471)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:649)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: org.xml.sax.SAXParseException; systemId: file:/usr/local/hive/conf/hive-site.xml; lineNumber: 2787; columnNumber: 3; The element type “configuration” must be terminated by the matching end-tag “”.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2325)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2313)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2381)
… 14 more
““

解决方案

line 2783后面,官方模板缺少一个

<property>
GitHub 加速计划 / eleme / element
54.06 K
14.63 K
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:2 个月前 )
c345bb45 6 个月前
a07f3a59 * Update transition.md * Update table.md * Update transition.md * Update table.md * Update transition.md * Update table.md * Update table.md * Update transition.md * Update popover.md 7 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐