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 for
IsolatedIngestionServer. This handler will be spawn to handle
the following IngestionAction request 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.
MainIngestionStorageMetadataService maintains 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 back IngestionAction.REPORT
Also, it registers ingestion listener which relays status reporting to main process.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
ConstructorsConstructorDescriptionIsolatedIngestionServerHandler(IsolatedIngestionServer isolatedIngestionServer) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, Throwable cause) protected voidvalidateAndExecuteCommand(IngestionCommandType command, IngestionTaskReport report, Runnable commandRunnable) Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
IsolatedIngestionServerHandler
-
-
Method Details
-
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 Exception - Specified by:
channelRead0in classio.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>- Throws:
Exception
-
exceptionCaught
- 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, Runnable commandRunnable)
-