mirror of https://github.com/apache/druid.git
Update ForkingTaskRunner to remove @Deprecated Files method usage
This commit is contained in:
parent
2681da4420
commit
325a5c4abc
|
@ -234,7 +234,7 @@ public class ForkingTaskRunner implements TaskRunner, TaskLogStreamer
|
||||||
log.info("Logging task %s output to: %s", task.getId(), logFile);
|
log.info("Logging task %s output to: %s", task.getId(), logFile);
|
||||||
boolean runFailed = true;
|
boolean runFailed = true;
|
||||||
|
|
||||||
try (final OutputStream toLogfile = Files.newOutputStreamSupplier(logFile).getOutput()) {
|
try (final OutputStream toLogfile = Files.asByteSink(logFile).openBufferedStream()) {
|
||||||
ByteStreams.copy(processHolder.process.getInputStream(), toLogfile);
|
ByteStreams.copy(processHolder.process.getInputStream(), toLogfile);
|
||||||
final int statusCode = processHolder.process.waitFor();
|
final int statusCode = processHolder.process.waitFor();
|
||||||
log.info("Process exited with status[%d] for task: %s", statusCode, task.getId());
|
log.info("Process exited with status[%d] for task: %s", statusCode, task.getId());
|
||||||
|
|
Loading…
Reference in New Issue