Hello, I am using the new R API in SparkR spark.lapply (spark 2.0). I am defining a complex function to be run across executors and I have to send the entire dataset, but there is not (that I could find) a way to broadcast the variable in SparkR. I am thus reading the dataset in each executor from disk, but I getting the following error:
Error in writeBin(batch, con, endian = "big") : attempting to add too many elements to raw vector Any idea why this is happening? Pseudo code: scoreModel <- function(parameters){ library(read.table) dat <- data.frame(fread("file.csv")) score(dat,parameters) } parameterList <- lapply(1:numModels, function(i) getParameters(i)) modelScores <- spark.lapply(parameterList, scoreModel) Piero Cinquegrana MarketShare: A Neustar Solution / Data Science Mobile: +39.329.17.62.539 / www.neustar.biz<http://www.neustar.biz/> Reduce your environmental footprint. Print only if necessary. Follow Neustar: [New%20Picture] Facebook<https://www.facebook.com/pages/NeuStar/104072179630456?fref=ts> [New%20Picture%20(1)(1)] LinkedIn<https://www.linkedin.com/company/5349?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A5349%2Cidx%3A2-1-4%2CtarId%3A1450369757393%2Ctas%3Aneustar> [New%20Picture%20(2)] Twitter<https://twitter.com/Neustar> The information contained in this email message is intended only for the use of the recipient(s) named above and may contain confidential and/or privileged information. If you are not the intended recipient you have received this email message in error and any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately and delete the original message. Piero Cinquegrana MarketShare: A Neustar Solution / Data Science Mobile: +39.329.17.62.539 / www.neustar.biz<http://www.neustar.biz/> Reduce your environmental footprint. Print only if necessary. Follow Neustar: [New%20Picture] Facebook<https://www.facebook.com/pages/NeuStar/104072179630456?fref=ts> [New%20Picture%20(1)(1)] LinkedIn<https://www.linkedin.com/company/5349?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A5349%2Cidx%3A2-1-4%2CtarId%3A1450369757393%2Ctas%3Aneustar> [New%20Picture%20(2)] Twitter<https://twitter.com/Neustar> The information contained in this email message is intended only for the use of the recipient(s) named above and may contain confidential and/or privileged information. If you are not the intended recipient you have received this email message in error and any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately and delete the original message.