gluster/glusterfs-hadoop — pull request #63 by childsb (2013-10-25 21:29:15+00:00)
Title: Abstract basic file system tests into HCFS tests.  

Rework of the JUNIT code to abstract out a reusable HCFS test framework and testing harness to easily replace the basic FileSystem implementer that the unit tests run against. This allows the same unit tests to run against multiple file systems

For simple file systems, the default HcfsTestConnector class can be used, and the FileSystem classname given in the HCFS_CLASSNAME env variable. To test o.a.h.f.FileSystem based class that need advanced configuration, create a class that implements o.a.h.h.t.c.HcfsTestConnectorInterface. The test connector allows for extended configuration and instantiation of the FileSytem. The GlusterFS connector is supplied.

Next, set these environment variables:

export HCFS_FILE_SYSTEM_CONNECTOR=org.apache.hadoop.hcfs.test.connector.glusterfs.GlusterFileSystemTestConnector
export HCFS_CLASSNAME=org.apache.hadoop.fs.glusterfs.GlusterFileSystem

Finally, run the tests.

This is demonstrated for both of the GlusterFileSystem classes in the test.sh script. ((the pre-mounted gluster volume must also be specified for glusterfs)). Both the regular GlusterFileSystem and the extend GlusterFileSystemCRC are tested.