hive中的几个参数:元数据配置、仓库位置、打印表字段相关参数

时间:2022-03-14 04:11:59

hive仓库位置由以下参数决定,默认位置/user/hive/warehouse:

<property>
         <name>hive.metastore.warehouse.dir</name>
         <value>/user/hive/warehouse</value>
     </property>

hive中元数据配置:

<property>
         <name>javax.jdo.option.ConnectionURL</name>
         <value>jdbc:mysql://db01:3306/metastore?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>root</value>
         <description>username to use against metastore database</description>
     </property>

<property>
         <name>javax.jdo.option.ConnectionPassword</name>
         <value>mysql</value>
         <description>password to use against metastore database</description>
     </property>
    
hive查询打印表字段信息由以下参数保证:

hive.cli.print.header=true