Support Questions
Find answers, ask questions, and share your expertise

Spark with R is not working in zeppelin

Spark with R is not working in zeppelin

Hi All,

Could anyone please answer.

I am running the command in zeppelin.

Zeppeljne version 0.7

spark 2 is working from command line.

Knitr library is alsready there.


drwxrwxr-x. 9 zeppelin zeppelin 4096 Dec 10 23:00 knitr

spark version 2.0

%spark2.r 6+6

INFO [2018-12-20 13:08:52,807] ({pool-3-thread-9}[jobStarted]:131) - Job remoteInterpretJob_1545311332806 started by scheduler org.apache.zeppelin.spark.SparkRInterpreter1498089066 INFO [2018-12-20 13:08:52,810] ({pool-3-thread-9}[createRScript]:353) - File /tmp/zeppelin_sparkr-5383790228296778176.R created ERROR [2018-12-20 13:09:02,817] ({pool-3-thread-9}[run]:188) - Job failed org.apache.zeppelin.interpreter.InterpreterException: sparkr is not responding R version 3.5.0 (2018-04-23) -- "Joy in Playing" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-redhat-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 > # > # > # > # 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]) > rm(args) > > print(paste("Port ", toString(port))) [1] "Port 34239" > print(paste("LibPath ", libPath)) [1] "LibPath /usr/hdp/current/spark2-client//R/lib" > > .libPaths(c(file.path(libPath), .libPaths())) > library(SparkR) Attaching package: âSparkRâ > > > SparkR:::connectBackend("localhost", port, 6000) 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â:, colnames, colnames<-, drop, endsWith, intersect, rank, rbind, sample, startsWith, subset, summary, transform, union A connection with description "->localhost:34239" class "sockconn" mode "wb" text "binary" opened "opened" can read "yes" can write "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( at org.apache.zeppelin.spark.ZeppelinR.request( at org.apache.zeppelin.spark.ZeppelinR.eval( at at at at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun( at at org.apache.zeppelin.scheduler.FIFOScheduler$ at java.util.concurrent.Executors$ at at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( at java.util.concurrent.ScheduledThreadPoolExecutor$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at INFO [2018-12-20 13:09:02,820] ({pool-3-thread-9}[jobFinished]:137) - Job remoteInterpretJob_1545311332806 finished by scheduler org.apache.zeppelin.spark.SparkRInterpreter1498089066