MapR dbclient Behavior

Requests from client applications to connect to MapR-DB are handled by the MapR dbclient. This dbclient has the following behaviors when establishing the first connection and when re-establishing connections after the CLDB goes offline.

Establishing Connections

Client applications connect to a MapR cluster via CLDB nodes, which are listed in the connection request or in the mapr-clusters.conf file on the client application's system. When a client application attempts to connnect to MapR-DB for the first time through the MapR dbclient, the following scenarios can occur:

  • At least one of the CLDB nodes is online, in which case the connection is successful.
  • None of the CLDB nodes are online, in which case the connection attempt fails.
  • The CLBD nodes are listed incorrectly (e.g. the IP addresses are incorrect), in which case the connection attempt fails.

In the second and third cases, the dbclient returns the error code 1 to the client application.

Re-establishing Failed Connections

If the CLDB goes down after a client application establishes its first connection to MapR-DB, MapR dbclient's behavior depends on the setting for the fs.mapr.hardmount setting in in the core-site.xml file on the client:

  • If fs.mapr.hardmount is set to true, the dbclient hangs as it continuously attempts to reconnect to the CLDB. The dbclient stops hanging when the CLDB is brought back online.
  • If fs.mapr.hardmount is set to false, the dbclient attempts to connect to each CLDB node that is listed in the mapr-clusters.conf file on the client application's system. If all of the CLDB nodes are down, the dbclient returns the error EAGAIN/-EAGAIN to the client application. This error indicates that a connection could not be established because the CLDB nodes were not available or because the request timed out due to reasons, such as heavy traffic caused the network to be slow or other nodes were unavailable.