hive-site.xml:元素类型“配置”必须由匹配的结束标记“”终止

时间:2017-05-06 18:28:17

标签: xml hadoop hive

我正在尝试在Ubuntu系统上安装Hive,以便练习/学习。我正在遵循一套预先写好的指示。它说通过转到$ HIVE_HOME并运行bin / hive来测试Hive安装。当我这样做时,我会得到一个相当大的文本转储,但我认为重要的一点如下:

**[Fatal Error] hive-site.xml:2787:3: The element type "configuration" must be terminated by the matching end-tag "</configuration>".
17/05/06 10:46: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 "</configuration>".**

我已经去了第2787行,它实际上是</configuration>标签。我没有编辑hive-site.xml中的任何标记。我唯一做的就是采取以下部分:

<property>
   <name>javax.jdo.option.ConnectionURL</name>
   <value>jdbc:derby:;databaseName=/usr/local/hive/metastore_db;create=true</value>
   <description>JDBC connect string for a JDBC metastore </description>
</property>

并将其更改为:

<property>
   <name>javax.jdo.option.ConnectionURL</name>
   <value>jdbc:derby://localhost:1527/metastore_db;create=true </value>
   <description>JDBC connect string for a JDBC metastore </description>
</property>

我只编辑了“value”标签之间的文本,而没有改变标签本身。也许格式不正确?任何帮助将不胜感激。

文件位于此处,如果有人想看一眼:

http://www.vaughn-s.net/hadoop/hive-site.xml

1 个答案:

答案 0 :(得分:0)

您在<property>

之前缺少<name>hive.mapjoin.optimized.hashtable</name>开头标记
<property>
  <name>hive.lazysimple.extended_boolean_literal</name>
  <value>false</value>
  <description>
    LazySiimpleSerde uses this properties to determine if it treats 'T', 't', 'F', 'f',
    '1', and '0' as extened, legal boolean literal, in addition to 'TRUE' and 'FALSE'.
    The default is false, which means only 'TRUE' and 'FALSE' are treated as legal
    boolean literal.
  </description>
</property>
  <name>hive.mapjoin.optimized.hashtable</name>
  <value>true</value>
  <description>Whether Hive should use memory-optimized hash table for MapJoin. Only works on Tez, because memory-optimized hashtable cannot be serialized.</description>
</property>