Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Yuta HIGUCHI
2014-10-07 23:03:20 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
053b7d736e3496040d665909835a6f7aecf27244
053b7d73
1 parent
f1f1d32f
remove debug trace logs
Change-Id: I83de49ff062bb49cad4509d764d7a6b32b543e2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
18 deletions
core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
View file @
053b7d7
...
...
@@ -6,9 +6,6 @@ import java.io.IOException;
import
java.util.Set
;
import
java.util.Timer
;
import
java.util.TimerTask
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeoutException
;
import
org.apache.felix.scr.annotations.Activate
;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
...
...
@@ -36,7 +33,6 @@ import org.onlab.netty.Message;
import
org.onlab.netty.MessageHandler
;
import
org.onlab.netty.MessagingService
;
import
org.onlab.netty.NettyMessagingService
;
import
org.onlab.netty.Response
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -123,13 +119,10 @@ public class ClusterCommunicationManager
checkArgument
(
node
!=
null
,
"Unknown nodeId: %s"
,
toNodeId
);
Endpoint
nodeEp
=
new
Endpoint
(
node
.
ip
().
toString
(),
node
.
tcpPort
());
try
{
log
.
info
(
"sending..."
);
Response
resp
=
messagingService
.
sendAndReceive
(
nodeEp
,
messagingService
.
sendAsync
(
nodeEp
,
message
.
subject
().
value
(),
SERIALIZER
.
encode
(
message
));
resp
.
get
(
1
,
TimeUnit
.
SECONDS
);
log
.
info
(
"sent..."
);
return
true
;
}
catch
(
IOException
|
TimeoutException
e
)
{
}
catch
(
IOException
e
)
{
log
.
error
(
"Failed to send cluster message to nodeId: "
+
toNodeId
,
e
);
}
...
...
@@ -197,8 +190,7 @@ public class ClusterCommunicationManager
}
}
// FIXME: revert static
private
class
InternalClusterMessageHandler
implements
MessageHandler
{
private
final
class
InternalClusterMessageHandler
implements
MessageHandler
{
private
final
ClusterMessageHandler
handler
;
...
...
@@ -208,17 +200,12 @@ public class ClusterCommunicationManager
@Override
public
void
handle
(
Message
message
)
{
// FIXME: remove me
log
.
info
(
"InternalClusterMessageHandler.handle({})"
,
message
);
try
{
log
.
info
(
"before decode"
);
ClusterMessage
clusterMessage
=
SERIALIZER
.
decode
(
message
.
payload
());
log
.
info
(
"Subject:({}), Sender:({})"
,
clusterMessage
.
subject
(),
clusterMessage
.
sender
());
handler
.
handle
(
clusterMessage
);
message
.
respond
(
"ACK"
.
getBytes
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
log
.
error
(
"failed"
,
e
)
;
log
.
error
(
"Exception caught during ClusterMessageHandler"
,
e
);
throw
e
;
}
}
}
...
...
Please
register
or
login
to post a comment