設定 hive authorization root權限編輯hive config command vim /etc/hive/conf.dist/hive-site.xml *需打包jar com.qiku.custom.auth.HiveServer2Auth <property> <name> hive.server2.enable.doAs </name> <value> false </value> </property> <property> <name>hive.server2.authentication</name> <value> CUSTOM </value> </property> <property> <name>hive.server2.custom.authentication.class</name> <value> org . apache . hive . service . auth . PasswdAuthenticationProvider . SampleAuth </value> </property> 自定義登入邏輯 [java] 儲存為HiveServer2Auth.jar 放在 ${HIVE_HOME}/lib下 package org . apache . hive . service . auth . PasswdAuthenticationProvider . SampleAuth ; import java . util . Hashtable ; import javax . security . sasl . AuthenticationException ; import org . apache . hive . service . auth . PasswdAuthenti