Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed some logmessages #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public class MonitorQueueConsumer extends Thread /*implements Runnable*/ {

private static final Logger LOGGER = LoggerFactory.getLogger(MonitorQueueConsumer.class);
private static final Logger LOGGER = LoggerFactory.getLogger(MonitorQueueController.class);
private final MonitorQueueController monitorQueueController;
private final String nodeId;
private final MonitorHandler monitorHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public MonitorQueueController(MonitorHandler monitorHandler) {
}

private Queue<DomainMonitorModel> createNewQueue(String nodeId, DomainMonitorModel request) {
LOGGER.debug("add new Queue");
LOGGER.debug("add new Queue ");
Queue<DomainMonitorModel> result = new LinkedList<>();
result.add(request);
queueMap.put(nodeId, result);
LOGGER.debug("QueueMapSize: " + queueMap.size());
LOGGER.debug("new QueueMapSize: " + queueMap.size());
return result;
}

Expand All @@ -56,9 +56,7 @@ private Queue<DomainMonitorModel> getQueue(String nodeId) {
}

public void removeQueue(String nodeId) {
LOGGER.debug("removing MapEntry");
queueMap.remove(nodeId);
LOGGER.debug("remaining Map: " + queueMap.size());
}

private synchronized void handleQueueMap(QueueAction action,
Expand All @@ -72,16 +70,16 @@ public int getQueueMapSize() {

public synchronized boolean handleMonitorRequest(String nodeId, DomainMonitorModel domainMonitorModel) {

LOGGER.debug("QueueController handling Monitor");
LOGGER.debug("QueueController handling Monitor "+domainMonitorModel.getMetric());
Queue<DomainMonitorModel> usedQueue;
if (existingQueue(nodeId)) {
LOGGER.debug("adding Monitor to existing Queue");
LOGGER.debug("found existing Queue, adding Monitor");
usedQueue = getQueue(nodeId);
usedQueue.add(domainMonitorModel);
LOGGER.debug("QueueSize: " + usedQueue.size());
LOGGER.debug("QueueSize now: " + usedQueue.size());
} else {
usedQueue = createNewQueue(nodeId, domainMonitorModel);
LOGGER.debug("QueueMapEntries: " + queueMap.size() + " - running newConsumer");
LOGGER.debug("created new Queue with size: " + queueMap.size() + " - starting new QueueConsumer");
queueExecutor.submit(new MonitorQueueConsumer(nodeId, usedQueue, this, monitorHandler));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void accept(String id, NodeEvent nodeEvent) {
try {
TargetState targetState;
LOGGER.debug(
"Got NodeEvent: " + nodeEvent.getNode().getId() + ": " + nodeEvent.getFrom()
"Got NodeEvent: " + nodeEvent.getFrom()
+ " to " + nodeEvent.getTo());
switch (nodeEvent.getTo()) {
case NODE_STATE_PENDING:
Expand All @@ -63,7 +63,6 @@ public void accept(String id, NodeEvent nodeEvent) {
}
monitorManagementService
.handleEvent(TypeEnum.NODE, nodeEvent.getNode().getId(), targetState);

} catch (Exception e) {
LOGGER.error("Error while receiving NodeEvent. ", e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void run() {
public void accept(String id, ProcessEvent processEvent) {
try {
LOGGER.debug(
"Got ProcessEvent: " + processEvent.getProcess().getId() + ": " + processEvent
"Got ProcessEvent: " + processEvent
.getFrom() + " to " + processEvent.getTo());

TargetState targetState;
Expand Down