关于SPARK3.0访问带Kerberos认证的HADOOP,报client cannot authenticate via:[TOKEN,KERBEROS]的错

在实际项目中在应用主机上搭建了SPARK集群,使用standalone进行资源调度,访问远端的HADOOP集群,由于HADOOP使用了kerberos认证,导致报以下错误:client cannot authenticate via:[TOKEN,KERBEROS],如图:

img

请大师们帮忙分析分析是哪的问题,还是说SPARK的standalone模式根本不支持kerberos认证。

PS:
1.程序中已经加上了Kerberos认证的相关代码,但依然不过,代码如下:

val conf = new Configuration
      conf.addResource(new File(hdfsxml).toURI().toURL());
      conf.addResource(new File(corexml).toURI().toURL());
      conf.setBoolean("fs.hdfs.impl.disable.cache", true)
      conf.set("hadoop.user.name", "billadm")
      conf.set("user.name", "billadm")
      conf.set("hadoop.security.authentication", "kerberos")
      conf.set("hadoop.security.authorization", "true")
      conf.set("com.sun.security.auth.module.Krb5LoginModule", "required")
      conf.set("username.client.keytab.file", keytab)
      conf.set("username.client.kerberos.principal", keyuser)

      System.setProperty("java.security.krb5.conf", krbcfg)
      UserGroupInformation.setConfiguration(conf)
      UserGroupInformation.loginUserFromKeytab(keyuser,keytab)

2.使用hadoop命令是可以正常进行访问,但在SPARK提交JAR包运行程序不行。