pan3793 commented on code in PR #5082:
URL: https://github.com/apache/kyuubi/pull/5082#discussion_r1270201931
##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/flink/client/deployment/application/executors/EmbeddedExecutorFactory.java:
##########
@@ -105,6 +114,25 @@ public boolean isCompatibleWith(final Configuration
configuration) {
public PipelineExecutor getExecutor(final Configuration configuration) {
checkNotNull(configuration);
Collection<JobID> executorJobIDs;
+ synchronized (bootstrapLock) {
+ // wait in a loop to avoid spurious wakeups
+ int retry = 0;
+ while (bootstrapJobIds == null && retry < BOOTSTRAP_WAIT_RETRIES) {
+ try {
+ bootstrapLock.wait(BOOTSTRAP_WAIT_INTERVAL);
+ retry++;
+ } catch (InterruptedException e) {
+ throw new RuntimeException("Interrupted while waiting for
bootstrap.", e);
+ }
+ }
+ if (bootstrapJobIds == null) {
+ throw new RuntimeException(
+ "Bootstrap of Flink SQL engine timed out after "
+ + BOOTSTRAP_WAIT_INTERVAL * BOOTSTRAP_WAIT_RETRIES
+ + ". "
+ + "Please check the engine log for more details.");
Review Comment:
```suggestion
+ ". Please check the engine log for more details.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]