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
ea096f7c
Commit
ea096f7c
authored
12 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
More logging
parent
554b42cb
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/storage/BlockManager.scala
+7
-4
7 additions, 4 deletions
core/src/main/scala/spark/storage/BlockManager.scala
with
7 additions
and
4 deletions
core/src/main/scala/spark/storage/BlockManager.scala
+
7
−
4
View file @
ea096f7c
...
@@ -411,8 +411,10 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m
...
@@ -411,8 +411,10 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m
var
bytesInFlight
=
0L
var
bytesInFlight
=
0L
def
sendRequest
(
req
:
FetchRequest
)
{
def
sendRequest
(
req
:
FetchRequest
)
{
logDebug
(
"Sending request for %d blocks (%s) from %s"
.
format
(
req
.
blocks
.
size
,
Utils
.
memoryBytesToString
(
req
.
size
),
req
.
address
.
ip
))
val
cmId
=
new
ConnectionManagerId
(
req
.
address
.
ip
,
req
.
address
.
port
)
val
cmId
=
new
ConnectionManagerId
(
req
.
address
.
ip
,
req
.
address
.
port
)
val
blockMessageArray
=
new
BlockMessageArray
(
req
.
blocks
.
map
{
val
blockMessageArray
=
new
BlockMessageArray
(
req
.
blocks
.
map
{
case
(
blockId
,
size
)
=>
BlockMessage
.
fromGetBlock
(
GetBlock
(
blockId
))
case
(
blockId
,
size
)
=>
BlockMessage
.
fromGetBlock
(
GetBlock
(
blockId
))
})
})
bytesInFlight
+=
req
.
size
bytesInFlight
+=
req
.
size
...
@@ -450,10 +452,11 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m
...
@@ -450,10 +452,11 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m
localBlockIds
++=
blockInfos
.
map
(
_
.
_1
)
localBlockIds
++=
blockInfos
.
map
(
_
.
_1
)
}
else
{
}
else
{
remoteBlockIds
++=
blockInfos
.
map
(
_
.
_1
)
remoteBlockIds
++=
blockInfos
.
map
(
_
.
_1
)
// Make our requests at least maxBytesInFlight /
4
in length; the reason to keep them
// Make our requests at least maxBytesInFlight /
5
in length; the reason to keep them
// smaller than maxBytesInFlight is to allow multiple, parallel fetches from up to
4
// smaller than maxBytesInFlight is to allow multiple, parallel fetches from up to
5
// nodes, rather than blocking on reading output from one node.
// nodes, rather than blocking on reading output from one node.
val
minRequestSize
=
math
.
max
(
maxBytesInFlight
/
4
,
1L
)
val
minRequestSize
=
math
.
max
(
maxBytesInFlight
/
5
,
1L
)
logInfo
(
"maxBytesInFlight: "
+
maxBytesInFlight
+
", minRequest: "
+
minRequestSize
)
val
iterator
=
blockInfos
.
iterator
val
iterator
=
blockInfos
.
iterator
var
curRequestSize
=
0L
var
curRequestSize
=
0L
var
curBlocks
=
new
ArrayBuffer
[(
String
,
Long
)]
var
curBlocks
=
new
ArrayBuffer
[(
String
,
Long
)]
...
...
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