From 325a5c4abc3248395dd22cb32f86e9dc84f411a2 Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Wed, 3 Dec 2014 13:18:33 -0800 Subject: [PATCH] Update ForkingTaskRunner to remove @Deprecated Files method usage --- .../main/java/io/druid/indexing/overlord/ForkingTaskRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java index 01696f86bef..5443a9b39a7 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java @@ -234,7 +234,7 @@ public class ForkingTaskRunner implements TaskRunner, TaskLogStreamer log.info("Logging task %s output to: %s", task.getId(), logFile); 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); final int statusCode = processHolder.process.waitFor(); log.info("Process exited with status[%d] for task: %s", statusCode, task.getId());