Skip to content

Commit

Permalink
[FLINK-28767][sql-gateway] Fix unstable SqlGatewayServiceITCase.testC…
Browse files Browse the repository at this point in the history
…ancelOperation
  • Loading branch information
fsk119 committed Aug 12, 2022
1 parent 4ebb787 commit 8813a5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import java.util.Objects;
import java.util.stream.Collectors;

import static org.apache.flink.table.catalog.hive.HiveCatalog.isEmbeddedMetastore;
import static org.apache.flink.table.endpoint.hive.HiveServer2EndpointConfigOptions.CATALOG_HIVE_CONF_DIR;
import static org.apache.flink.table.endpoint.hive.HiveServer2EndpointConfigOptions.THRIFT_PORT;
import static org.apache.flink.tests.util.TestUtils.readCsvResultFiles;
Expand Down Expand Up @@ -134,7 +133,7 @@ private static File createHiveConf() {
.toURI()))) {
hiveConf.addResource(inputStream, HiveCatalog.HIVE_SITE_FILE);
// trigger a read from the conf so that the input stream is read
isEmbeddedMetastore(hiveConf);
hiveConf.getVar(HiveConf.ConfVars.METASTOREURIS);
} catch (Exception e) {
throw new RuntimeException("Failed to load hive-site.xml from specified path", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ public void run() {
runBefore();
resultFetcher = resultSupplier.call();
runAfter();
} catch (InterruptedException e) {
// User cancel the execution.
LOG.error(
String.format(
"Operation %s is interrupted.", operationHandle),
e);
} catch (Throwable t) {
processThrowable(t);
}
Expand Down

0 comments on commit 8813a5a

Please sign in to comment.