Yuta HIGUCHI

remove debug trace logs

Change-Id: I83de49ff062bb49cad4509d764d7a6b32b543e2e
......@@ -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;
}
}
}
......