# Set HADOOP_HOME to point to a specific hadoop install directory HADOOP_HOME=/home/bigdata/services/hadoop-2.6.4 # Hive Configuration Directory can be controlled by: export HIVE_CONF_DIR=/home/bigdata/services/apache-hive-2.1.0-bin/conf
<configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://hdfs1:3306/hive?createDatabaseIfNotExist=true</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>bigdata<value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>123456789vs</value> <description>password to use against metastore database</description> </property> </configuration>
org.datanucleus.store.rdbms.exceptions.MissingTableException: Required table missing : “`VERSION`” in Catalog “” Schema “”. DataNucleus requires this table to perform its persistence operations. Either your MetaData is incorrect, or you need to enable “datanucleus.schema.autoCreateTables”
需修改Master节点的hive.site.xml文件的如下配置:
hive.site.xml
1 2 3 4 5
<property> <name>datanucleus.schema.autoCreateAll</name> <value>true</value> <description>creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once</description> </property>
服务成功运行后就可以使用hive命令进入客户端操作,执行hive命令出现如下错误
1
Exception in thread “main” java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
<property> <name>hive.exec.local.scratchdir</name> <value>/tmp/hive/iotmp</value> <description>Local scratch space for Hive jobs</description> </property> <property> <name>hive.downloaded.resources.dir</name> <value>/tmp/hive/iotmp/download</value> <description>Temporary local directory for added resources in the remote file system.</description> </property>