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 ClassesModifier and TypeClassDescriptionprivate static classThe 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
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configurationprivate final org.apache.hadoop.hdfs.DFSClientprivate final org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void>private final SaslClientprivate intprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) voidchannelRead(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg) private voidcheck(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto) private voidvoidexceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) private org.apache.hadoop.crypto.CipherOptiongetCipherOption(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto, boolean isNegotiatedQopPrivacy, SaslClient saslClient) private List<org.apache.hadoop.crypto.CipherOption>private StringvoidhandlerAdded(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) private booleanprivate booleanprivate voidsendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload) private voidsendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload, List<org.apache.hadoop.crypto.CipherOption> options) private org.apache.hadoop.crypto.CipherOptionunwrap(org.apache.hadoop.crypto.CipherOption option, SaslClient saslClient) voiduserEventTriggered(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt) private booleanuseWrap()Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read, writeMethods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedMethods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
handlerRemoved
-
Field Details
-
conf
-
saslProps
-
saslClient
-
timeoutMs
-
promise
-
dfsClient
-
step
-
-
Constructor Details
-
SaslNegotiateHandler
public 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) throws SaslException- Throws:
SaslException
-
-
Method Details
-
sendSaslMessage
private void sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload) throws IOException - Throws:
IOException
-
getCipherOptions
- 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:
handlerAddedin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelHandler- Overrides:
handlerAddedin classorg.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:
channelInactivein interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classorg.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
-
requestedQopContainsPrivacy
-
checkSaslComplete
- Throws:
IOException
-
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:
channelReadin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classorg.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:
exceptionCaughtin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classorg.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:
userEventTriggeredin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-