Merge pull request #933 from metamx/removeDeprecatedFiles

Update ForkingTaskRunner to remove @Deprecated Files method usage
This commit is contained in:
Fangjin Yang 2014-12-03 17:27:30 -07:00
commit 6533de3563
1 changed files with 1 additions and 1 deletions

View File

@ -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());