hive-env.sh

添加

HADOOP_HOM=E/usr/local/apps/hadoop

export HIVE_CONF_DIR=/usr/local/apps/hive/conf

export HIVE_AUX_JARS_PATH=/usr/local/apps/hive/lib

hive.site.xml

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
<?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>

<value>123456</value>
</property>
<property>
<name>datanucleus.readOnlyDatastore</name>
<value>false</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>false</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.schema.autoCreateAll</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateColumns</name>
<value>true</value>
</property>
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
<!– 显示表的列名 –>
<property>
<name>hive.cli.print.header</name>
<value>true</value>
</property>
<!– 显示数据库名称 –>
<property>
<name>hive.cli.print.current.db</name>
<value>true</value>
</property>
</configuration>

发表评论

电子邮件地址不会被公开。 必填项已用*标注