private static final class FanOutOneBlockAsyncDFSOutputSaslHelper.SaslNegotiateHandler extends org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.hdfs.DFSClient |
dfsClient |
private org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void> |
promise |
private SaslClient |
saslClient |
private Map<String,String> |
saslProps |
private int |
step |
private int |
timeoutMs |
Constructor and 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) |
Modifier and Type | Method and 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 |
checkSaslComplete() |
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> |
getCipherOptions() |
private String |
getNegotiatedQop() |
void |
handlerAdded(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) |
private boolean |
isNegotiatedQopPrivacy() |
private boolean |
requestedQopContainsPrivacy() |
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 |
useWrap() |
bind, close, connect, deregister, disconnect, flush, read, write
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
ensureNotSharable, handlerRemoved, isSharable
private final org.apache.hadoop.conf.Configuration conf
private final SaslClient saslClient
private final int timeoutMs
private final org.apache.hadoop.hdfs.DFSClient dfsClient
private int step
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
SaslException
private void sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload) throws IOException
IOException
private List<org.apache.hadoop.crypto.CipherOption> getCipherOptions() throws IOException
IOException
private void sendSaslMessage(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, byte[] payload, List<org.apache.hadoop.crypto.CipherOption> options) throws IOException
IOException
public void handlerAdded(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception
handlerAdded
in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
handlerAdded
in class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
Exception
public void channelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
channelInactive
in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
Exception
private void check(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto) throws IOException
IOException
private String getNegotiatedQop()
private boolean isNegotiatedQopPrivacy()
private boolean requestedQopContainsPrivacy()
private void checkSaslComplete() throws IOException
IOException
private boolean useWrap()
private org.apache.hadoop.crypto.CipherOption unwrap(org.apache.hadoop.crypto.CipherOption option, SaslClient saslClient) throws IOException
IOException
private org.apache.hadoop.crypto.CipherOption getCipherOption(org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto proto, boolean isNegotiatedQopPrivacy, SaslClient saslClient) throws IOException
IOException
public void channelRead(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
channelRead
in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
channelRead
in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
exceptionCaught
in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
exceptionCaught
in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void userEventTriggered(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
userEventTriggered
in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
userEventTriggered
in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.