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
f52bc09a
Commit
f52bc09a
authored
12 years ago
by
root
Browse files
Options
Downloads
Patches
Plain Diff
Reduce some overly aggressive logging in connection manager
parent
e6e27a05
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/spark/network/ConnectionManager.scala
+5
-6
5 additions, 6 deletions
core/src/main/scala/spark/network/ConnectionManager.scala
core/src/main/scala/spark/storage/BlockManagerWorker.scala
+2
-3
2 additions, 3 deletions
core/src/main/scala/spark/storage/BlockManagerWorker.scala
with
7 additions
and
9 deletions
core/src/main/scala/spark/network/ConnectionManager.scala
+
5
−
6
View file @
f52bc09a
...
...
@@ -113,7 +113,7 @@ private[spark] class ConnectionManager(port: Int) extends Logging {
val
selectedKeysCount
=
selector
.
select
()
if
(
selectedKeysCount
==
0
)
{
log
Info
(
"Selector selected "
+
selectedKeysCount
+
" of "
+
selector
.
keys
.
size
+
" keys"
)
log
Debug
(
"Selector selected "
+
selectedKeysCount
+
" of "
+
selector
.
keys
.
size
+
" keys"
)
}
if
(
selectorThread
.
isInterrupted
)
{
logInfo
(
"Selector thread was interrupted!"
)
...
...
@@ -167,7 +167,6 @@ private[spark] class ConnectionManager(port: Int) extends Logging {
}
def
removeConnection
(
connection
:
Connection
)
{
/*logInfo("Removing connection")*/
connectionsByKey
-=
connection
.
key
if
(
connection
.
isInstanceOf
[
SendingConnection
])
{
val
sendingConnection
=
connection
.
asInstanceOf
[
SendingConnection
]
...
...
@@ -235,7 +234,7 @@ private[spark] class ConnectionManager(port: Int) extends Logging {
def
receiveMessage
(
connection
:
Connection
,
message
:
Message
)
{
val
connectionManagerId
=
ConnectionManagerId
.
fromSocketAddress
(
message
.
senderAddress
)
log
Info
(
"Received ["
+
message
+
"] from ["
+
connectionManagerId
+
"]"
)
log
Debug
(
"Received ["
+
message
+
"] from ["
+
connectionManagerId
+
"]"
)
val
runnable
=
new
Runnable
()
{
val
creationTime
=
System
.
currentTimeMillis
def
run
()
{
...
...
@@ -276,15 +275,15 @@ private[spark] class ConnectionManager(port: Int) extends Logging {
logDebug
(
"Calling back"
)
onReceiveCallback
(
bufferMessage
,
connectionManagerId
)
}
else
{
log
Warnin
g
(
"Not calling back as callback is null"
)
log
Debu
g
(
"Not calling back as callback is null"
)
None
}
if
(
ackMessage
.
isDefined
)
{
if
(!
ackMessage
.
get
.
isInstanceOf
[
BufferMessage
])
{
log
Warnin
g
(
"Response to "
+
bufferMessage
+
" is not a buffer message, it is of type "
+
ackMessage
.
get
.
getClass
())
log
Debu
g
(
"Response to "
+
bufferMessage
+
" is not a buffer message, it is of type "
+
ackMessage
.
get
.
getClass
())
}
else
if
(!
ackMessage
.
get
.
asInstanceOf
[
BufferMessage
].
hasAckId
)
{
log
Warnin
g
(
"Response to "
+
bufferMessage
+
" does not have ack id set"
)
log
Debu
g
(
"Response to "
+
bufferMessage
+
" does not have ack id set"
)
ackMessage
.
get
.
asInstanceOf
[
BufferMessage
].
ackId
=
bufferMessage
.
id
}
}
...
...
This diff is collapsed.
Click to expand it.
core/src/main/scala/spark/storage/BlockManagerWorker.scala
+
2
−
3
View file @
f52bc09a
...
...
@@ -31,7 +31,6 @@ private[spark] class BlockManagerWorker(val blockManager: BlockManager) extends
val
blockMessages
=
BlockMessageArray
.
fromBufferMessage
(
bufferMessage
)
logDebug
(
"Parsed as a block message array"
)
val
responseMessages
=
blockMessages
.
map
(
processBlockMessage
).
filter
(
_
!=
None
).
map
(
_
.
get
)
/*logDebug("Processed block messages")*/
return
Some
(
new
BlockMessageArray
(
responseMessages
).
toBufferMessage
)
}
catch
{
case
e
:
Exception
=>
logError
(
"Exception handling buffer message"
,
e
)
...
...
@@ -49,13 +48,13 @@ private[spark] class BlockManagerWorker(val blockManager: BlockManager) extends
blockMessage
.
getType
match
{
case
BlockMessage
.
TYPE_PUT_BLOCK
=>
{
val
pB
=
PutBlock
(
blockMessage
.
getId
,
blockMessage
.
getData
,
blockMessage
.
getLevel
)
log
Info
(
"Received ["
+
pB
+
"]"
)
log
Debug
(
"Received ["
+
pB
+
"]"
)
putBlock
(
pB
.
id
,
pB
.
data
,
pB
.
level
)
return
None
}
case
BlockMessage
.
TYPE_GET_BLOCK
=>
{
val
gB
=
new
GetBlock
(
blockMessage
.
getId
)
log
Info
(
"Received ["
+
gB
+
"]"
)
log
Debug
(
"Received ["
+
gB
+
"]"
)
val
buffer
=
getBlock
(
gB
.
id
)
if
(
buffer
==
null
)
{
return
None
...
...
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