diff options
author | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-05-10 19:49:42 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-05-10 19:49:42 -0700 |
commit | 0835f1edd4c9c05439df85c248faf6787d45f7b7 (patch) | |
tree | 3f9bb1fe294da91aac35991d252eb367d574e882 /R | |
parent | c5aca0c27be31e94ffdb01ef2eb29d3b373d7f4c (diff) | |
download | spark-0835f1edd4c9c05439df85c248faf6787d45f7b7.tar.gz spark-0835f1edd4c9c05439df85c248faf6787d45f7b7.tar.bz2 spark-0835f1edd4c9c05439df85c248faf6787d45f7b7.zip |
[SPARK-7512] [SPARKR] Fix RDD's show method to use getJRDD
Since the RDD object might be a Pipelined RDD we should use `getJRDD` to get the right handle to the Java object.
Fixes the bug reported at
http://stackoverflow.com/questions/30057702/sparkr-filterrdd-and-flatmap-not-working
cc concretevitamin
Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
Closes #6035 from shivaram/sparkr-show-bug and squashes the following commits:
d70145c [Shivaram Venkataraman] Fix RDD's show method to use getJRDD Fixes the bug reported at http://stackoverflow.com/questions/30057702/sparkr-filterrdd-and-flatmap-not-working
Diffstat (limited to 'R')
-rw-r--r-- | R/pkg/R/RDD.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/pkg/R/RDD.R b/R/pkg/R/RDD.R index 73999a6737..9138629cac 100644 --- a/R/pkg/R/RDD.R +++ b/R/pkg/R/RDD.R @@ -67,8 +67,8 @@ setMethod("initialize", "RDD", function(.Object, jrdd, serializedMode, }) setMethod("show", "RDD", - function(.Object) { - cat(paste(callJMethod(.Object@jrdd, "toString"), "\n", sep="")) + function(object) { + cat(paste(callJMethod(getJRDD(object), "toString"), "\n", sep="")) }) setMethod("initialize", "PipelinedRDD", function(.Object, prev, func, jrdd_val) { |