hdfsConnectAsUid()
Connects to a file system cluster as specified user ID.
Supported by libMapRClient
for hadoop-2.x
If a connection to the cluster in which the remote host is located already exists, the function returns a handle to this existing connection.
If a connection to the cluster does not already exist, the function returns a unique handle to a connection instance for the specified user ID.
default
as the value for the host
parameter.For more information about connections, see Establishing Connections to the File System.
Signature
hdfsFS hdfsConnectAsUid(const char* host, tPort port, uid_t uid)
Parameters
Parameter | Description |
---|---|
host |
A string containing either a hostname or an IP address of a CLDB node
of a file system cluster. To connect to the first file system cluster that is specified in MAPR_HOME/conf/mapr-clusters.conf on the client, pass the value default and use the port number 0. This parameter does not accept NULL as a value. |
port |
The port on which the host is listening. |
user ID |
The ID of the user connected to the cluster. |
Return Value
Returns a handle to the connected file system, or NULL on error.