Uh oh!
There was an error while loading. Please reload this page.
[SPARK-17790][SPARKR] Support for parallelizing R data.frame larger than 2GB - #15375
[SPARK-17790][SPARKR] Support for parallelizing R data.frame larger than 2GB#15375falaki wants to merge 14 commits into
Conversation
SparkQA
commented
Oct 6, 2016
Test build #66434 has finished for PR 15375 at commit
|
felixcheung
commented
Oct 6, 2016
I think we need to delete the temp file? |
falaki
commented
Oct 6, 2016
@felixcheung added clean up for the temp file and unit test. PTAL. |
SparkQA
commented
Oct 6, 2016
Test build #66464 has finished for PR 15375 at commit
|
| sizeLimit <- as.numeric( | ||
| sparkR.conf("spark.r.maxAllocationLimit", toString(.Machine$integer.max - 10240))) | ||
| objectSize <- object.size(coll) |
There was a problem hiding this comment.
Since the guess of size could easily be wrong, and writing them into disk is not that bad anyway, should we have a much smaller default value (for example, 100M)?
SparkQA
commented
Oct 7, 2016
Test build #66467 has finished for PR 15375 at commit
|
SparkQA
commented
Oct 7, 2016
Test build #66472 has finished for PR 15375 at commit
|
| numSlices <- length(coll) | ||
| sizeLimit <- .Machine$integer.max - 10240 # Safe margin bellow maximum allocation limit | ||
| sizeLimit <- as.numeric( |
There was a problem hiding this comment.
This number is not serialized anywhere. I think as.numeric is fine.
There was a problem hiding this comment.
agreed, probably not a big deal, an user could set spark.r.maxAllocationLimit to 0.01 though, to make numSlices bigger
felixcheung
commented
Oct 7, 2016
Odd, this is the error from appveyor: |
| fileName <- writeToTempFile(serializedSlices) | ||
| jrdd <- callJStatic( | ||
| "org.apache.spark.api.r.RRDD", "createRDDFromFile", sc, fileName, as.integer(numSlices)) | ||
| file.remove(fileName) |
There was a problem hiding this comment.
if the JVM call throws an exception, I don't think this line will execute, perhaps wrap this in tryCatch?
SparkQA
commented
Oct 7, 2016
Test build #66517 has finished for PR 15375 at commit
|
SparkQA
commented
Oct 7, 2016
Test build #66527 has finished for PR 15375 at commit
|
SparkQA
commented
Oct 8, 2016
Test build #66528 has finished for PR 15375 at commit
|
SparkQA
commented
Oct 8, 2016
Test build #66565 has finished for PR 15375 at commit
|
SparkQA
commented
Oct 11, 2016
Test build #66699 has finished for PR 15375 at commit
|
| #' in the list are split into \code{numSlices} slices and distributed to nodes | ||
| #' in the cluster. | ||
| #' | ||
| #' If size of serialized slices is larger than 2GB (or INT_MAX bytes), the function |
SparkQA
commented
Oct 11, 2016
Test build #3324 has finished for PR 15375 at commit
|
SparkQA
commented
Oct 11, 2016
Test build #66750 has finished for PR 15375 at commit
|
falaki
commented
Oct 11, 2016
@felixcheung does it look OK now? |
This LGTM - I think we merge this to master and branch-2.0 |
falaki
commented
Oct 11, 2016
Seems like a flaky test in If jenkins listens to your commands, maybe we can have it retest this? |
shivaram
commented
Oct 12, 2016
Jenkins, retest this please |
tdas
commented
Oct 12, 2016
@falaki@felixcheung The DirectKafkaStreamSuite is a known flaky test. Nothing in this patch should affect Kafka. |
SparkQA
commented
Oct 12, 2016
Test build #66792 has finished for PR 15375 at commit
|
felixcheung
commented
Oct 12, 2016
everything passed, I'm merging to this master and branch-2.0 |
…han 2GB ## What changes were proposed in this pull request? If the R data structure that is being parallelized is larger than `INT_MAX` we use files to transfer data to JVM. The serialization protocol mimics Python pickling. This allows us to simply call `PythonRDD.readRDDFromFile` to create the RDD. I tested this on my MacBook. Following code works with this patch: ```R intMax <- .Machine$integer.max largeVec <- 1:intMax rdd <- SparkR:::parallelize(sc, largeVec, 2) ``` ## How was this patch tested? * [x] Unit tests Author: Hossein <hossein@databricks.com> Closes#15375 from falaki/SPARK-17790. (cherry picked from commit 5cc503f) Signed-off-by: Felix Cheung <felixcheung@apache.org>
…han 2GB ## What changes were proposed in this pull request? If the R data structure that is being parallelized is larger than `INT_MAX` we use files to transfer data to JVM. The serialization protocol mimics Python pickling. This allows us to simply call `PythonRDD.readRDDFromFile` to create the RDD. I tested this on my MacBook. Following code works with this patch: ```R intMax <- .Machine$integer.max largeVec <- 1:intMax rdd <- SparkR:::parallelize(sc, largeVec, 2) ``` ## How was this patch tested? * [x] Unit tests Author: Hossein <hossein@databricks.com> Closesapache#15375 from falaki/SPARK-17790.
What changes were proposed in this pull request?
If the R data structure that is being parallelized is larger than
INT_MAXwe use files to transfer data to JVM. The serialization protocol mimics Python pickling. This allows us to simply callPythonRDD.readRDDFromFileto create the RDD.I tested this on my MacBook. Following code works with this patch:
How was this patch tested?