From beb5d3c433991db945e2090e19e28c8c2bf7ae66 Mon Sep 17 00:00:00 2001 From: Piotr Rudnicki Date: Fri, 6 Dec 2024 10:18:41 +0100 Subject: [PATCH] more logging while cancelling Flink jobs (#7289) Co-authored-by: Piotr Rudnicki --- .../nussknacker/engine/management/FlinkRestManager.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/flink/management/src/main/scala/pl/touk/nussknacker/engine/management/FlinkRestManager.scala b/engine/flink/management/src/main/scala/pl/touk/nussknacker/engine/management/FlinkRestManager.scala index fae0d547781..2d74cc8861f 100644 --- a/engine/flink/management/src/main/scala/pl/touk/nussknacker/engine/management/FlinkRestManager.scala +++ b/engine/flink/management/src/main/scala/pl/touk/nussknacker/engine/management/FlinkRestManager.scala @@ -199,7 +199,9 @@ class FlinkRestManager( s"Trying to cancel $processName${deploymentId.map(" with id: " + _).getOrElse("")} which is not present or finished on Flink." ) Future.successful(()) - case single :: Nil => cancelFlinkJob(single) + case single :: Nil => + logger.info(s"Cancelling Flink job with deploymentId: ${single.externalDeploymentId.getOrElse("")}.") + cancelFlinkJob(single) case moreThanOne @ (_ :: _ :: _) => logger.warn( s"Found duplicate jobs of $processName${deploymentId.map(" with id: " + _).getOrElse("")}: $moreThanOne. Cancelling all in non terminal state." @@ -233,6 +235,7 @@ class FlinkRestManager( deploymentId: ExternalDeploymentId, savepointDir: Option[String] ): Future[SavepointResult] = { + logger.debug(s"Stopping Flink job: ${deploymentId.value}.") client.stop(deploymentId, savepointDir) }