[root@jy-agent-981 ~]# pwd
/root
[root@jy-agent-981 ~]# cd //
[root@jy-agent-981 //]# cd etc/security/keytabs
[root@jy-agent-981 keytabs]# klist -kt hive.service.keytab
Keytab name: FILE:hive.service.keytab
KVNO Timestamp Principal
---- ------------------- ------------------------------------------------------
3 07/10/2017 15:10:16 hive/[email protected]
3 07/10/2017 15:10:16 hive/[email protected]
3 07/10/2017 15:10:16 hive/[email protected]
3 07/10/2017 15:10:16 hive/[email protected]
3 07/10/2017 15:10:16 hive/[email protected]
[root@jy-agent-981 keytabs]# kinit -kt hive.service.keytab hive/[email protected]
[root@jy-agent-981 keytabs]# ./beeline
!connect jdbc:hive2://ip:10000/default;principal=hive/[email protected]
解決方法:ERROR Executor: Exception in task 34.0 in stage 1.0 (TID 286) java.lang.OutOfMemoryError: Java heap space
sudo vim $SPARK_HOME/conf/spark-defaults.conf
#uncomment the spark.driver.memory and change it according to your use. I changed it to below
spark.driver.memory 15g