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

[FLINK-37083][e2e] Fix failed SqlYARNApplicationITCase on AZP #25936

Merged
merged 3 commits into from
Jan 13, 2025
Merged
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 @@ -86,14 +86,24 @@ void testDeployScriptViaSqlClient() throws Exception {
}

private void runSqlClient() throws Exception {
Path path = flinkLibFolder.getParentFile().toPath().resolve("bin").resolve("sql-client.sh");
if (!path.toFile().exists()) {
File sqlClientScript =
new File(
flinkLibFolder
.getParentFile()
.toPath()
.resolve("bin")
.resolve("sql-client.sh")
.toUri());
if (!sqlClientScript.exists()) {
throw new RuntimeException();
} else {
// make sure the subprocess has permission to execute the file.
Runtime.getRuntime().exec("chmod +x " + sqlClientScript.getCanonicalPath()).waitFor();
}

List<String> parameters = new ArrayList<>();
// command line parameters: sql-client.sh -Dkey=value -f <path-to-script>
parameters.add(path.toString());
parameters.add(sqlClientScript.getCanonicalPath());
parameters.add(
getSqlClientParameter(JobManagerOptions.TOTAL_PROCESS_MEMORY.key(), "768MB"));
parameters.add(getSqlClientParameter(TaskManagerOptions.TOTAL_PROCESS_MEMORY.key(), "1g"));
Expand All @@ -109,6 +119,8 @@ private void runSqlClient() throws Exception {
parameters.add("-f");
parameters.add(script.getAbsolutePath());

LOG.info("Running process with parameters: {}", parameters);

ProcessBuilder builder = new ProcessBuilder(parameters);
// prepare environment
builder.environment().put("HADOOP_CLASSPATH", getYarnClasspath());
Expand Down