sparkR-2.0.0给出了“invokeJava中的错误(isStatic = TRUE,className,methodName,...):......”

时间:2016-09-21 00:05:30

标签: r apache-spark rstudio sparkr

当我尝试在Rstudio中使用sparkR时,我遇到了一些问题。

library(SparkR, lib.loc = c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib")))
library(rJava)
sparkR.session(master = "local[*]", sparkConfig = list(spark.driver.memory = "2g"))
fa<- faithful
df <- as.DataFrame(fa)

并得到以下错误:     sc&lt; - sparkR.session(master =“spark://spark01.cmua.dom:7077”,appName =“sparkR”,sparkConfig = list(spark.driver.memory =“2g”))

df&lt; - as.DataFrame(忠实)

得到以下错误:

 Error in invokeJava(isStatic = TRUE, className, methodName, ...) :           
 java.lang.reflect.InvocationTargetException 
 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.spark.sql.hive.client.IsolatedClientLoader.createClient(IsolatedClientLoader.scala:258) 
 at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:359) 
 at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:263) 
 at org.apache.spark.sql.hive.HiveSharedState.metadataHive$lzycompute(HiveSharedState.scala:39)
 at org.apache.spark.sql.hive.HiveSharedState.metadataHive(HiveSharedState.scala:38) 
 at org.apache.spark.sql.hive.HiveSharedState.externalCatalog$lzycompute(HiveSharedState.scala:46) 
 at org.apache.spark.sql.hive.HiveSharedSt

0 个答案:

没有答案