Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
0035dbbc
Commit
0035dbbc
authored
11 years ago
by
Josh Rosen
Browse files
Options
Downloads
Patches
Plain Diff
Fix SPARK-1034: Py4JException on PySpark Cartesian Result
parent
a2b47dae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/org/apache/spark/api/java/JavaPairRDD.scala
+1
-2
1 addition, 2 deletions
...rc/main/scala/org/apache/spark/api/java/JavaPairRDD.scala
python/pyspark/tests.py
+7
-0
7 additions, 0 deletions
python/pyspark/tests.py
with
8 additions
and
2 deletions
core/src/main/scala/org/apache/spark/api/java/JavaPairRDD.scala
+
1
−
2
View file @
0035dbbc
...
...
@@ -49,8 +49,7 @@ class JavaPairRDD[K, V](val rdd: RDD[(K, V)])(implicit val kClassTag: ClassTag[K
override
def
wrapRDD
(
rdd
:
RDD
[(
K
,
V
)])
:
JavaPairRDD
[
K
,
V
]
=
JavaPairRDD
.
fromRDD
(
rdd
)
override
val
classTag
:
ClassTag
[(
K
,
V
)]
=
implicitly
[
ClassTag
[
AnyRef
]].
asInstanceOf
[
ClassTag
[
Tuple2
[
K
,
V
]]]
override
val
classTag
:
ClassTag
[(
K
,
V
)]
=
rdd
.
elementClassTag
import
JavaPairRDD._
...
...
This diff is collapsed.
Click to expand it.
python/pyspark/tests.py
+
7
−
0
View file @
0035dbbc
...
...
@@ -152,6 +152,13 @@ class TestRDDFunctions(PySparkTestCase):
raw_contents
=
''
.
join
(
input
(
glob
(
tempFile
.
name
+
"
/part-0000*
"
)))
self
.
assertEqual
(
x
,
unicode
(
raw_contents
.
strip
(),
"
utf-8
"
))
def
test_transforming_cartesian_result
(
self
):
# Regression test for SPARK-1034
rdd1
=
self
.
sc
.
parallelize
([
1
,
2
])
rdd2
=
self
.
sc
.
parallelize
([
3
,
4
])
cart
=
rdd1
.
cartesian
(
rdd2
)
result
=
cart
.
map
(
lambda
(
x
,
y
):
x
+
y
).
collect
()
class
TestIO
(
PySparkTestCase
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment