Sha256: 798c3e33e2358cae6926ac97db76455ebd1a3600d5e46ff5cafe0e38e8cbd813

Contents?: true

Size: 992 Bytes

Versions: 5

Compression:

Stored size: 992 Bytes

Contents

# Viking

A familiar jRuby hdfs wrapper.

## Goal

The goal is to provide ways that are similar to the common ruby file system
api's for interacting with hdfs. All hdfs functionallity is powered by the java
hdfs classes.

## Status

### Available

 - `File`
 - `Dir`
 - `FileUtils`

### Not available yet but on the todo

 - `File#fnmatch`
 - `File#fnmatch?`
 - `Dir#glob`
 - `FileUtils#copy`

## Example usage

    # Set up hdfs config
    Viking.configure({
      host: '127.0.0.1',
      port: 54310
    })

    # If "/some/data" exists and it is a file then print its content. If it is
    # a directory then rename it. If it does not exist then we create it.
    path = "/some/data"
    if Viking::File.exists? path
      if Viking::File.file? path
        Viking::File.open(path) do |file|
          puts "Reading data from #{f.path}:"
          puts f.read
        end
      else
        Viking::File.rename(path, "/some/dir")
      end
    else
      Viking::Dir.mkdir(path)
    end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hdfs-viking-0.0.5 README.md
hdfs-viking-0.0.4 README.md
hdfs-viking-0.0.3 README.md
hdfs-viking-0.0.2 README.md
hdfs-viking-0.0.1 README.md