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
c33f0ef4
Commit
c33f0ef4
authored
12 years ago
by
Patrick Wendell
Browse files
Options
Downloads
Patches
Plain Diff
Some style cleanup
parent
3446d5c8
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
core/src/main/scala/spark/api/python/PythonRDD.scala
+4
-7
4 additions, 7 deletions
core/src/main/scala/spark/api/python/PythonRDD.scala
with
4 additions
and
7 deletions
core/src/main/scala/spark/api/python/PythonRDD.scala
+
4
−
7
View file @
c33f0ef4
...
@@ -104,19 +104,17 @@ private[spark] class PythonRDD[T: ClassManifest](
...
@@ -104,19 +104,17 @@ private[spark] class PythonRDD[T: ClassManifest](
private
def
read
()
:
Array
[
Byte
]
=
{
private
def
read
()
:
Array
[
Byte
]
=
{
try
{
try
{
stream
.
readInt
()
match
{
stream
.
readInt
()
match
{
case
length
if
length
>
0
=>
{
case
length
if
length
>
0
=>
val
obj
=
new
Array
[
Byte
](
length
)
val
obj
=
new
Array
[
Byte
](
length
)
stream
.
readFully
(
obj
)
stream
.
readFully
(
obj
)
obj
obj
}
case
-
2
=>
case
-
2
=>
{
// Signals that an exception has been thrown in python
// Signals that an exception has been thrown in python
val
exLength
=
stream
.
readInt
()
val
exLength
=
stream
.
readInt
()
val
obj
=
new
Array
[
Byte
](
exLength
)
val
obj
=
new
Array
[
Byte
](
exLength
)
stream
.
readFully
(
obj
)
stream
.
readFully
(
obj
)
throw
new
PythonException
(
new
String
(
obj
))
throw
new
PythonException
(
new
String
(
obj
))
}
case
-
1
=>
case
-
1
=>
{
// We've finished the data section of the output, but we can still read some
// We've finished the data section of the output, but we can still read some
// accumulator updates; let's do that, breaking when we get EOFException
// accumulator updates; let's do that, breaking when we get EOFException
while
(
true
)
{
while
(
true
)
{
...
@@ -124,9 +122,8 @@ private[spark] class PythonRDD[T: ClassManifest](
...
@@ -124,9 +122,8 @@ private[spark] class PythonRDD[T: ClassManifest](
val
update
=
new
Array
[
Byte
](
len2
)
val
update
=
new
Array
[
Byte
](
len2
)
stream
.
readFully
(
update
)
stream
.
readFully
(
update
)
accumulator
+=
Collections
.
singletonList
(
update
)
accumulator
+=
Collections
.
singletonList
(
update
)
new
Array
[
Byte
](
0
)
}
}
new
Array
[
Byte
](
0
)
}
}
}
}
catch
{
}
catch
{
case
eof
:
EOFException
=>
{
case
eof
:
EOFException
=>
{
...
...
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