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
504f839c
Commit
504f839c
authored
14 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Removed unnecessary collectAsMap
parent
9d3f05a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scala/spark/LocalFileShuffle.scala
+2
-4
2 additions, 4 deletions
src/scala/spark/LocalFileShuffle.scala
with
2 additions
and
4 deletions
src/scala/spark/LocalFileShuffle.scala
+
2
−
4
View file @
504f839c
...
...
@@ -7,8 +7,6 @@ import java.util.concurrent.atomic.AtomicLong
import
scala.collection.mutable.
{
ArrayBuffer
,
HashMap
}
import
spark.SparkContext._
/**
* A simple implementation of shuffle using local files served through HTTP.
...
...
@@ -32,7 +30,7 @@ class LocalFileShuffle[K, V, C] extends Shuffle[K, V, C] with Logging {
val
numInputSplits
=
splitRdd
.
splits
.
size
// Run a parallel map and collect to write the intermediate data files,
// returning a
hash table
of inputSplitId -> serverUri pairs
// returning a
list
of inputSplitId -> serverUri pairs
val
outputLocs
=
splitRdd
.
map
((
pair
:
(
Int
,
Iterator
[(
K
,
V
)]))
=>
{
val
myIndex
=
pair
.
_1
val
myIterator
=
pair
.
_2
...
...
@@ -55,7 +53,7 @@ class LocalFileShuffle[K, V, C] extends Shuffle[K, V, C] with Logging {
out
.
close
()
}
(
myIndex
,
LocalFileShuffle
.
serverUri
)
}).
collect
AsMap
()
}).
collect
()
// Build a hashmap from server URI to list of splits (to facillitate
// fetching all the URIs on a server within a single connection)
...
...
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