How to connnect sparksql in Kerberos enviroment

@hicenlee
Did you try connecting with another client, through kinit, preferably a java client?

Looking at the log you provide here, it contains several more errors, specifically:
GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
https://community.cloudera.com/t5/Support-Questions/beeline-returns-quot-Failed-to-find-any-Kerberos-tgt-quot/td-p/96908

And it seems like you might need some extra parameters for java as well:
https://stackoverflow.com/questions/32205087/javax-security-sasl-saslexception-gss-initiate-failed-caused-by-gssexception

Or could it simply be a problem with sudo vs regular user?
https://stackoverflow.com/questions/48093826/hadoop-kerberos-hdfs-command-failed-to-find-any-kerberos-tgt-even-though-i-ha/48105052

Anyways, I would recommend that you try making it work through kinit with a client that you know, since you should then be able to use the same configuration on Metabase then.