在创建H2OContext

时间:2017-06-09 15:46:37

标签: python-2.7 apache-spark h2o sparkling-water

我正在尝试使用H2OContext.getOrCreate(sc)在pyspark中启动H2O上下文。使用python包h2o = 3.10.4.8和h2o-pysparkling-1.6 = 1.6.8这可以正常工作(使用pip安装包),但是使用h2o-pysparkling-1.6.11我收到以下错误:

Py4JJavaError: An error occurred while calling o100.invoke.
: java.util.ServiceConfigurationError: org.apache.spark.h2o.AnnouncementProvider: Provider org.apache.spark.h2o.RestAnnouncementProvider could not be instantiated
    at java.util.ServiceLoader.fail(ServiceLoader.java:232)
    at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at scala.collection.convert.Wrappers$JIteratorWrapper.next(Wrappers.scala:42)
    at scala.collection.Iterator$class.toStream(Iterator.scala:1143)
    at scala.collection.AbstractIterator.toStream(Iterator.scala:1157)
    at scala.collection.TraversableOnce$class.toSeq(TraversableOnce.scala:261)
    at scala.collection.AbstractIterator.toSeq(Iterator.scala:1157)
    at org.apache.spark.h2o.AnnouncementServiceFactory$.create(AnnouncementService.scala:73)
    at org.apache.spark.h2o.H2OContext.<init>(H2OContext.scala:66)
    at org.apache.spark.h2o.H2OContext$.getOrCreate(H2OContext.scala:294)
    at org.apache.spark.h2o.H2OContext.getOrCreate(H2OContext.scala)
    at org.apache.spark.h2o.JavaH2OContext.getOrCreate(JavaH2OContext.java:191)
    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:498)
    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:498)
    at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:231)
    at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:381)
    at py4j.Gateway.invoke(Gateway.java:259)
    at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)
    at py4j.GatewayConnection.run(GatewayConnection.java:209)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/impl/client/HttpClientBuilder
    at org.apache.spark.h2o.RestAnnouncementProvider.<init>(AnnouncementService.scala:119)
    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 java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    ... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.impl.client.HttpClientBuilder
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 34 more

我在YARN上使用Python2.7,Spark 1.6.0,CDH5.7.0

0 个答案:

没有答案