Skip to content

Commit

Permalink
[FLINK-16188][e2e] AutoClosableProcess constructor now private
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Feb 23, 2020
1 parent 0aa296c commit 40c0ba3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class AutoClosableProcess implements AutoCloseable {

private final Process process;

public AutoClosableProcess(final Process process) {
private AutoClosableProcess(final Process process) {
Preconditions.checkNotNull(process);
this.process = process;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ public JobID submitJob(final JobSubmission jobSubmission) throws IOException {

LOG.info("Running {}.", commands.stream().collect(Collectors.joining(" ")));

try (AutoClosableProcess flink = new AutoClosableProcess(new ProcessBuilder()
.command(commands)
.start())) {
try (AutoClosableProcess flink = AutoClosableProcess.runNonBlocking(commands.toArray(String[]::new))) {

final Pattern pattern = jobSubmission.isDetached()
? Pattern.compile("Job has been submitted with JobID (.*)")
Expand Down

0 comments on commit 40c0ba3

Please sign in to comment.