Íñigo Goiri commented on HADOOP-13144:

We see this issue in the Router as we are constrained by the number of 
The solution we internally have for this problem is to allow specifying the 
connection and the socket factory as in  [^HADOOP-13144.000.patch].
Then from {{ConnectionPool}} we can do:
  private static ConnectionContext newClientConnection(
      Configuration conf, String nnAddress, UserGroupInformation ugi, int index)
          throws IOException {
        conf, ClientNamenodeProtocolPB.class, ProtobufRpcEngine.class);

    final RetryPolicy defaultPolicy = RetryUtils.getDefaultRetryPolicy(

    SocketFactory factory = SocketFactory.getDefault();
    if (UserGroupInformation.isSecurityEnabled()) {
    InetSocketAddress socket = NetUtils.createSocketAddr(nnAddress);
    final long version = RPC.getProtocolVersion(ClientNamenodeProtocolPB.class);
    int timeout = org.apache.hadoop.ipc.Client.getTimeout(conf);
    FederationConnectionId connectionId = new FederationConnectionId(
        socket, ClientNamenodeProtocolPB.class, ugi, timeout, defaultPolicy,
        conf, index);
    ClientNamenodeProtocolPB proxy = RPC.getProtocolProxy(
        ClientNamenodeProtocolPB.class, version, connectionId, conf, factory)
    ClientProtocol client = new ClientNamenodeProtocolTranslatorPB(proxy);
    Text dtService = SecurityUtil.buildTokenService(socket);

    ProxyAndInfo<ClientProtocol> clientProxy =
        new ProxyAndInfo<ClientProtocol>(client, dtService, socket);
    ConnectionContext connection = new ConnectionContext(clientProxy);
    return connection;

[~linyiqun], at some point you mentioned you had seen a similar issue.
Was the fix similar?

> Enhancing IPC client throughput via multiple connections per user
> -----------------------------------------------------------------
>                 Key: HADOOP-13144
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13144
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ipc
>            Reporter: Jason Kace
>            Priority: Minor
>         Attachments: HADOOP-13144.000.patch
> The generic IPC client ({{org.apache.hadoop.ipc.Client}}) utilizes a single 
> connection thread for each {{ConnectionId}}.  The {{ConnectionId}} is unique 
> to the connection's remote address, ticket and protocol.  Each ConnectionId 
> is 1:1 mapped to a connection thread by the client via a map cache.
> The result is to serialize all IPC read/write activity through a single 
> thread for a each user/ticket + address.  If a single user makes repeated 
> calls (1k-100k/sec) to the same destination, the IPC client becomes a 
> bottleneck.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to