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
4b05798c
Commit
4b05798c
authored
12 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Further bug fix to HttpBroadcast
parent
8ed66286
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/broadcast/HttpBroadcast.scala
+3
-3
3 additions, 3 deletions
core/src/main/scala/spark/broadcast/HttpBroadcast.scala
with
3 additions
and
3 deletions
core/src/main/scala/spark/broadcast/HttpBroadcast.scala
+
3
−
3
View file @
4b05798c
...
...
@@ -34,7 +34,7 @@ extends Broadcast[T] with Logging with Serializable {
}
else
{
logInfo
(
"Started reading broadcast variable "
+
uuid
)
val
start
=
System
.
nanoTime
value_
=
HttpBroadcast
.
read
(
uuid
)
.
asInstanceOf
[
T
]
value_
=
HttpBroadcast
.
read
[
T
]
(
uuid
)
HttpBroadcast
.
values
.
put
(
uuid
,
0
,
value_
)
val
time
=
(
System
.
nanoTime
-
start
)
/
1
e9
logInfo
(
"Reading broadcast variable "
+
uuid
+
" took "
+
time
+
" s"
)
...
...
@@ -95,7 +95,7 @@ private object HttpBroadcast extends Logging {
serOut
.
close
()
}
def
read
(
uuid
:
UUID
)
:
Any
=
{
def
read
[
T
]
(
uuid
:
UUID
)
:
T
=
{
val
url
=
serverUri
+
"/broadcast-"
+
uuid
var
in
=
if
(
compress
)
{
new
LZFInputStream
(
new
URL
(
url
).
openStream
())
// Does its own buffering
...
...
@@ -104,7 +104,7 @@ private object HttpBroadcast extends Logging {
}
val
ser
=
SparkEnv
.
get
.
serializer
.
newInstance
()
val
serIn
=
ser
.
inputStream
(
in
)
val
obj
=
serIn
.
readObject
()
val
obj
=
serIn
.
readObject
[
T
]
()
serIn
.
close
()
obj
}
...
...
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