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
ee6e3eff
Commit
ee6e3eff
authored
10 years ago
by
Josh Rosen
Browse files
Options
Downloads
Patches
Plain Diff
Revert "[SPARK-5363] [PySpark] check ending mark in non-block way"
This reverts commits
ac6fe67e
and
c06e42f2
.
parent
a65766bf
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/org/apache/spark/api/python/PythonRDD.scala
+4
-17
4 additions, 17 deletions
...rc/main/scala/org/apache/spark/api/python/PythonRDD.scala
python/pyspark/worker.py
+0
-1
0 additions, 1 deletion
python/pyspark/worker.py
with
4 additions
and
18 deletions
core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala
+
4
−
17
View file @
ee6e3eff
...
...
@@ -144,24 +144,11 @@ private[spark] class PythonRDD(
stream
.
readFully
(
update
)
accumulator
+=
Collections
.
singletonList
(
update
)
}
// Check whether the worker is ready to be re-used.
if
(
reuse_worker
)
{
// It has a high possibility that the ending mark is already available,
// And current task should not be blocked by checking it
if
(
stream
.
available
()
>=
4
)
{
val
ending
=
stream
.
readInt
()
if
(
ending
==
SpecialLengths
.
END_OF_STREAM
)
{
env
.
releasePythonWorker
(
pythonExec
,
envVars
.
toMap
,
worker
)
released
=
true
logInfo
(
s
"Communication with worker ended cleanly, re-use it: $worker"
)
}
else
{
logInfo
(
s
"Communication with worker did not end cleanly "
+
s
"(ending with $ending), close it: $worker"
)
}
}
else
{
logInfo
(
s
"The ending mark from worker is not available, close it: $worker"
)
if
(
stream
.
readInt
()
==
SpecialLengths
.
END_OF_STREAM
)
{
if
(
reuse_worker
)
{
env
.
releasePythonWorker
(
pythonExec
,
envVars
.
toMap
,
worker
)
released
=
true
}
}
null
...
...
This diff is collapsed.
Click to expand it.
python/pyspark/worker.py
+
0
−
1
View file @
ee6e3eff
...
...
@@ -121,7 +121,6 @@ def main(infile, outfile):
write_int
(
len
(
_accumulatorRegistry
),
outfile
)
for
(
aid
,
accum
)
in
_accumulatorRegistry
.
items
():
pickleSer
.
_write_with_length
((
aid
,
accum
.
_value
),
outfile
)
outfile
.
flush
()
# check end of stream
if
read_int
(
infile
)
==
SpecialLengths
.
END_OF_STREAM
:
...
...
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