Repository: spark Updated Branches: refs/heads/branch-1.4 051864e09 -> 5f227fdbf
[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 <[email protected]> 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 (cherry picked from commit 0835f1edd4c9c05439df85c248faf6787d45f7b7) Signed-off-by: Shivaram Venkataraman <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5f227fdb Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5f227fdb Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5f227fdb Branch: refs/heads/branch-1.4 Commit: 5f227fdbfe66d777687f3145ca0f704bf8e6a248 Parents: 051864e Author: Shivaram Venkataraman <[email protected]> Authored: Sun May 10 19:49:42 2015 -0700 Committer: Shivaram Venkataraman <[email protected]> Committed: Sun May 10 19:49:51 2015 -0700 ---------------------------------------------------------------------- R/pkg/R/RDD.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/5f227fdb/R/pkg/R/RDD.R ---------------------------------------------------------------------- diff --git a/R/pkg/R/RDD.R b/R/pkg/R/RDD.R index 73999a6..9138629 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) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
