启动hive ThirftServer和hive metastore的需要跟管理员申请keytab
<!-- kerberos -->
<property>
<name>hive.metastore.sasl.enabled</name>
<value>true</value>
</property>
<property>
<name>hive.metastore.kerberos.keytab.file</name>
<value>/usr/lib/hive/conf/imeda.keytab</value>
</property>
<property>
<name>hive.metastore.kerberos.principal</name>
<value>userxxx/userxxx@MARS.HADOOP.COM</value>
</property>
<property>
<name>hive.server2.enable.doAs</name>
<value>false</value>
</property>
<property>
<name>hive.server2.authentication</name>
<value>KERBEROS</value>
</property>
<property>
<name>hive.server2.authentication.kerberos.principal</name>
<value>userxxx/userxxx@MARS.HADOOP.COM</value>
</property>
<property>
<name>hive.server2.authentication.kerberos.keytab</name>
<value>/usr/lib/hive/conf/imeda.keytab</value>
</property>