Skip to content

Commit

Permalink
AMBARI-25892:NamedTasksSubscriptions and NamedTasksSubscribeListener …
Browse files Browse the repository at this point in the history
…print logs frequently (apache#3661)
  • Loading branch information
guluo2016 authored Jul 29, 2024
1 parent e8104f0 commit 811a7bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void subscribe(SessionSubscribeEvent sse)
if (sessionId != null && destination != null && id != null) {
namedTasksSubscriptions.addDestination(sessionId, destination, id);
}
LOG.info(String.format("API subscribe was arrived with sessionId = %s, destination = %s and id = %s",
LOG.debug(String.format("API subscribe was arrived with sessionId = %s, destination = %s and id = %s",
sessionId, destination, id));
}

Expand All @@ -57,7 +57,7 @@ public void unsubscribe(SessionUnsubscribeEvent suse)
if (sessionId != null && id != null) {
namedTasksSubscriptions.removeId(sessionId, id);
}
LOG.info(String.format("API unsubscribe was arrived with sessionId = %s and id = %s",
LOG.debug(String.format("API unsubscribe was arrived with sessionId = %s and id = %s",
sessionId, id));
}

Expand All @@ -69,7 +69,7 @@ public void disconnect(SessionDisconnectEvent sde)
if (sessionId != null) {
namedTasksSubscriptions.removeSession(sessionId);
}
LOG.info(String.format("API disconnect was arrived with sessionId = %s",
LOG.debug(String.format("API disconnect was arrived with sessionId = %s",
sessionId));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void addTaskId(String sessionId, Long taskId, String id) {
}
return ids;
});
LOG.info(String.format("Task subscription was added for sessionId = %s, taskId = %s, id = %s",
LOG.debug(String.format("Task subscription was added for sessionId = %s, taskId = %s, id = %s",
sessionId, taskId, id));
} finally {
taskIdsLock.unlock();
Expand All @@ -82,7 +82,7 @@ public void removeId(String sessionId, String id) {
while (iterator.hasNext()) {
if (iterator.next().getId().equals(id)) {
iterator.remove();
LOG.info(String.format("Task subscription was removed for sessionId = %s, id = %s", sessionId, id));
LOG.debug(String.format("Task subscription was removed for sessionId = %s, id = %s", sessionId, id));
}
}
return tasks;
Expand All @@ -98,7 +98,7 @@ public void removeTaskId(Long taskId) {
while (iterator.hasNext()) {
if (iterator.next().getTaskId().equals(taskId)) {
iterator.remove();
LOG.info(String.format("Task subscription was removed for sessionId = %s and taskId = %s",
LOG.debug(String.format("Task subscription was removed for sessionId = %s and taskId = %s",
sessionId, taskId));
}
}
Expand All @@ -114,7 +114,7 @@ public void removeSession(String sessionId) {
try {
taskIdsLock.lock();
taskIds.remove(sessionId);
LOG.info(String.format("Task subscriptions were removed for sessionId = %s", sessionId));
LOG.debug(String.format("Task subscriptions were removed for sessionId = %s", sessionId));
} finally {
taskIdsLock.unlock();
}
Expand Down

0 comments on commit 811a7bd

Please sign in to comment.