阅读量:2
第1关:Hive的安装与配置
在修改 conf 下面的hive-site.xml
文件这里,题目给的信息是错误的,正确的内容如下:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <!-- WARNING!!! This file is auto generated for documentation purposes ONLY! --> <!-- WARNING!!! Any changes you make to this file will be ignored by Hive. --> <!-- WARNING!!! You must make your changes in hive-site.xml instead. --> <!-- Hive Execution Parameters --> <property> <name>hive.metastore.warehouse.dir</name> <value>/opt/hive/warehouse</value> </property> <property> <name>hive.exec.scratchdir</name> <value>/opt/hive/tmp</value> </property> <property> <name>hive.querylog.location</name> <value>/opt/hive/logs</value> </property> <property> <name>hive.server2.thrift.port</name> <value>10000</value> </property> <property> <name>hive.server2.thrift.bind.host</name> <value>localhost</value> </property> <property> <name>hive.server2.enable.doAs</name> <value>true</value> </property> <property> <name>hive.session.id</name> <value>false</value> </property> <property> <name>hive.session.silent</name> <value>false</value> </property> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://localhost:3306/hiveDB?createDatabaseIfNotExist=true</value> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>bee</value> <!-- 这里是之前设置的数据库 --> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <!-- 这里是数据库密码 --> <value>123123</value> </property> </configuration>