Class IsolatedIngestionServerHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
-
- com.linkedin.davinci.ingestion.isolated.IsolatedIngestionServerHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class IsolatedIngestionServerHandler extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>This is the handler class forIsolatedIngestionServer. This handler will be spawn to handle the followingIngestionActionrequest from main process: (1)IngestionAction.COMMAND: Different kinds of ingestion commands to control the ingestion of a topic (partition). (2)IngestionAction.METRIC: Request to collect metrics from child process and report to InGraph service. (3)IngestionAction.HEARTBEAT: Request to check the health of child process for monitoring purpose. (4)IngestionAction.UPDATE_METADATA: A special kind of request to update metadata of topic partitions opened in main process. As of current ingestion isolation design, metadata partition of a topic will always be opened in child process.MainIngestionStorageMetadataServicemaintains in-memory cache of metadata in main process, and it will persist metadata updates via this requests. (5)IngestionAction.SHUTDOWN_COMPONENT: Request to shut down a specific ingestion component gracefully. This class contains all the logic details to handle above requests and sends backIngestionAction.REPORTAlso, it registers ingestion listener which relays status reporting to main process.
-
-
Constructor Summary
Constructors Constructor Description IsolatedIngestionServerHandler(IsolatedIngestionServer isolatedIngestionServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest msg)voidchannelReadComplete(io.netty.channel.ChannelHandlerContext ctx)voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)protected voidvalidateAndExecuteCommand(IngestionCommandType command, IngestionTaskReport report, java.lang.Runnable commandRunnable)-
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
IsolatedIngestionServerHandler
public IsolatedIngestionServerHandler(IsolatedIngestionServer isolatedIngestionServer)
-
-
Method Detail
-
channelReadComplete
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelReadCompletein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadCompletein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead0
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest msg) throws java.lang.Exception- Specified by:
channelRead0in classio.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>- Throws:
java.lang.Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
validateAndExecuteCommand
protected void validateAndExecuteCommand(IngestionCommandType command, IngestionTaskReport report, java.lang.Runnable commandRunnable)
-
-