Good morning / afternoon / evening!
Spark 2.4.x, with Hive 1.2.1
Source code here: https://github.com/apache/spark/blob/master/sql/hive-thriftserver/v1.2/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java
public static TTransport getKerberosTransport(String principal, String host,
TTransport underlyingTransport, Map<String, String> saslProps, boolean assumeSubject)
throws SaslException {
try {
String[] names = principal.split("[/@]");
if (names.length != 3) {
throw new IllegalArgumentException("Kerberos principal should have 3 parts: " + principal);
}
Now the question:
Does anyone know why spark thrift server needs a 3 part kerberos principle?
Spark thrift server works by submitting a long running job, which does not need a 3 part kerberos principle.
Start a service listening to a port, does not need a 3 part kerberos principle (just like spark job history), right?
So wonder why this code checks if the principle has 3 parts or not...
Thanks!