【发布时间】:2021-07-28 21:00:41
【问题描述】:
我正在尝试将文件从 HDFS 读取到 Spark 并对其执行一些数据处理。 我正在尝试从 Kubernetes 的一个 pod 中完成。
所以这就是我运行的:
spark = SparkSession.builder.appName('myAppName').getOrCreate()
spark.conf.set('spark.yarn.keytab', '/data/conf/my.keytab')
spark.conf.set('spark.yarn.principal', 'datascience@Snir.LOCAL')
cat_df = spark.read.load("hdfs://data-main1.snir.network/process/extra/folder")
我得到的错误: 未启用简单身份验证。可用:[TOKEN,KERBEROS]
Py4JJavaError: An error occurred while calling o35.load.
: org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException:
SIMPLE authentication is not enabled. Available:[TOKEN, KERBEROS]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:121)
at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:88)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1667)
at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1582)
at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1579)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1594)
at org.apache.hadoop.fs.FileSystem.isDirectory(FileSystem.java:1700)
at o
... 23 more
我也试过了:
spark.conf.set("hadoop.security.authentication", "kerberos")
但没有运气。
有人处理过吗?
【问题讨论】:
标签: apache-spark hadoop pyspark hdfs