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

Fix flink sql kill yarn application and getJobStatus fail #5041

Merged
merged 2 commits into from
Dec 14, 2023
Merged
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 @@ -631,7 +631,7 @@ class TaskExecutionServiceImpl
if (null != task) {
sendToEntrance(task, ResponseTaskLog(logUpdateEvent.taskId, logUpdateEvent.log))
} else {
logger.error("Task cannot null! logupdateEvent: " + logUpdateEvent.taskId)
logger.warn("Task cannot null! logupdateEvent: " + logUpdateEvent.taskId)
}
} else if (null != lastTask) {
val executor = executorManager.getReportExecutor
Expand Down Expand Up @@ -733,7 +733,7 @@ class TaskExecutionServiceImpl
if (null != executor) {
executor.getTaskById(taskId)
} else {
logger.error(s"Executor of taskId : $taskId is not cached.")
logger.warn(s"Executor of taskId : $taskId is not cached.")
null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ public ClusterDescriptorAdapter(ExecutionContext executionContext) {

/** Returns the status of the flink job. */
public JobStatus getJobStatus() throws JobExecutionException {
if (jobId == null) {
try {
LOG.info("flink getJobStatus jobId is null,sleep three seconds");
Thread.sleep(3000);
} catch (InterruptedException e) {

}
}
LOG.info("flink getJobStatus jobId:{}", jobId);
if (jobId == null) {
throw new JobExecutionException(NO_JOB_SUBMITTED.getErrorDesc());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ class FlinkSQLComputationExecutor(
super.close()
}

override def tryShutdown(): Boolean = {
Utils.tryAndWarn(close())
super.tryShutdown()
}

}

class FlinkSQLStatusListener(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<loggers>
<root level="INFO">
<appender-ref ref="stderr"/>
<appender-ref ref="Console"/>
<appender-ref ref="RollingFile"/>
<appender-ref ref="Send"/>
</root>
<logger name="org.apache.hadoop.hive.ql.exec.StatsTask" level="info" additivity="true">
Expand Down
Loading