RemotePeerFactory (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs, interface: RemotePeerFactory

Package org.apache.hadoop.hdfs

# Interface RemotePeerFactory

All Known Implementing Classes:
  `DFSClient`

@Private public interface RemotePeerFactory

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Peer`
  `newConnectedPeer(InetSocketAddress addr, org.apache.hadoop.security.token.Token<BlockTokenIdentifier> blockToken, DatanodeID datanodeId)`

- ## Method Details

  - ### newConnectedPeer

    Peer newConnectedPeer(InetSocketAddress addr, org.apache.hadoop.security.token.Token<BlockTokenIdentifier> blockToken, DatanodeID datanodeId) throws IOException
    Parameters:
      `addr` - The address to connect to.
      `blockToken` - Token used during optional SASL negotiation
      `datanodeId` - ID of destination DataNode
    Returns:
      A new Peer connected to the address.
    Throws:
      `IOException` - If there was an error connecting or creating the remote socket, encrypted stream, etc.