Dear zeppelin community,

I am trying to setup R with spark integration in Zeppelin without success.

I am following this document --> 
https://zeppelin.apache.org/docs/0.8.0/interpreter/r.html

I can run R in the node zeppelin is installed

[luffy@gl-hdp-ctrl01 R-3.6.0]$ R -e "print(1+1)"

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> print(1+1)
[1] 2
>
>

This is my zeppelin_env_content (I removed commented line for sake of 
simplicity):

      export JAVA_HOME={{java64_home}}
      export MASTER=yarn-client
      export ZEPPELIN_LOG_DIR={{zeppelin_log_dir}}
      export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
      export ZEPPELIN_INTP_CLASSPATH_OVERRIDES="{{external_dependency_conf}}"
      export HADOOP_CONF_DIR=/etc/hadoop/conf

export SPARK_HOME=/usr/hdp/3.1.0.0-78/spark2
export ZEPPELIN_IMPERSONATE_CMD='sudo -H -u ${ZEPPELIN_IMPERSONATE_USER} bash 
-c '

This is my notebook:

%spark2.r

1 + 1

This is the notebook output I am getting:

org.apache.zeppelin.interpreter.InterpreterException: sparkr is not responding
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> #
> # Licensed to the Apache Software Foundation (ASF) under one
> # or more contributor license agreements.  See the NOTICE file
> # distributed with this work for additional information
> # regarding copyright ownership.  The ASF licenses this file
> # to you under the Apache License, Version 2.0 (the
> # "License"); you may not use this file except in compliance
> # with the License.  You may obtain a copy of the License at
> #
> #     http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing, software
> # distributed under the License is distributed on an "AS IS" BASIS,
> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> # See the License for the specific language governing permissions and
> # limitations under the License.
> #
>
> args <- commandArgs(trailingOnly = TRUE)
>
> hashCode <- as.integer(args[1])
> port <- as.integer(args[2])
> libPath <- args[3]
> version <- as.integer(args[4])
> timeout <- as.integer(args[5])
> authSecret <- NULL
> if (length(args) >= 6) {
+   authSecret <- args[6]
+ }
>
> rm(args)
>
> print(paste("Port ", toString(port)))
[1] "Port  42291"
> print(paste("LibPath ", libPath))
[1] "LibPath  /usr/hdp/3.1.0.0-78/spark2/R/lib"
>
> .libPaths(c(file.path(libPath), .libPaths()))
> library(SparkR)

Attaching package: 'SparkR'

The following objects are masked from 'package:stats':

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

The following objects are masked from 'package:base':

    as.data.frame, colnames, colnames<-, drop, endsWith, intersect,
    ran> k, rbin
d> if , sample(, stairtsWith, subsest., snuummlalr(ya,u ttrhaSecret)) {nsf
o+ rm, union  S
parkR:::co
nnectBackend("localhost", port, timeout)
+ } else {
+   SparkR:::connectBackend("localhost", port, timeout, authSecret)
+ }

      at 
org.apache.zeppelin.spark.ZeppelinR.waitForRScriptInitialized(ZeppelinR.java:294)
      at org.apache.zeppelin.spark.ZeppelinR.request(ZeppelinR.java:236)
      at org.apache.zeppelin.spark.ZeppelinR.eval(ZeppelinR.java:185)
      at org.apache.zeppelin.spark.ZeppelinR.open(ZeppelinR.java:174)
      at 
org.apache.zeppelin.spark.SparkRInterpreter.open(SparkRInterpreter.java:106)
      at 
org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)
      at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:617)
      at org.apache.zeppelin.scheduler.Job.run(Job.java:188)
      at 
org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:140)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      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)

any advice?

Manuel Sopena Ballesteros

Big Data Engineer | Kinghorn Centre for Clinical Genomics

 [cid:image001.png@01D4C835.ED3C2230] <https://www.garvan.org.au/>

a: 384 Victoria Street, Darlinghurst NSW 2010
p: +61 2 9355 5760  |  +61 4 12 123 123
e: manuel...@garvan.org.au<mailto:manuel...@garvan.org.au>

Like us on Facebook<http://www.facebook.com/garvaninstitute> | Follow us on 
Twitter<http://twitter.com/GarvanInstitute> and 
LinkedIn<http://www.linkedin.com/company/garvan-institute-of-medical-research>

NOTICE
Please consider the environment before printing this email. This message and 
any attachments are intended for the addressee named and may contain legally 
privileged/confidential/copyright information. If you are not the intended 
recipient, you should not read, use, disclose, copy or distribute this 
communication. If you have received this message in error please notify us at 
once by return email and then delete both messages. We accept no liability for 
the distribution of viruses or similar in electronic communications. This 
notice should not be removed.

Reply via email to