Ich habe Probleme meine Funke Umgebung Einrichtung aus einem kerberisierter HDFS Speicherort der Datei zu lesen.Funken Mit einer HDFS-Datei von Kerberos geschützt abrufen
def ugiDoAs[T](ugi: Option[UserGroupInformation])(code: => T) = ugi match {
case None => code
case Some(u) => u.doAs(new PrivilegedExceptionAction[T] {
override def run(): T = code
})
}
val sparkConf = defaultSparkConf.setAppName("file-test").setMaster("yarn-client")
val sc = ugiDoAs(ugi) {new SparkContext(conf)}
val file = sc.textFile("path")
Es scheitert an der Stelle der Erstellung des Spark-Kontext, mit dem folgenden Fehler:
Exception in thread "main" 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:422)
at org.apache.hadoop.yarn.ipc.RPCUtil.instantiateException(RPCUtil.java:53)
at org.apache.hadoop.yarn.ipc.RPCUtil.unwrapAndThrowException(RPCUtil.java:104)
at org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getClusterMetrics(ApplicationClientProtocolPBClientImpl.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187)
Hat jemand eine einfache bekam folgendes zu tun
Im Moment habe ich versucht, Beispiel dafür, wie Spark eine Verbindung zu einem kerberisierten HDFS-Standort herstellen kann?
Ich weiß, dass Funke muss in Yarn-Modus in der Lage sein, damit es funktioniert, aber die Login-Methode scheint nicht in dieser Hinsicht zu arbeiten. Obwohl ich weiß, dass das User Group Information (ugi) -Objekt gültig ist, wie ich es verwendet habe, um eine Verbindung zu ZK im selben Objekt und HBase herzustellen.