Configuring the MapR FUSE-Based POSIX Client

The POSIX client configuration values can be set in the /opt/mapr/conf/fuse.conf file. Edit the configuration file to define the values for the following parameters and save the file.

To ensure that the service can be started and stopped and to run the help option, set the shared LD_LIBRARY_PATH environment variable. Update the shared library environment variable to include the paths to the following:

  • Full path to the directory containing libjvm.so file
  • $MAPR_HOME/lib (that is, /opt/mapr/lib directory)

For example:

export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79.x86_64/jre/lib/amd64/server/:/opt/mapr/lib
To retrieve the list of configuration parameters, run the following command:
/opt/mapr/bin/posix-client-* --help
Here * refers to basic or platinum client package installed on the system. For more information on the non-mapr configuration parameters, refer to FUSE documentation.
NOTE: The MapR FUSE-based POSIX clients support only the configuration parameters in the fuse.conf file. All other FUSE configuration parameters are not supported.
Parameter Default Value Description
fuse.mount.point (Required) Specifies the mount point where MapR-FS must be mounted. Ensure that the specified mount point is empty before starting the service.
NOTE: If NFS server is also running on this node, ensure that the FUSE mount point is different from the NFS server mount point.
fuse.log.path /opt/mapr/logs Specifies the path where the log files must be stored.
fuse.allow.other 1 Allow all users to access the filesystem. Value can be:
  • 0 - to not allow other users
  • 1 - to allow other users

Set this to 1 only if the service is started by the root user and set to 0 if the service is started by non-root user.

fuse.big.writes 1 Specifies whether to enable writes larger than 4KB. Value can be:
  • 0 - disable
  • 1 - enable
fuse.affinity 0 (disabled) Specifies whether to enable (1) or disable (0) NUMA affinity. If enabled, sets the NUMA affinity for the POSIX client.
fuse.auto.unmount 1 (enabled) Specifies whether to automatically unmount the filesystem when the process is terminated. Value can be:
  • 0 - disable
  • 1 - enable
fuse.num.libs
  • Basic - 1
  • Platinum - 5
(Required) Specifies the number of client libraries to run with. For:
  • Basic client, value must be 1.
  • Platinum client, value can be greater than 5.
fuse.debug 0 Specifies whether to run FUSE in debug mode. Values can be:
  • 0 - not to run in debug mode
  • 1 - run in debug mode
NOTE: If FUSE is run in debug mode, it will run as a foreground process.
fuse.ra.sessions 5 Specifies the number of parallel read ahead sessions per library. Each open file acts as one read ahead session. If value is set to 0, readahead will be disabled.
fuse.num.threads 10 Specifies the number of FUSE threads. Recommended value is only up to 64.
fuse.asyncdirect.io 1 (enabled) Specifies whether to enable asynchronous direct IO. Value can be:
  • 0 - disable
  • 1 - enable
fuse.max.read 128k Specifies the maximum size of read requests.
fuse.max.readahead 128k Specifies the maximum bytes to readahead.
fuse.max.write 128k Specifies the maximum size allowed in a (single) write request.
fuse.sync.read 0 Specifies whether to enable or disable synchronized reads. Value can be:
  • 0 - disable
  • 1 - enable
fuse.max.background 64 Specifies the maximum number of background requests to process.
fuse.congestion.threshold 10 Specifies the kernel’s congestion threshold.
fuse.flush.inline 0 Specifies whether (1) or not (0) to flush all writes inline. Value can be:
  • 0 - disable inline flushing
  • 1 - flush all writes inline
fuse.fast.local.directio 0 Specifies whether to optimize or disable FUSE client for local direct IO. Value can be:
  • 0 - disable
  • 1 - optimize
fuse.disable.shardcache 0 Specifies whether to disable shard cache. Value can be:
  • 0 - false
  • 1 - true
fuse.fsname Specifies the filesystem source. The default value is the FUSE mountpoint.
fuse.ticketfile.location /tmp/maprticket_<uid> Specifies the ticket to use to start the service in secure or unsecure mode.
NOTE: To support impersonation, provide the mapr user ticket file location.

You must start/restart the FUSE-based POSIX client for the changes to take effect. See Starting and Stopping the POSIX Client for more information.

Verifying MapR POSIX Client Licenses

You can check how many MapR POSIX Client licenses are available by clicking on System Settings > Manage Licenses in the navigation pane of the MCS. When the License Management dialog box displays, look under Additional Features to find the number of POSIX Client nodes that can consume a MapR POSIX Client license.

Mounting the MapR-FS

To mount MapR-FS at the mount point specified in the /opt/mapr/conf/fuse.conf file, create the mountpoint specified in the fuse.conf file and start the service. For example:

mkdir /mapr
service mapr-posix-client-* start
NOTE: When you run the command, replace * with basic or platinum, which corresponds with the package that is installed on the system.
Enabling Soft Mount and Setting the Timeout

By default, all MapR-FS, MapR-DB, and MapR-Streams operations never timeout as they wait (hard mount behavior) for the operation to succeed and/or the server to respond. You can configure a soft mount behavior by setting the values for the following parameters in the core-site.xml or hbase-site.xml file:

fs.mapr.hardmount
Specifies whether or not to enable hard mount. Value can be:
  • true - enable hard mount
  • false - disable hard mount
The default value is true.
fs.mapr.rpc.timeout
Specifies the RPC timeout value in seconds. The default value is 300 seconds. The value cannot be less than 30 seconds. If the value is greater than 300 seconds, TCP keepalive probes are sent to prevent the TCP socket from timing out. If value is below 300 seconds, the RPCs will timeout after the specified time.

These parameter settings affect all clients.

NOTE: For MapR-Streams, these parameters can be set as configuration properties when constructing the Consumer or Producer Java object. For more information, see MapR-Streams.

To configure the soft mount behavior, open the core-site.xml or hbase-site.xml file, add the parameters as shown below, and save and close the file.

Enable Soft Mount
<property>
   <name>fs.mapr.hardmount</name>
   <value>false</value>
   <description>enabling soft mount by setting value to false</description>
 </property>
Specify RPC Timeout
<property>
   <name>fs.mapr.rpc.timeout</name>
   <value>30</value>
   <description>RPC timeout value</description>
</property>

Registering POSIX Client with Additional Clusters

To register the POSIX client with additional clusters, you must add entries directly to the /opt/mapr/conf/mapr-clusters.conf file. The clusters will be visible after few minutes.

Setting the Log Level

The log level can be set in the /opt/mapr/hadoop/hadoop-0.20.2/conf/core-site.xml file. By default, it is set to ERROR. If you want to change the log level to another (such as FATAL, DEBUG, WARN, ERROR, CRITICAL, or OFF), open the file, add the following, and save the file:

<configuration>
   <property>
      <name>fs.mapr.trace</name>
      <value>DEBUG | INFO | WARN | ERROR | CRITICAL | FATAL | OFF</value>
   </property>
</configuration>
NOTE: See core-site.xml for more information.

Configuring the Chunk Size

By default, sharding takes effect only if chunk size is >0 and <=2MB. To increase the upper limit (up to 256MB) on the chunk size, set the value (in bytes) for the fs.mapr.fuseshard.chunksize configuration field in the core-site.xml file. For example:

<property>
   <name>fs.mapr.fuseshard.chunksize</name>
   <value>2097152</value>
   <description>setting chunk size</description>
</property>
Definining File/Directory Compression and Chunk Size
Each directory in MapR storage contains a hidden file called .dfs_attributes that controls compression and chunk size. To change these attributes, change the corresponding values in the file. For more information, see .dfs_attributes.