@ChannelHandler.Sharable public class TaskManagerLogHandler extends RedirectHandler<JobManagerGateway> implements WebHandler
This code is based on the "HttpStaticFileServerHandler" from the Netty project's HTTP server example.
Modifier and Type | Class and Description |
---|---|
static class |
TaskManagerLogHandler.FileMode
Used to control whether this handler serves the .log or .out file.
|
leaderRetriever, localAddressFuture, logger, responseHeaders, timeout
Constructor and Description |
---|
TaskManagerLogHandler(GatewayRetriever<JobManagerGateway> retriever,
Executor executor,
CompletableFuture<String> localJobManagerAddressPromise,
Time timeout,
TaskManagerLogHandler.FileMode fileMode,
Configuration config) |
Modifier and Type | Method and Description |
---|---|
String[] |
getPaths()
Returns an array of REST URL's under which this handler can be registered.
|
protected void |
respondAsLeader(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.router.Routed routed,
JobManagerGateway jobManagerGateway)
Response when running with leading JobManager.
|
channelRead0
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
handlerAdded, handlerRemoved, isSharable
public TaskManagerLogHandler(GatewayRetriever<JobManagerGateway> retriever, Executor executor, CompletableFuture<String> localJobManagerAddressPromise, Time timeout, TaskManagerLogHandler.FileMode fileMode, Configuration config)
public String[] getPaths()
WebHandler
getPaths
in interface WebHandler
protected void respondAsLeader(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.router.Routed routed, JobManagerGateway jobManagerGateway)
respondAsLeader
in class RedirectHandler<JobManagerGateway>
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.