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
fd0374b9
Commit
fd0374b9
authored
12 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Comment
parent
5718cef2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/spark/CoalescedRDD.scala
+1
-1
1 addition, 1 deletion
core/src/main/scala/spark/CoalescedRDD.scala
core/src/test/scala/spark/RDDSuite.scala
+1
-1
1 addition, 1 deletion
core/src/test/scala/spark/RDDSuite.scala
with
2 additions
and
2 deletions
core/src/main/scala/spark/CoalescedRDD.scala
+
1
−
1
View file @
fd0374b9
...
...
@@ -4,7 +4,7 @@ private class CoalescedRDDSplit(val index: Int, val parents: Array[Split]) exten
/**
* Coalesce the partitions of a parent RDD (`prev`) into fewer partitions, so that each partition of
* this RDD computes
zero
or more of the parent ones. Will produce exactly `maxPartitions` if the
* this RDD computes
one
or more of the parent ones. Will produce exactly `maxPartitions` if the
* parent had more than this many partitions, or fewer if the parent had fewer.
*
* This transformation is useful when an RDD with many partitions gets filtered into a smaller one,
...
...
This diff is collapsed.
Click to expand it.
core/src/test/scala/spark/RDDSuite.scala
+
1
−
1
View file @
fd0374b9
...
...
@@ -79,7 +79,7 @@ class RDDSuite extends FunSuite with BeforeAndAfter {
val
coalesced1
=
new
CoalescedRDD
(
data
,
2
)
assert
(
coalesced1
.
collect
().
toList
===
(
1
to
10
).
toList
)
assert
(
coalesced1
.
glom
().
collect
().
map
(
_
.
toList
).
toList
===
List
(
List
(
1
,
2
,
3
,
4
,
5
),
List
(
6
,
7
,
8
,
9
,
10
)))
List
(
List
(
1
,
2
,
3
,
4
,
5
),
List
(
6
,
7
,
8
,
9
,
10
)))
// Check that the narrow dependency is also specified correctly
assert
(
coalesced1
.
dependencies
.
head
.
getParents
(
0
).
toList
===
List
(
0
,
1
,
2
,
3
,
4
))
...
...
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