hive-site.xml
由%hive-1.1.0%/conf/hive-default.xml.template文件复制得到。在hive-site.xml文件中配置Hive默认的数据文件存放目录。须提前创建。这里的配置会覆盖hive-default.xml中的配置。
1)hive.exec.scratchdir
约46行:
hive.exec.scratchdir
/hive-1.1.0/scratchdir/tmp
HDFS root scratch dir for Hive jobs which gets created with write all (733) permission. For each connecting user, an HDFS scratch dir: ${hive.exec.scratchdir}/<username> is created, with ${hive.scratch.dir.permission}.
2)hive.metastore.warehouse.dir
约334行:
hive.metastore.warehouse.dir
/hive-1.1.0/warehousedir/home
3)javax.jdo.option.ConnectionURL
Derby
约385行,指定derby数据库地址(可选):
javax.jdo.option.ConnectionURL
jdbc:derby:/derby_dbs;create=true;logDevice=/derby_logs;
Mysql
javax.jdo.option.ConnectionURL
jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore
4)system:java.io.tmpdir
关于下面的4个属性,可以在第50行之前,创建:
system:java.io.tmpdir
/home/hive-1.1.0
如果感觉不理想,可以单独配置:(1)约51行:
hive.exec.local.scratchdir
/home/hive-1.1.0/scratchdir
(2)约56行:
hive.downloaded.resources.dir
/home/hive-1.1.0/resourcesdir/${hive.session.id}_resources
(3)约1181行:
hive.querylog.location
/home/hive-1.1.0/query_logs
(4)约2720行:
hive.server2.logging.operation.log.location
/home/hive-1.1.0/operation_logs