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
9821cd4d
Commit
9821cd4d
authored
13 years ago
by
Reynold Xin
Browse files
Options
Downloads
Patches
Plain Diff
Force serialize/deserialize task results in local execution mode.
parent
f709b3ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/main/scala/spark/LocalScheduler.scala
+7
-1
7 additions, 1 deletion
core/src/main/scala/spark/LocalScheduler.scala
with
7 additions
and
1 deletion
core/src/main/scala/spark/LocalScheduler.scala
+
7
−
1
View file @
9821cd4d
...
...
@@ -46,9 +46,15 @@ private class LocalScheduler(threads: Int, maxFailures: Int) extends DAGSchedule
idInJob
,
bytes
.
size
,
timeTaken
))
val
deserializedTask
=
ser
.
deserialize
[
Task
[
_
]](
bytes
,
currentThread
.
getContextClassLoader
)
val
result
:
Any
=
deserializedTask
.
run
(
attemptId
)
// Serialize and deserialize the result to emulate what the mesos
// executor does. This is useful to catch serialization errors early
// on in development (so when users move their local Spark programs
// to the cluster, they don't get surprised by serialization errors).
val
resultToReturn
=
ser
.
deserialize
[
Any
](
ser
.
serialize
(
result
))
val
accumUpdates
=
Accumulators
.
values
logInfo
(
"Finished task "
+
idInJob
)
taskEnded
(
task
,
Success
,
result
,
accumUpdates
)
taskEnded
(
task
,
Success
,
result
ToReturn
,
accumUpdates
)
}
catch
{
case
t
:
Throwable
=>
{
logError
(
"Exception in task "
+
idInJob
,
t
)
...
...
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