mirror of https://github.com/apache/druid.git
fix task log streaming
This commit is contained in:
parent
016d07fda3
commit
bd91a40491
|
@ -412,9 +412,7 @@ public class OverlordResource
|
||||||
try {
|
try {
|
||||||
final Optional<ByteSource> stream = taskLogStreamer.streamTaskLog(taskid, offset);
|
final Optional<ByteSource> stream = taskLogStreamer.streamTaskLog(taskid, offset);
|
||||||
if (stream.isPresent()) {
|
if (stream.isPresent()) {
|
||||||
try(InputStream istream = stream.get().openStream()) {
|
return Response.ok(stream.get().openStream()).build();
|
||||||
return Response.ok(istream).build();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return Response.status(Response.Status.NOT_FOUND)
|
return Response.status(Response.Status.NOT_FOUND)
|
||||||
.entity(
|
.entity(
|
||||||
|
|
Loading…
Reference in New Issue