This is an automated email from the ASF dual-hosted git repository.
kfaraz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 52f64d24653 Reduce verbose logging in SeekableStreamSupervisor.
(#17702)
52f64d24653 is described below
commit 52f64d246531ed93c26813b2d6c54ba343473342
Author: Karan Kumar <[email protected]>
AuthorDate: Sat Feb 8 18:30:00 2025 +0530
Reduce verbose logging in SeekableStreamSupervisor. (#17702)
* Fixing logging in supervisor.
* Adjusting log message.
* No good way to test. Reverting to original behaviour.
* Adding debug logging to suspend as well.
---
.../supervisor/SeekableStreamSupervisor.java | 27 ++++++++++++++--------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git
a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java
b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java
index 5838c0ba871..1948e22e2aa 100644
---
a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java
+++
b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java
@@ -1204,12 +1204,12 @@ public abstract class
SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy
{
synchronized (stateChangeLock) {
if (started) {
- log.warn("Supervisor was already started, skipping init");
+ log.warn("Supervisor[%s] was already started, skipping init",
supervisorId);
return;
}
if (stopped) {
- log.warn("Supervisor was already stopped, skipping init.");
+ log.warn("Supervisor[%s] was already stopped, skipping init.",
supervisorId);
return;
}
@@ -1683,7 +1683,7 @@ public abstract class
SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy
// If supervisor is already stopping, don't contend for stateChangeLock
since the block can be skipped
if
(stateManager.getSupervisorState().getBasicState().equals(SupervisorStateManager.BasicState.STOPPING))
{
- generateAndLogReport();
+ logDebugReport();
return;
}
@@ -1692,21 +1692,20 @@ public abstract class
SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy
// if suspended, ensure tasks have been requested to gracefully stop
if
(stateManager.getSupervisorState().getBasicState().equals(SupervisorStateManager.BasicState.STOPPING))
{
// if we're already terminating, don't do anything here, the
terminate already handles shutdown
- log.info("[%s] supervisor is already stopping.", dataSource);
+ log.debug("Supervisor for datasource[%s] is already stopping.",
dataSource);
} else if (stateManager.isIdle()) {
- log.info("[%s] supervisor is idle.", dataSource);
+ log.debug("Supervisor for datasource[%s] is idle.", dataSource);
} else if (!spec.isSuspended()) {
- log.info("[%s] supervisor is running.", dataSource);
-
+ log.debug("Supervisor for datasource[%s] is running.", dataSource);
stateManager.maybeSetState(SeekableStreamSupervisorStateManager.SeekableStreamState.CREATING_TASKS);
createNewTasks();
} else {
- log.info("[%s] supervisor is suspended.", dataSource);
+ log.debug("Supervisor for datasource[%s] is suspended.", dataSource);
gracefulShutdownInternal();
}
}
- generateAndLogReport();
+ logDebugReport();
}
catch (Exception e) {
stateManager.recordThrowableEvent(e);
@@ -1717,7 +1716,7 @@ public abstract class
SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy
}
}
- private void generateAndLogReport()
+ private void logDebugReport()
{
if (log.isDebugEnabled()) {
log.debug("%s", generateReport(true));
@@ -3719,7 +3718,15 @@ public abstract class
SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy
if (!idle) {
stateManager.maybeSetState(SupervisorStateManager.BasicState.RUNNING);
} else if (!stateManager.isIdle() && idleTime >
idleConfig.getInactiveAfterMillis()) {
+ log.info("Setting supervisor[%s] to state[%s]", supervisorId,
SupervisorStateManager.BasicState.IDLE.name());
stateManager.maybeSetState(SupervisorStateManager.BasicState.IDLE);
+ if (stateManager.isIdle()) {
+ log.info(
+ "Successfully set supervisor[%s] to state[%s]",
+ supervisorId,
+ SupervisorStateManager.BasicState.IDLE.name()
+ );
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]