R/spark_gen_embedded_sources.R

Defines functions spark_gen_embedded_sources

spark_gen_embedded_sources <- function(
                                       output = file.path("java", "embedded_sources.R")) {
  worker_files <- sort(dir("R", full.names = TRUE, pattern = "worker|core"))
  lines <- unlist(lapply(worker_files, function(e) readLines(e)))
  lines <- c(lines, "do.call(spark_worker_main, as.list(commandArgs(trailingOnly = TRUE)))")

  writeLines(lines, output)
}

Try the sparklyr package in your browser

Any scripts or data that you put into this service are public.

sparklyr documentation built on Nov. 2, 2023, 5:09 p.m.