khrist safalhai
khrist safalhai

Reputation: 570

Zeppelin R interpreter fails to do anything

I am running Zeppelin 0.6.1 and its sparkR interpreter fails to do anything. It says ERROR on cell execution status but does not tell what error. I used its binary package with all interpreters zeppelin-0.6.1-bin-all.tgz. Tried many things but no clue on whats going on. Has anyone run R interpereter in Zeppelin successfully?

In logs it shows this error

....
....
....
> library(SparkR)

Attaching package: ‘SparkR’

The following objects are masked from ‘package:stats’:

    cov, filter, lag, na.omit, predict, sd, var

The following objects are masked from ‘package:base’:

    colnames, colnames 
> 
> SparkR:::connectBackend("localhost", port)
        description               class                mode                text 
"->localhost:54905"          "sockconn"                "wb"            "binary" 
             opened            can read           can write 
           "opened"               "yes"               "yes" 
> 
> # scStartTime is needed by R/pkg/R/sparkR.R
> assign(".scStartTime", as.integer(Sys.time()), envir = SparkR:::.sparkREnv)
> 
> # getZeppelinR
> .zeppelinR = SparkR:::callJStatic("org.apache.zeppelin.spark.ZeppelinR", "getZeppelinR", hashCode)

    at org.apache.zeppelin.spark.ZeppelinR.waitForRScriptInitialized(ZeppelinR.java:291)
    at org.apache.zeppelin.spark.ZeppelinR.request(ZeppelinR.java:231)
    at org.apache.zeppelin.spark.ZeppelinR.eval(ZeppelinR.java:179)
    at org.apache.zeppelin.spark.ZeppelinR.open(ZeppelinR.java:168)
    at org.apache.zeppelin.spark.SparkRInterpreter.open(SparkRInterpreter.java:79)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.getProgress(LazyOpenInterpreter.java:110)
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer.getProgress(RemoteInterpreterServer.java:404)
    at org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Processor$getProgress.getResult(RemoteInterpreterService.java:1509)
    at org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Processor$getProgress.getResult(RemoteInterpreterService.java:1494)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Upvotes: 4

Views: 4812

Answers (1)

khrist safalhai
khrist safalhai

Reputation: 570

What I found was: my SPARK_HOME variable was not set correctly. Setting it fixed the problem. In another setup I religiously followed steps mentioned here and it worked fine. Zeppelin R interpreter

SPARK_HOME and R installation are two main things which if done correctly should ensure smooth SparkR experience on Zeppelin.

Upvotes: 2

Related Questions