Hive安装过程当中出现 The reference to entity "createDatabaseIfNotExist" must end with the ';' delimiter.问题,具体以下所示:java
[Fatal Error] hive-site.xml:132:95: The reference to entity "createDatabaseIfNotExist" must end with the ';' delimiter.mysql
14/10/23 11:15:04 FATAL conf.Configuration: error parsing conf file:/usr/local/apache-hive-0.13.1-bin/conf/hive-site.xmlsql
org.xml.sax.SAXParseException; systemId: file:/usr/local/apache-hive-0.13.1-bin/conf/hive-site.xml; lineNumber: 132; columnNumber: 95; The reference to entity "createDatabaseIfNotExist" must end with the ';' delimiter.apache
由于hive-site.xml中的javax.jdo.option.ConnectionURL配置项引发的,以下所示:编码
<property>spa
<name>javax.jdo.option.ConnectionURL</name>xml
<value>jdbc:mysql://localhost:3306/hive_hdp?characterEncoding=UTF-8&createDatabaseIfNotExist=true</value>ip
<description>JDBC connect string for a JDBC metastore</description>string
</property>it
正确配置以下:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive_hdp?characterEncoding=UTF-8&createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
这是由于xml文件中的编码规则引发的。
在xml文件中有如下几类字符要进行转义替换以下表所示:
因此javax.jdo.option.ConnectionURL项中的&符号须要用&表示。