Description
In a streaming application, I use --keytab /root/spark.keytab to get the token.
But when the streaming application failed and I wanted to recover it from checkpoint file, there was an error:
java.io.IOException: Login failure for spark/hadoop.hadoop.com@HADOOP.COM from keytab spark.keytab-1fd8f7bb-0d3c-4f65-990a-9ae09055cc8d: javax.security.auth.login.LoginException: Unable to obtain password from user
Spark had changed the configuration, so the checkpoint can't find the file:
Client.java @ Function: setupCredentials
val keytabFileName = f.getName + "-" + UUID.randomUUID().toString UserGroupInformation.loginUserFromKeytab(args.principal, args.keytab) loginFromKeytab = true sparkConf.set("spark.yarn.keytab", keytabFileName)
So when recovering the application, we should ignore this configurations.