public class ConnectionManager
extends java.lang.Object
Router to be able to open
many connections to many Namenodes.| Constructor | Description |
|---|---|
ConnectionManager(org.apache.hadoop.conf.Configuration config) |
|
ConnectionManager(org.apache.hadoop.conf.Configuration config,
org.apache.hadoop.hdfs.server.federation.router.RouterStateIdContext routerStateIdContext) |
Creates a proxy client connection pool manager.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Stop the connection manager by closing all the pools.
|
ConnectionContext |
getConnection(org.apache.hadoop.security.UserGroupInformation ugi,
java.lang.String nnAddress,
java.lang.Class<?> protocol,
java.lang.String nsId) |
Fetches the next available proxy client in the pool.
|
java.lang.String |
getJSON() |
Get a JSON representation of the connection pool.
|
int |
getNumActiveConnections() |
Get number of active connections.
|
int |
getNumActiveConnectionsRecently() |
Get number of recently active connections.
|
int |
getNumConnectionPools() |
Get the number of connection pools.
|
int |
getNumConnections() |
Get number of open connections.
|
int |
getNumCreatingConnections() |
Get the number of connections to be created.
|
int |
getNumIdleConnections() |
Get number of idle connections.
|
void |
start() |
Start the connection manager.
|
public ConnectionManager(org.apache.hadoop.conf.Configuration config)
public ConnectionManager(org.apache.hadoop.conf.Configuration config,
org.apache.hadoop.hdfs.server.federation.router.RouterStateIdContext routerStateIdContext)
config - Configuration for the connections.routerStateIdContext - Federated namespace context for router.public void start()
public void close()
public ConnectionContext getConnection(org.apache.hadoop.security.UserGroupInformation ugi, java.lang.String nnAddress, java.lang.Class<?> protocol, java.lang.String nsId) throws java.io.IOException
ugi - User group information.nnAddress - Namenode address for the connection.protocol - Protocol for the connection.nsId - Nameservice identity.java.io.IOException - If the connection cannot be obtained.public int getNumConnectionPools()
public int getNumConnections()
public int getNumActiveConnections()
public int getNumIdleConnections()
public int getNumActiveConnectionsRecently()
public int getNumCreatingConnections()
public java.lang.String getJSON()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.