dallasmarlow/ruby-hdfs — pull request #1 by ssalevan (2013-04-11 03:05:13+00:00)
Title: General pimping of ruby-hdfs

I have filled out most of the HDFS API, barring a few odd functions, and figured that the code was in a state where I could shoot the first pull request your way, as it has the virtue of compiling and working without segfaults in my testing. These, I believe, are good things.

This code implements several new APIs:

Hadoop::DFS::FIleSystem:

capacity
cd
cwd
chgrp
chmod
chown
copy
default_block_size
default_block_size_at_path
list_directory
move
used
utime

It additionally introduces a new abstract class, Hadoop::DFS::FileInfo, which represents the metadata associated with an HDFS file. The subclasses of this abstract class, Hadoop::DFS::FileInfo::File and Hadoop::DFS::FileInfo::Directory, represent the two file types which can be found in HDFS.

The API for this object includes the following methods:

block_size
group
is_directory?
is_file?
last_access
last_modified
mode
name
owner
replication
size

Additionally, I've added some RDocs to the current methods to better explain what they're actually doing and have updated ruby.h to the latest HDFS version for maximal DFS API excellence.

There's still a bit of work to be done, but this should help to close the gap with Ruby and HDFS quite a bit with a little luck. Let me know what you think, and thanks for the consideration!

![stairs](https://f.cloud.github.com/assets/15283/365644/c8ae13dc-a253-11e2-8e1e-86db633c714d.jpg)