Accessing MapR-FS with C Applications
MapR provides a modified version of libhdfs
that supports access to
the MapR file system. You can develop applications with C that read files, write to files, change
file permissions and file ownership, create and delete files and directories, rename
files, and change the access and modification times of files and directories.
libMapRClient
supports and makes modifications to hadoop-2.x version of
libhdfs
. The API reference notes which APIs are supported by
hadoop-2.x.
libMapRClient
’s version of libhdfs
contains the
following changes and additions:
- There are no calls to a JVM, so applications run faster and more efficiently.
- Changes to APIs
-
hadoop-2.x: Support for
hdfsBuilder
structures for connections to HDFS is limited. Some of the parameters are ignored. -
hadoop-2.x:
hdfsGetDefaultBlockSize()
: If the file system that the client is connected to is an instance of MapR-FS, the returned value is 256 MB, regardless of the actual setting. -
hadoop-2.x:
hdfsCreateDirectory()
: The parameters for buffer size, replication, and block size are ignored for connections to MapR file system. -
hadoop-2.x:
hdfsGetDefaultBlockSizeAtPath()
: If the file system that the client is connected to is an instance of MapR-FS, the returned value is 256 MB, regardless of the actual setting. -
hadoop-2.x:
hdfsOpenFile()
: The parameters for buffer size and replication are ignored for connections to MapR file system.
-
hadoop-2.x: Support for
- APIs that are unique to
libMapRClient
for hadoop-2.xhdfsCreateDirectory2()
hdfsGetNameContainerSizeBytes()
hdfsOpenFile2()
hdfsSetRpcTimeout()
hdfsSetThreads()