Class FanOutOneBlockAsyncDFSOutputSaslHelper.SaslNegotiateHandler

java.lang.Object
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
org.apache.hadoop.hbase.io.asyncfs.FanOutOneBlockAsyncDFSOutputSaslHelper.SaslNegotiateHandler
All Implemented Interfaces:
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler, org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler, org.apache.hbase.thirdparty.io.netty.channel.ChannelOutboundHandler
Enclosing class:
FanOutOneBlockAsyncDFSOutputSaslHelper

private static final class FanOutOneBlockAsyncDFSOutputSaslHelper.SaslNegotiateHandler extends org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static class 
    The asyncfs subsystem emulates a HDFS client by sending protobuf messages via netty.

    Nested classes/interfaces inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler

    org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.apache.hadoop.conf.Configuration
     
    private final org.apache.hadoop.hdfs.DFSClient
     
    private final org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void>
     
    private final SaslClient
     
    private final Map<String,String>
     
    private int
     
    private final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SaslNegotiateHandler(org.apache.hadoop.conf.Configuration conf, String username, char[] password, Map<String,String> saslProps, int timeoutMs, org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void> promise, org.apache.hadoop.hdfs.DFSClient dfsClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx)
     
    void
    channelRead(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    private void
    check(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto)
     
    private void
     
    void
    exceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     
    private org.apache.hadoop.crypto.CipherOption
    getCipherOption(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto, boolean isNegotiatedQopPrivacy, SaslClient saslClient)
     
    private List<org.apache.hadoop.crypto.CipherOption>
     
    private String
     
    void
    handlerAdded(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx)
     
    private boolean
     
    private boolean
     
    private void
    sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload)
     
    private void
    sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload, List<org.apache.hadoop.crypto.CipherOption> options)
     
    private org.apache.hadoop.crypto.CipherOption
    unwrap(org.apache.hadoop.crypto.CipherOption option, SaslClient saslClient)
     
    void
    userEventTriggered(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt)
     
    private boolean
     

    Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler

    bind, close, connect, deregister, disconnect, flush, read, write

    Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged

    Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler

    handlerRemoved
  • Field Details

  • Constructor Details

  • Method Details

    • sendSaslMessage

      private void sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload) throws IOException
      Throws:
      IOException
    • getCipherOptions

      private List<org.apache.hadoop.crypto.CipherOption> getCipherOptions() throws IOException
      Throws:
      IOException
    • sendSaslMessage

      private void sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload, List<org.apache.hadoop.crypto.CipherOption> options) throws IOException
      Throws:
      IOException
    • handlerAdded

      public void handlerAdded(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      handlerAdded in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
      Overrides:
      handlerAdded in class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception
    • channelInactive

      public void channelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • check

      private void check(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto) throws IOException
      Throws:
      IOException
    • getNegotiatedQop

    • isNegotiatedQopPrivacy

      private boolean isNegotiatedQopPrivacy()
    • requestedQopContainsPrivacy

      private boolean requestedQopContainsPrivacy()
    • checkSaslComplete

      private void checkSaslComplete() throws IOException
      Throws:
      IOException
    • useWrap

      private boolean useWrap()
    • unwrap

      private org.apache.hadoop.crypto.CipherOption unwrap(org.apache.hadoop.crypto.CipherOption option, SaslClient saslClient) throws IOException
      Throws:
      IOException
    • getCipherOption

      private org.apache.hadoop.crypto.CipherOption getCipherOption(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto, boolean isNegotiatedQopPrivacy, SaslClient saslClient) throws IOException
      Throws:
      IOException
    • channelRead

      public void channelRead(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • exceptionCaught

      public void exceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
      Specified by:
      exceptionCaught in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • userEventTriggered

      public void userEventTriggered(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
      Specified by:
      userEventTriggered in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      userEventTriggered in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception