Class SaslDataTransferServer
java.lang.Object
org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferServer
Negotiates SASL for DataTransferProtocol on behalf of a server. There are
two possible supported variants of SASL negotiation: either a general-purpose
negotiation supporting any quality of protection, or a specialized
negotiation that enforces privacy as the quality of protection using a
cryptographically strong encryption key.
This class is used in the DataNode for handling inbound connections.
-
Constructor Summary
ConstructorsConstructorDescriptionSaslDataTransferServer(DNConf dnConf, BlockPoolTokenSecretManager blockPoolTokenSecretManager) Creates a new SaslDataTransferServer. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.protocol.datatransfer.IOStreamPairreceive(org.apache.hadoop.hdfs.net.Peer peer, OutputStream underlyingOut, InputStream underlyingIn, int xferPort, org.apache.hadoop.hdfs.protocol.DatanodeID datanodeId) Receives SASL negotiation from a peer on behalf of a server.
-
Constructor Details
-
SaslDataTransferServer
public SaslDataTransferServer(DNConf dnConf, BlockPoolTokenSecretManager blockPoolTokenSecretManager) Creates a new SaslDataTransferServer.- Parameters:
dnConf- configuration of DataNodeblockPoolTokenSecretManager- used for checking block access tokens and encryption keys
-
-
Method Details
-
receive
public org.apache.hadoop.hdfs.protocol.datatransfer.IOStreamPair receive(org.apache.hadoop.hdfs.net.Peer peer, OutputStream underlyingOut, InputStream underlyingIn, int xferPort, org.apache.hadoop.hdfs.protocol.DatanodeID datanodeId) throws IOException Receives SASL negotiation from a peer on behalf of a server.- Parameters:
peer- connection peerunderlyingOut- connection output streamunderlyingIn- connection input streamxferPort- data transfer port of DataNode accepting connectiondatanodeId- ID of DataNode accepting connection- Returns:
- new pair of streams, wrapped after SASL negotiation
- Throws:
IOException- for any error
-
getNegotiatedQOP
-