This is a version of ThriftFS Server customized to properly support binary data
transfers. It does so by assuming all data to be written and read is encoded in
such a way to ensure it only contains printable ASCII characters and thus won't
be mangled as it passes through Java String handling. By default the encoding
used is Base64, but I've also included an implementation of the basE91 encoder
and decoder for slightly more efficient communication (113% encoded size as
compared to 130% for Base64). In order to circumvent the Ant build limitations
this Base91 is pretending to be part of the thriftfs package - hacky I know.

=====

To run the modified ThriftFS server:

 * ensure HDFS is running
 * source setup.bash ala regular Greenstone in order to get environment setup
 * run: bin/start_thrift_server.sh [port]

Note: [port] is optional and will default to 58660. Ensure your perl clients
are talking on the same port otherwise it will be a short conversation.

=====

To recompile this jar (and I really hope you never have to):
 * ensure you have a source install of Hadoop-1.1.0:
http://archive.apache.org/dist/hadoop/core/
 * ensure it includes the associated contrib sources - including ThriftFS-0.9.0.
 * check it all compiles (to compile ThriftFS you may find you need to edit the environment variable CLASSPATH so hadoop-core-1.1.0.jar is on there)
 * copy HadoopThriftServer.java and basE91.java (overwriting as necessary) to:
<hadoop-1.1.0-src>/src/contrib/thriftfs/src/java/org/apache/hadoop/thriftfs/
 * recompile ThriftFS by running 'ant' in:
<hadoop-1.1.0-src>/src/contrib/thriftfs/
 * now copy the built jar back to the extensions folder's version of ThriftFS
cp <hadoop-1.0.0-src>/build/contrib/thriftfs/hadoop-thrift-${version}.jar <greenstone>/ext/parallel-building/packages/ThriftFS-0.9.0

The HDFS ThriftFS project has actually been abandoned (in favor of emerging
ProtoBuf work), but you can read about it here:
http://wiki.apache.org/hadoop/HDFS-APIs

While the larger Apache Thrift project is described here:
http://thrift.apache.org/

For further information on Base91 encoding see the license (b91-license.txt)
and visit the basE91 home page at: http://base91.sourceforge.net/

[jmt12]
