Accessing the File System with C Applications

HPE Ezmeral Data Fabric provides a modified version of libhdfs that supports access to the data-fabric 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 the hadoop-<version> version of libhdfs. The API reference notes which APIs are supported by hadoop-<version>.

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-<version>: Support for hdfsBuilder structures for connections to HDFS is limited. Some of the parameters are ignored.
    • hadoop-<version>: hdfsGetDefaultBlockSize(): If the file system that the client is connected to is an instance of file system, the returned value is 256 MB, regardless of the actual setting.
    • hadoop-<version>: hdfsCreateDirectory(): The parameters for buffer size, replication, and block size are ignored for connections to the data-fabric file system.
    • hadoop-<version>: hdfsGetDefaultBlockSizeAtPath(): If the file system that the client is connected to is an instance of file system, the returned value is 256 MB, regardless of the actual setting.
    • hadoop-<version>: hdfsOpenFile(): The parameters for buffer size and replication are ignored for connections to the data-fabric file system.
  • APIs that are unique to libMapRClient for hadoop-<version>
    • hdfsCreateDirectory2()
    • hdfsGetNameContainerSizeBytes()
    • hdfsOpenFile2()
    • hdfsSetRpcTimeout()
    • hdfsSetThreads()