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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest msg)
     
    void
    channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     
    protected void
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Constructor Details

    • IsolatedIngestionServerHandler

      public IsolatedIngestionServerHandler(IsolatedIngestionServer isolatedIngestionServer)
  • Method Details

    • channelReadComplete

      public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelReadComplete in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapter
    • channelRead0

      protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest msg) throws Exception
      Specified by:
      channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
      Throws:
      Exception
    • exceptionCaught

      public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
    • validateAndExecuteCommand

      protected void validateAndExecuteCommand(IngestionCommandType command, IngestionTaskReport report, Runnable commandRunnable)