globocom / ghdfs   0.0.13

MIT License GitHub

Works with HDFS for common operations and Scala compatibility.

Scala versions: 2.11

Build Status

GHDFS

Works with HDFS for common operations and Scala compatibility.

Installation

Package is under com.globo.bigdata.ghdfs

  • Include in your dependencies:
    "com.globo.bigdata" %% "ghdfs" % "0.0.13"

Usage

    val hdfs = HdfsManager(Properties.envOrNone("HADOOP_CONF_DIR"))
    
    hdfs.write(Path)
    
    hdfs.write(Path, InputStream)

    hdfs.read(Path)
    
    hdfs.status(Path)
    
    hdfs.move(Path, Path)
    
    hdfs.listFiles(Path, recursive = false).foreach(...)
    
    hdfs.delete(Path, recursive = true)

    etc...

Get Filesystem Instance

    hdfs.getFS.exists(hadoopPath)

Contribute

For development and contributing, please follow Contributing Guide and ALWAYS respect the Code of Conduct