Supported by libMapRClient for hadoop-2.x

Connects to a MapR Filesystem cluster.

The function returns a handle to a new connection instance.

Note: If default is used for the host parameter, this means connect to the first cluster listed in the MAPR_HOME/conf/mapr-clusters.conf file on the client.

For more information about connections, see Establishing Connections to MapR Filesystem.


hdfsFS hdfsConnectNewInstance(const char* host, tPort port)


Parameter Description
host A string containing either a hostname or an IP address of a CLDB node of a MapR Filesystem cluster.

To connect to the first MapR Filesystem 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 The user connected to the cluster.

Return Value

Returns a handle to the connected filesystem, or NULL on error.