Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-2199

spark.lapply not working but SparkR:::lapply works.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.7.1, 0.8.0
    • Component/s: None
    • Labels:
      None

      Description

      To run lapply in distributed mode via Zeppelin one needs to run SparkR:::lapply instead of spark.lapply.
      As per spark documentation spark.lapply should work.

      Steps to reproduce:

      Build zeppelin using with r profiles enabled:
      mvn clean install -DskipTests -Drat.skip=true -Pspark-2.0 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pr -Pscala-2.11

      Failed Paragraph
      %spark.r
      families <- c("gaussian", "poisson")
      df <- createDataFrame(iris)
      train <- function(family){
      model <- model <- glm(Sepal.Length ~ Sepal.Width + Species, iris, family = family)
      summary(model)
      }
      model.summaries <- spark.lapply(families, train)

      Passin paragraph:
      %spark.r
      families <- c("gaussian", "poisson")
      df <- createDataFrame(iris)
      train <- function(family){
      model <- model <- glm(Sepal.Length ~ Sepal.Width + Species, iris, family = family)
      summary(model)
      }
      model.summaries <- spark.lapply(families, train)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vipul.1409@gmail.com Vipul Modi
                Reporter:
                vipul.1409@gmail.com Vipul Modi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: