Browse Source

HADOOP-3754. Add a thrift interface to access HDFS. (dhruba via omalley)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@690096 13f79535-47bb-0310-9956-ffa450edef68
Owen O'Malley 17 years ago
parent
commit
bd24b0ca09
46 changed files with 39301 additions and 0 deletions
  1. 2 0
      CHANGES.txt
  2. 39 0
      src/contrib/thriftfs/README
  3. 64 0
      src/contrib/thriftfs/build.xml
  4. 214 0
      src/contrib/thriftfs/gen-cocoa/hadoopfs.h
  5. 4507 0
      src/contrib/thriftfs/gen-cocoa/hadoopfs.m
  6. 5344 0
      src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem.cpp
  7. 2359 0
      src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem.h
  8. 132 0
      src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem_server.skeleton.cpp
  9. 16 0
      src/contrib/thriftfs/gen-cpp/hadoopfs_constants.cpp
  10. 23 0
      src/contrib/thriftfs/gen-cpp/hadoopfs_constants.h
  11. 495 0
      src/contrib/thriftfs/gen-cpp/hadoopfs_types.cpp
  12. 274 0
      src/contrib/thriftfs/gen-cpp/hadoopfs_types.h
  13. 243 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/BlockLocation.java
  14. 365 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/FileStatus.java
  15. 119 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/MalformedInputException.java
  16. 119 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/Pathname.java
  17. 6038 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/ThriftHadoopFileSystem.java
  18. 117 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/ThriftHandle.java
  19. 119 0
      src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/ThriftIOException.java
  20. 13 0
      src/contrib/thriftfs/gen-perl/Constants.pm
  21. 4538 0
      src/contrib/thriftfs/gen-perl/ThriftHadoopFileSystem.pm
  22. 610 0
      src/contrib/thriftfs/gen-perl/Types.pm
  23. 4852 0
      src/contrib/thriftfs/gen-php/ThriftHadoopFileSystem.php
  24. 714 0
      src/contrib/thriftfs/gen-php/hadoopfs_types.php
  25. 0 0
      src/contrib/thriftfs/gen-py/__init__.py
  26. 205 0
      src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem-remote
  27. 3444 0
      src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.py
  28. BIN
      src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.pyc
  29. 1 0
      src/contrib/thriftfs/gen-py/hadoopfs/__init__.py
  30. BIN
      src/contrib/thriftfs/gen-py/hadoopfs/__init__.pyc
  31. 9 0
      src/contrib/thriftfs/gen-py/hadoopfs/constants.py
  32. 495 0
      src/contrib/thriftfs/gen-py/hadoopfs/ttypes.py
  33. BIN
      src/contrib/thriftfs/gen-py/hadoopfs/ttypes.pyc
  34. 855 0
      src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb
  35. 9 0
      src/contrib/thriftfs/gen-rb/hadoopfs_constants.rb
  36. 77 0
      src/contrib/thriftfs/gen-rb/hadoopfs_types.rb
  37. 1486 0
      src/contrib/thriftfs/gen-st/hadoopfs.st
  38. 126 0
      src/contrib/thriftfs/if/hadoopfs.thrift
  39. 1 0
      src/contrib/thriftfs/lib/README
  40. 24 0
      src/contrib/thriftfs/lib/Thrift.LICENSE
  41. BIN
      src/contrib/thriftfs/lib/hadoopthriftapi.jar
  42. BIN
      src/contrib/thriftfs/lib/libthrift.jar
  43. 555 0
      src/contrib/thriftfs/scripts/hdfs.py
  44. 31 0
      src/contrib/thriftfs/scripts/start_thrift_server.sh
  45. 616 0
      src/contrib/thriftfs/src/java/org/apache/hadoop/thriftfs/HadoopThriftServer.java
  46. 51 0
      src/contrib/thriftfs/test/org/apache/hadoop/thriftfs/TestThriftfs.java

+ 2 - 0
CHANGES.txt

@@ -106,6 +106,8 @@ Trunk (unreleased changes)
 
     HADOOP-3746. Add a fair share scheduler. (Matei Zaharia via omalley)
 
+    HADOOP-3754. Add a thrift interface to access HDFS. (dhruba via omalley)
+
   IMPROVEMENTS
 
     HADOOP-3908. Fuse-dfs: better error message if llibhdfs.so doesn't exist.

+ 39 - 0
src/contrib/thriftfs/README

@@ -0,0 +1,39 @@
+                        Thrift API for HDFS
+                        ==================
+
+Introduction:
+============
+
+The Hadoop Distributed File System is written in Java. An application
+that wants to store/fetch data to/from HDFS can use the Java API
+This means that applications that are not written in Java cannot
+access HDFS in an elegant manner.
+
+Thrift is a software framework for scalable cross-language services 
+development. It combines a powerful software stack with a code generation 
+engine to build services that work efficiently and seamlessly 
+between C++, Java, Python, PHP, and Ruby.
+
+This project exposes HDFS APIs using the Thrift software stack. This
+allows applciations written in a myriad of languages to access
+HDFS elegantly.
+
+
+The Application Programming Interface (API)
+===========================================
+The HDFS API that is exposed through Thrift can be found in if/hadoopfs.thrift.
+
+Compilation
+===========
+The compilation process creates a server org.apache.hadoop.thriftfs.HadooopThriftServer
+that implements the Thrift interface defined in if/hadoopfs.thrift.
+
+Th thrift compiler is used to generate API stubs in python, php, ruby,
+cocoa, etc. The generated code is checked into the directories gen-*.
+The generated java API is checked into lib/hadoopthriftapi.jar.
+
+There is a sample python script hdfs.py in the scripts directory. This python 
+script, when invoked, creates a HadoopThriftServer in the background, and then
+communicates wth HDFS using the API. This script is for demonstration purposes
+only.
+

+ 64 - 0
src/contrib/thriftfs/build.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<!-- 
+Before you can run these subtargets directly, you need 
+to call at top-level: ant deploy-contrib compile-core-test
+-->
+<project name="thriftfs" default="jar">
+
+  <import file="../build-contrib.xml"/>
+
+  <!-- create the list of files to add to the classpath -->
+  <fileset dir="${hadoop.root}/lib" id="class.path">
+    <include name="**/*.jar" />
+    <exclude name="**/excluded/" />
+  </fileset>
+
+  <!-- Override jar target to specify main class -->
+  <target name="jar" depends="compile">
+    <jar
+      jarfile="${build.dir}/hadoop-${version}-${name}.jar"
+      basedir="${build.classes}"      
+    >
+  	<manifest>
+	    <attribute name="Main-Class" value="org.apache.hadoop.thriftfs.HadooopThriftServer"/>
+	</manifest>
+    </jar>
+  </target>
+
+  <!-- Run only pure-Java unit tests. superdottest -->
+  <target name="test">
+   <antcall target="hadoopbuildcontrib.test"> 
+     <param name="test.exclude" value="TestStreamedMerge"/>
+   </antcall>
+  </target>  
+ 
+  <!-- Run all unit tests
+  This is not called as part of the nightly build
+  because it will only run on platforms that have standard 
+  Unix utilities available. 
+  -->
+ <target name="test-unix">
+   <antcall target="hadoopbuildcontrib.test">
+   </antcall>
+ </target>  
+
+
+</project>

+ 214 - 0
src/contrib/thriftfs/gen-cocoa/hadoopfs.h

@@ -0,0 +1,214 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import <TProtocol.h>
+#import <TApplicationException.h>
+#import <TProtocolUtil.h>
+
+
+@interface ThriftHandle : NSObject {
+  int64_t __id;
+
+  BOOL __id_isset;
+}
+
+- (id) initWithId: (int64_t) id;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (int64_t) id;
+- (void) setId: (int64_t) id;
+- (BOOL) idIsSet;
+
+@end
+
+@interface Pathname : NSObject {
+  NSString * __pathname;
+
+  BOOL __pathname_isset;
+}
+
+- (id) initWithPathname: (NSString *) pathname;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSString *) pathname;
+- (void) setPathname: (NSString *) pathname;
+- (BOOL) pathnameIsSet;
+
+@end
+
+@interface FileStatus : NSObject {
+  NSString * __path;
+  int64_t __length;
+  BOOL __isdir;
+  int16_t __block_replication;
+  int64_t __blocksize;
+  int64_t __modification_time;
+  NSString * __permission;
+  NSString * __owner;
+  NSString * __group;
+
+  BOOL __path_isset;
+  BOOL __length_isset;
+  BOOL __isdir_isset;
+  BOOL __block_replication_isset;
+  BOOL __blocksize_isset;
+  BOOL __modification_time_isset;
+  BOOL __permission_isset;
+  BOOL __owner_isset;
+  BOOL __group_isset;
+}
+
+- (id) initWithPath: (NSString *) path length: (int64_t) length isdir: (BOOL) isdir block_replication: (int16_t) block_replication blocksize: (int64_t) blocksize modification_time: (int64_t) modification_time permission: (NSString *) permission owner: (NSString *) owner group: (NSString *) group;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSString *) path;
+- (void) setPath: (NSString *) path;
+- (BOOL) pathIsSet;
+
+- (int64_t) length;
+- (void) setLength: (int64_t) length;
+- (BOOL) lengthIsSet;
+
+- (BOOL) isdir;
+- (void) setIsdir: (BOOL) isdir;
+- (BOOL) isdirIsSet;
+
+- (int16_t) block_replication;
+- (void) setBlock_replication: (int16_t) block_replication;
+- (BOOL) block_replicationIsSet;
+
+- (int64_t) blocksize;
+- (void) setBlocksize: (int64_t) blocksize;
+- (BOOL) blocksizeIsSet;
+
+- (int64_t) modification_time;
+- (void) setModification_time: (int64_t) modification_time;
+- (BOOL) modification_timeIsSet;
+
+- (NSString *) permission;
+- (void) setPermission: (NSString *) permission;
+- (BOOL) permissionIsSet;
+
+- (NSString *) owner;
+- (void) setOwner: (NSString *) owner;
+- (BOOL) ownerIsSet;
+
+- (NSString *) group;
+- (void) setGroup: (NSString *) group;
+- (BOOL) groupIsSet;
+
+@end
+
+@interface BlockLocation : NSObject {
+  NSArray * __hosts;
+  NSArray * __names;
+  int64_t __offset;
+  int64_t __length;
+
+  BOOL __hosts_isset;
+  BOOL __names_isset;
+  BOOL __offset_isset;
+  BOOL __length_isset;
+}
+
+- (id) initWithHosts: (NSArray *) hosts names: (NSArray *) names offset: (int64_t) offset length: (int64_t) length;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSArray *) hosts;
+- (void) setHosts: (NSArray *) hosts;
+- (BOOL) hostsIsSet;
+
+- (NSArray *) names;
+- (void) setNames: (NSArray *) names;
+- (BOOL) namesIsSet;
+
+- (int64_t) offset;
+- (void) setOffset: (int64_t) offset;
+- (BOOL) offsetIsSet;
+
+- (int64_t) length;
+- (void) setLength: (int64_t) length;
+- (BOOL) lengthIsSet;
+
+@end
+
+@interface MalformedInputException : NSException {
+  NSString * __message;
+
+  BOOL __message_isset;
+}
+
+- (id) initWithMessage: (NSString *) message;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSString *) message;
+- (void) setMessage: (NSString *) message;
+- (BOOL) messageIsSet;
+
+@end
+
+@interface ThriftIOException : NSException {
+  NSString * __message;
+
+  BOOL __message_isset;
+}
+
+- (id) initWithMessage: (NSString *) message;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSString *) message;
+- (void) setMessage: (NSString *) message;
+- (BOOL) messageIsSet;
+
+@end
+
+@protocol ThriftHadoopFileSystem <NSObject>
+- (void) setInactivityTimeoutPeriod: (int64_t) periodInSeconds;  // throws TException
+- (void) shutdown: (int32_t) status;  // throws TException
+- (ThriftHandle *) create: (Pathname *) path;  // throws ThriftIOException *, TException
+- (ThriftHandle *) createFile: (Pathname *) path : (int16_t) mode : (BOOL) overwrite : (int32_t) bufferSize : (int16_t) block_replication : (int64_t) blocksize;  // throws ThriftIOException *, TException
+- (ThriftHandle *) open: (Pathname *) path;  // throws ThriftIOException *, TException
+- (ThriftHandle *) append: (Pathname *) path;  // throws ThriftIOException *, TException
+- (BOOL) write: (ThriftHandle *) handle : (NSString *) data;  // throws ThriftIOException *, TException
+- (NSString *) read: (ThriftHandle *) handle : (int64_t) offset : (int32_t) size;  // throws ThriftIOException *, TException
+- (BOOL) close: (ThriftHandle *) out;  // throws ThriftIOException *, TException
+- (BOOL) rm: (Pathname *) path : (BOOL) recursive;  // throws ThriftIOException *, TException
+- (BOOL) rename: (Pathname *) path : (Pathname *) dest;  // throws ThriftIOException *, TException
+- (BOOL) mkdirs: (Pathname *) path;  // throws ThriftIOException *, TException
+- (BOOL) exists: (Pathname *) path;  // throws ThriftIOException *, TException
+- (FileStatus *) stat: (Pathname *) path;  // throws ThriftIOException *, TException
+- (NSArray *) listStatus: (Pathname *) path;  // throws ThriftIOException *, TException
+- (void) chmod: (Pathname *) path : (int16_t) mode;  // throws ThriftIOException *, TException
+- (void) chown: (Pathname *) path : (NSString *) owner : (NSString *) group;  // throws ThriftIOException *, TException
+- (void) setReplication: (Pathname *) path : (int16_t) replication;  // throws ThriftIOException *, TException
+- (NSArray *) getFileBlockLocations: (Pathname *) path : (int64_t) start : (int64_t) length;  // throws ThriftIOException *, TException
+@end
+
+@interface ThriftHadoopFileSystemClient : NSObject <ThriftHadoopFileSystem> {
+  id <TProtocol> inProtocol;
+  id <TProtocol> outProtocol;
+}
+- (id) initWithProtocol: (id <TProtocol>) protocol;
+- (id) initWithInProtocol: (id <TProtocol>) inProtocol outProtocol: (id <TProtocol>) outProtocol;
+@end
+
+@interface hadoopfsConstants {
+}
+@end

+ 4507 - 0
src/contrib/thriftfs/gen-cocoa/hadoopfs.m

@@ -0,0 +1,4507 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import <TProtocol.h>
+#import <TApplicationException.h>
+#import <TProtocolUtil.h>
+
+
+#import "hadoopfs.h"
+
+
+@implementation hadoopfsConstants
++ (void) initialize {
+}
+@end
+
+@implementation ThriftHandle
+- (id) initWithId: (int64_t) id
+{
+  self = [super init];
+  __id = id;
+  __id_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [super dealloc];
+}
+
+- (int64_t) id {
+  return __id;
+}
+
+- (void) setId: (int64_t) id {
+  __id = id;
+  __id_isset = YES;
+}
+
+- (BOOL) idIsSet {
+  return __id_isset;
+}
+
+- (void) unsetId {
+  __id_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case -1:
+        if (fieldType == TType_I64) {
+          int64_t fieldValue = [inProtocol readI64];
+          [self setId: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ThriftHandle"];
+  if (__id_isset) {
+    [outProtocol writeFieldBeginWithName: @"id" type: TType_I64 fieldID: -1];
+    [outProtocol writeI64: __id];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ThriftHandle("];
+  [ms appendString: @"id:"];
+  [ms appendFormat: @"%qi", __id];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@implementation Pathname
+- (id) initWithPathname: (NSString *) pathname
+{
+  self = [super init];
+  __pathname = [pathname retain];
+  __pathname_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__pathname release];
+  [super dealloc];
+}
+
+- (NSString *) pathname {
+  return [[__pathname retain] autorelease];
+}
+
+- (void) setPathname: (NSString *) pathname {
+  [pathname retain];
+  [__pathname release];
+  __pathname = pathname;
+  __pathname_isset = YES;
+}
+
+- (BOOL) pathnameIsSet {
+  return __pathname_isset;
+}
+
+- (void) unsetPathname {
+  [__pathname release];
+  __pathname = nil;
+  __pathname_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case -1:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setPathname: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"Pathname"];
+  if (__pathname_isset) {
+    if (__pathname != nil) {
+      [outProtocol writeFieldBeginWithName: @"pathname" type: TType_STRING fieldID: -1];
+      [outProtocol writeString: __pathname];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"Pathname("];
+  [ms appendString: @"pathname:"];
+  [ms appendFormat: @"\"%@\"", __pathname];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@implementation FileStatus
+- (id) initWithPath: (NSString *) path length: (int64_t) length isdir: (BOOL) isdir block_replication: (int16_t) block_replication blocksize: (int64_t) blocksize modification_time: (int64_t) modification_time permission: (NSString *) permission owner: (NSString *) owner group: (NSString *) group
+{
+  self = [super init];
+  __path = [path retain];
+  __path_isset = YES;
+  __length = length;
+  __length_isset = YES;
+  __isdir = isdir;
+  __isdir_isset = YES;
+  __block_replication = block_replication;
+  __block_replication_isset = YES;
+  __blocksize = blocksize;
+  __blocksize_isset = YES;
+  __modification_time = modification_time;
+  __modification_time_isset = YES;
+  __permission = [permission retain];
+  __permission_isset = YES;
+  __owner = [owner retain];
+  __owner_isset = YES;
+  __group = [group retain];
+  __group_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__path release];
+  [__permission release];
+  [__owner release];
+  [__group release];
+  [super dealloc];
+}
+
+- (NSString *) path {
+  return [[__path retain] autorelease];
+}
+
+- (void) setPath: (NSString *) path {
+  [path retain];
+  [__path release];
+  __path = path;
+  __path_isset = YES;
+}
+
+- (BOOL) pathIsSet {
+  return __path_isset;
+}
+
+- (void) unsetPath {
+  [__path release];
+  __path = nil;
+  __path_isset = NO;
+}
+
+- (int64_t) length {
+  return __length;
+}
+
+- (void) setLength: (int64_t) length {
+  __length = length;
+  __length_isset = YES;
+}
+
+- (BOOL) lengthIsSet {
+  return __length_isset;
+}
+
+- (void) unsetLength {
+  __length_isset = NO;
+}
+
+- (BOOL) isdir {
+  return __isdir;
+}
+
+- (void) setIsdir: (BOOL) isdir {
+  __isdir = isdir;
+  __isdir_isset = YES;
+}
+
+- (BOOL) isdirIsSet {
+  return __isdir_isset;
+}
+
+- (void) unsetIsdir {
+  __isdir_isset = NO;
+}
+
+- (int16_t) block_replication {
+  return __block_replication;
+}
+
+- (void) setBlock_replication: (int16_t) block_replication {
+  __block_replication = block_replication;
+  __block_replication_isset = YES;
+}
+
+- (BOOL) block_replicationIsSet {
+  return __block_replication_isset;
+}
+
+- (void) unsetBlock_replication {
+  __block_replication_isset = NO;
+}
+
+- (int64_t) blocksize {
+  return __blocksize;
+}
+
+- (void) setBlocksize: (int64_t) blocksize {
+  __blocksize = blocksize;
+  __blocksize_isset = YES;
+}
+
+- (BOOL) blocksizeIsSet {
+  return __blocksize_isset;
+}
+
+- (void) unsetBlocksize {
+  __blocksize_isset = NO;
+}
+
+- (int64_t) modification_time {
+  return __modification_time;
+}
+
+- (void) setModification_time: (int64_t) modification_time {
+  __modification_time = modification_time;
+  __modification_time_isset = YES;
+}
+
+- (BOOL) modification_timeIsSet {
+  return __modification_time_isset;
+}
+
+- (void) unsetModification_time {
+  __modification_time_isset = NO;
+}
+
+- (NSString *) permission {
+  return [[__permission retain] autorelease];
+}
+
+- (void) setPermission: (NSString *) permission {
+  [permission retain];
+  [__permission release];
+  __permission = permission;
+  __permission_isset = YES;
+}
+
+- (BOOL) permissionIsSet {
+  return __permission_isset;
+}
+
+- (void) unsetPermission {
+  [__permission release];
+  __permission = nil;
+  __permission_isset = NO;
+}
+
+- (NSString *) owner {
+  return [[__owner retain] autorelease];
+}
+
+- (void) setOwner: (NSString *) owner {
+  [owner retain];
+  [__owner release];
+  __owner = owner;
+  __owner_isset = YES;
+}
+
+- (BOOL) ownerIsSet {
+  return __owner_isset;
+}
+
+- (void) unsetOwner {
+  [__owner release];
+  __owner = nil;
+  __owner_isset = NO;
+}
+
+- (NSString *) group {
+  return [[__group retain] autorelease];
+}
+
+- (void) setGroup: (NSString *) group {
+  [group retain];
+  [__group release];
+  __group = group;
+  __group_isset = YES;
+}
+
+- (BOOL) groupIsSet {
+  return __group_isset;
+}
+
+- (void) unsetGroup {
+  [__group release];
+  __group = nil;
+  __group_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 1:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setPath: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 2:
+        if (fieldType == TType_I64) {
+          int64_t fieldValue = [inProtocol readI64];
+          [self setLength: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 3:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setIsdir: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 4:
+        if (fieldType == TType_I16) {
+          int16_t fieldValue = [inProtocol readI16];
+          [self setBlock_replication: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 5:
+        if (fieldType == TType_I64) {
+          int64_t fieldValue = [inProtocol readI64];
+          [self setBlocksize: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 6:
+        if (fieldType == TType_I64) {
+          int64_t fieldValue = [inProtocol readI64];
+          [self setModification_time: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 7:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setPermission: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 8:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setOwner: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 9:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setGroup: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"FileStatus"];
+  if (__path_isset) {
+    if (__path != nil) {
+      [outProtocol writeFieldBeginWithName: @"path" type: TType_STRING fieldID: 1];
+      [outProtocol writeString: __path];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  if (__length_isset) {
+    [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 2];
+    [outProtocol writeI64: __length];
+    [outProtocol writeFieldEnd];
+  }
+  if (__isdir_isset) {
+    [outProtocol writeFieldBeginWithName: @"isdir" type: TType_BOOL fieldID: 3];
+    [outProtocol writeBool: __isdir];
+    [outProtocol writeFieldEnd];
+  }
+  if (__block_replication_isset) {
+    [outProtocol writeFieldBeginWithName: @"block_replication" type: TType_I16 fieldID: 4];
+    [outProtocol writeI16: __block_replication];
+    [outProtocol writeFieldEnd];
+  }
+  if (__blocksize_isset) {
+    [outProtocol writeFieldBeginWithName: @"blocksize" type: TType_I64 fieldID: 5];
+    [outProtocol writeI64: __blocksize];
+    [outProtocol writeFieldEnd];
+  }
+  if (__modification_time_isset) {
+    [outProtocol writeFieldBeginWithName: @"modification_time" type: TType_I64 fieldID: 6];
+    [outProtocol writeI64: __modification_time];
+    [outProtocol writeFieldEnd];
+  }
+  if (__permission_isset) {
+    if (__permission != nil) {
+      [outProtocol writeFieldBeginWithName: @"permission" type: TType_STRING fieldID: 7];
+      [outProtocol writeString: __permission];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  if (__owner_isset) {
+    if (__owner != nil) {
+      [outProtocol writeFieldBeginWithName: @"owner" type: TType_STRING fieldID: 8];
+      [outProtocol writeString: __owner];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  if (__group_isset) {
+    if (__group != nil) {
+      [outProtocol writeFieldBeginWithName: @"group" type: TType_STRING fieldID: 9];
+      [outProtocol writeString: __group];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"FileStatus("];
+  [ms appendString: @"path:"];
+  [ms appendFormat: @"\"%@\"", __path];
+  [ms appendString: @",length:"];
+  [ms appendFormat: @"%qi", __length];
+  [ms appendString: @",isdir:"];
+  [ms appendFormat: @"%i", __isdir];
+  [ms appendString: @",block_replication:"];
+  [ms appendFormat: @"%hi", __block_replication];
+  [ms appendString: @",blocksize:"];
+  [ms appendFormat: @"%qi", __blocksize];
+  [ms appendString: @",modification_time:"];
+  [ms appendFormat: @"%qi", __modification_time];
+  [ms appendString: @",permission:"];
+  [ms appendFormat: @"\"%@\"", __permission];
+  [ms appendString: @",owner:"];
+  [ms appendFormat: @"\"%@\"", __owner];
+  [ms appendString: @",group:"];
+  [ms appendFormat: @"\"%@\"", __group];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@implementation BlockLocation
+- (id) initWithHosts: (NSArray *) hosts names: (NSArray *) names offset: (int64_t) offset length: (int64_t) length
+{
+  self = [super init];
+  __hosts = [hosts retain];
+  __hosts_isset = YES;
+  __names = [names retain];
+  __names_isset = YES;
+  __offset = offset;
+  __offset_isset = YES;
+  __length = length;
+  __length_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__hosts release];
+  [__names release];
+  [super dealloc];
+}
+
+- (NSArray *) hosts {
+  return [[__hosts retain] autorelease];
+}
+
+- (void) setHosts: (NSArray *) hosts {
+  [hosts retain];
+  [__hosts release];
+  __hosts = hosts;
+  __hosts_isset = YES;
+}
+
+- (BOOL) hostsIsSet {
+  return __hosts_isset;
+}
+
+- (void) unsetHosts {
+  [__hosts release];
+  __hosts = nil;
+  __hosts_isset = NO;
+}
+
+- (NSArray *) names {
+  return [[__names retain] autorelease];
+}
+
+- (void) setNames: (NSArray *) names {
+  [names retain];
+  [__names release];
+  __names = names;
+  __names_isset = YES;
+}
+
+- (BOOL) namesIsSet {
+  return __names_isset;
+}
+
+- (void) unsetNames {
+  [__names release];
+  __names = nil;
+  __names_isset = NO;
+}
+
+- (int64_t) offset {
+  return __offset;
+}
+
+- (void) setOffset: (int64_t) offset {
+  __offset = offset;
+  __offset_isset = YES;
+}
+
+- (BOOL) offsetIsSet {
+  return __offset_isset;
+}
+
+- (void) unsetOffset {
+  __offset_isset = NO;
+}
+
+- (int64_t) length {
+  return __length;
+}
+
+- (void) setLength: (int64_t) length {
+  __length = length;
+  __length_isset = YES;
+}
+
+- (BOOL) lengthIsSet {
+  return __length_isset;
+}
+
+- (void) unsetLength {
+  __length_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 1:
+        if (fieldType == TType_LIST) {
+          int _size0;
+          [inProtocol readListBeginReturningElementType: NULL size: &_size0];
+          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0];
+          int _i1;
+          for (_i1 = 0; _i1 < _size0; ++_i1)
+          {
+            NSString * _elem2 = [inProtocol readString];
+            [fieldValue addObject: _elem2];
+          }
+          [inProtocol readListEnd];
+          [self setHosts: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 2:
+        if (fieldType == TType_LIST) {
+          int _size3;
+          [inProtocol readListBeginReturningElementType: NULL size: &_size3];
+          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size3];
+          int _i4;
+          for (_i4 = 0; _i4 < _size3; ++_i4)
+          {
+            NSString * _elem5 = [inProtocol readString];
+            [fieldValue addObject: _elem5];
+          }
+          [inProtocol readListEnd];
+          [self setNames: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 3:
+        if (fieldType == TType_I64) {
+          int64_t fieldValue = [inProtocol readI64];
+          [self setOffset: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 4:
+        if (fieldType == TType_I64) {
+          int64_t fieldValue = [inProtocol readI64];
+          [self setLength: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"BlockLocation"];
+  if (__hosts_isset) {
+    if (__hosts != nil) {
+      [outProtocol writeFieldBeginWithName: @"hosts" type: TType_LIST fieldID: 1];
+      {
+        [outProtocol writeListBeginWithElementType: TType_STRING size: [__hosts count]];
+        int i7;
+        for (i7 = 0; i7 < [__hosts count]; i7++)
+        {
+          [outProtocol writeString: [__hosts objectAtIndex: i7]];
+        }
+        [outProtocol writeListEnd];
+      }
+      [outProtocol writeFieldEnd];
+    }
+  }
+  if (__names_isset) {
+    if (__names != nil) {
+      [outProtocol writeFieldBeginWithName: @"names" type: TType_LIST fieldID: 2];
+      {
+        [outProtocol writeListBeginWithElementType: TType_STRING size: [__names count]];
+        int i9;
+        for (i9 = 0; i9 < [__names count]; i9++)
+        {
+          [outProtocol writeString: [__names objectAtIndex: i9]];
+        }
+        [outProtocol writeListEnd];
+      }
+      [outProtocol writeFieldEnd];
+    }
+  }
+  if (__offset_isset) {
+    [outProtocol writeFieldBeginWithName: @"offset" type: TType_I64 fieldID: 3];
+    [outProtocol writeI64: __offset];
+    [outProtocol writeFieldEnd];
+  }
+  if (__length_isset) {
+    [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 4];
+    [outProtocol writeI64: __length];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"BlockLocation("];
+  [ms appendString: @"hosts:"];
+  [ms appendFormat: @"%@", __hosts];
+  [ms appendString: @",names:"];
+  [ms appendFormat: @"%@", __names];
+  [ms appendString: @",offset:"];
+  [ms appendFormat: @"%qi", __offset];
+  [ms appendString: @",length:"];
+  [ms appendFormat: @"%qi", __length];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@implementation MalformedInputException
+- (id) init
+{
+  return [super initWithName: @"MalformedInputException" reason: @"unknown" userInfo: nil];
+}
+- (id) initWithMessage: (NSString *) message
+{
+  self = [self init];
+  __message = [message retain];
+  __message_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__message release];
+  [super dealloc];
+}
+
+- (NSString *) message {
+  return [[__message retain] autorelease];
+}
+
+- (void) setMessage: (NSString *) message {
+  [message retain];
+  [__message release];
+  __message = message;
+  __message_isset = YES;
+}
+
+- (BOOL) messageIsSet {
+  return __message_isset;
+}
+
+- (void) unsetMessage {
+  [__message release];
+  __message = nil;
+  __message_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case -1:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setMessage: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"MalformedInputException"];
+  if (__message_isset) {
+    if (__message != nil) {
+      [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1];
+      [outProtocol writeString: __message];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"MalformedInputException("];
+  [ms appendString: @"message:"];
+  [ms appendFormat: @"\"%@\"", __message];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@implementation ThriftIOException
+- (id) init
+{
+  return [super initWithName: @"ThriftIOException" reason: @"unknown" userInfo: nil];
+}
+- (id) initWithMessage: (NSString *) message
+{
+  self = [self init];
+  __message = [message retain];
+  __message_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__message release];
+  [super dealloc];
+}
+
+- (NSString *) message {
+  return [[__message retain] autorelease];
+}
+
+- (void) setMessage: (NSString *) message {
+  [message retain];
+  [__message release];
+  __message = message;
+  __message_isset = YES;
+}
+
+- (BOOL) messageIsSet {
+  return __message_isset;
+}
+
+- (void) unsetMessage {
+  [__message release];
+  __message = nil;
+  __message_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case -1:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setMessage: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ThriftIOException"];
+  if (__message_isset) {
+    if (__message != nil) {
+      [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1];
+      [outProtocol writeString: __message];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ThriftIOException("];
+  [ms appendString: @"message:"];
+  [ms appendFormat: @"\"%@\"", __message];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface SetInactivityTimeoutPeriodResult_ : NSObject {
+}
+
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+@end
+
+@implementation SetInactivityTimeoutPeriodResult_
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"SetInactivityTimeoutPeriodResult_"];
+
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"SetInactivityTimeoutPeriodResult_("];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface ShutdownResult_ : NSObject {
+}
+
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+@end
+
+@implementation ShutdownResult_
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ShutdownResult_"];
+
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ShutdownResult_("];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface CreateResult_ : NSObject {
+  ThriftHandle * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftHandle *) success;
+- (void) setSuccess: (ThriftHandle *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation CreateResult_
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftHandle *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (ThriftHandle *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_STRUCT) {
+          ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
+          [fieldValue read: inProtocol];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"CreateResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
+      [__success write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"CreateResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface CreateFileResult_ : NSObject {
+  ThriftHandle * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftHandle *) success;
+- (void) setSuccess: (ThriftHandle *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation CreateFileResult_
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftHandle *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (ThriftHandle *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_STRUCT) {
+          ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
+          [fieldValue read: inProtocol];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"CreateFileResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
+      [__success write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"CreateFileResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface OpenResult_ : NSObject {
+  ThriftHandle * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftHandle *) success;
+- (void) setSuccess: (ThriftHandle *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation OpenResult_
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftHandle *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (ThriftHandle *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_STRUCT) {
+          ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
+          [fieldValue read: inProtocol];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"OpenResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
+      [__success write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"OpenResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface AppendResult_ : NSObject {
+  ThriftHandle * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftHandle *) success;
+- (void) setSuccess: (ThriftHandle *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation AppendResult_
+- (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftHandle *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (ThriftHandle *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_STRUCT) {
+          ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
+          [fieldValue read: inProtocol];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"AppendResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
+      [__success write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"AppendResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface WriteResult_ : NSObject {
+  BOOL __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (BOOL) success;
+- (void) setSuccess: (BOOL) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation WriteResult_
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = success;
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (BOOL) success {
+  return __success;
+}
+
+- (void) setSuccess: (BOOL) success {
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"WriteResult_"];
+
+  if (__success_isset) {
+    [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
+    [outProtocol writeBool: __success];
+    [outProtocol writeFieldEnd];
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"WriteResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%i", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface ReadResult_ : NSObject {
+  NSString * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSString *) success;
+- (void) setSuccess: (NSString *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation ReadResult_
+- (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (NSString *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (NSString *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_STRING) {
+          NSString * fieldValue = [inProtocol readString];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ReadResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_STRING fieldID: 0];
+      [outProtocol writeString: __success];
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ReadResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"\"%@\"", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface CloseResult_ : NSObject {
+  BOOL __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (BOOL) success;
+- (void) setSuccess: (BOOL) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation CloseResult_
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = success;
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (BOOL) success {
+  return __success;
+}
+
+- (void) setSuccess: (BOOL) success {
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"CloseResult_"];
+
+  if (__success_isset) {
+    [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
+    [outProtocol writeBool: __success];
+    [outProtocol writeFieldEnd];
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"CloseResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%i", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface RmResult_ : NSObject {
+  BOOL __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (BOOL) success;
+- (void) setSuccess: (BOOL) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation RmResult_
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = success;
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (BOOL) success {
+  return __success;
+}
+
+- (void) setSuccess: (BOOL) success {
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"RmResult_"];
+
+  if (__success_isset) {
+    [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
+    [outProtocol writeBool: __success];
+    [outProtocol writeFieldEnd];
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"RmResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%i", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface RenameResult_ : NSObject {
+  BOOL __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (BOOL) success;
+- (void) setSuccess: (BOOL) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation RenameResult_
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = success;
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (BOOL) success {
+  return __success;
+}
+
+- (void) setSuccess: (BOOL) success {
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"RenameResult_"];
+
+  if (__success_isset) {
+    [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
+    [outProtocol writeBool: __success];
+    [outProtocol writeFieldEnd];
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"RenameResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%i", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface MkdirsResult_ : NSObject {
+  BOOL __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (BOOL) success;
+- (void) setSuccess: (BOOL) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation MkdirsResult_
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = success;
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (BOOL) success {
+  return __success;
+}
+
+- (void) setSuccess: (BOOL) success {
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"MkdirsResult_"];
+
+  if (__success_isset) {
+    [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
+    [outProtocol writeBool: __success];
+    [outProtocol writeFieldEnd];
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"MkdirsResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%i", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface ExistsResult_ : NSObject {
+  BOOL __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (BOOL) success;
+- (void) setSuccess: (BOOL) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation ExistsResult_
+- (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = success;
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (BOOL) success {
+  return __success;
+}
+
+- (void) setSuccess: (BOOL) success {
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_BOOL) {
+          BOOL fieldValue = [inProtocol readBool];
+          [self setSuccess: fieldValue];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ExistsResult_"];
+
+  if (__success_isset) {
+    [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
+    [outProtocol writeBool: __success];
+    [outProtocol writeFieldEnd];
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ExistsResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%i", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface StatResult_ : NSObject {
+  FileStatus * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (FileStatus *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (FileStatus *) success;
+- (void) setSuccess: (FileStatus *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation StatResult_
+- (id) initWithSuccess: (FileStatus *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (FileStatus *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (FileStatus *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_STRUCT) {
+          FileStatus *fieldValue = [[FileStatus alloc] init];
+          [fieldValue read: inProtocol];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"StatResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
+      [__success write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"StatResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface ListStatusResult_ : NSObject {
+  NSArray * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSArray *) success;
+- (void) setSuccess: (NSArray *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation ListStatusResult_
+- (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (NSArray *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (NSArray *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_LIST) {
+          int _size10;
+          [inProtocol readListBeginReturningElementType: NULL size: &_size10];
+          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size10];
+          int _i11;
+          for (_i11 = 0; _i11 < _size10; ++_i11)
+          {
+            FileStatus *_elem12 = [[FileStatus alloc] init];
+            [_elem12 read: inProtocol];
+            [fieldValue addObject: _elem12];
+          }
+          [inProtocol readListEnd];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ListStatusResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_LIST fieldID: 0];
+      {
+        [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__success count]];
+        int i14;
+        for (i14 = 0; i14 < [__success count]; i14++)
+        {
+          [[__success objectAtIndex: i14] write: outProtocol];
+        }
+        [outProtocol writeListEnd];
+      }
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ListStatusResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface ChmodResult_ : NSObject {
+  ThriftIOException * __ouch;
+
+  BOOL __ouch_isset;
+}
+
+- (id) initWithOuch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation ChmodResult_
+- (id) initWithOuch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ChmodResult_"];
+
+  if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ChmodResult_("];
+  [ms appendString: @"ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface ChownResult_ : NSObject {
+  ThriftIOException * __ouch;
+
+  BOOL __ouch_isset;
+}
+
+- (id) initWithOuch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation ChownResult_
+- (id) initWithOuch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"ChownResult_"];
+
+  if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"ChownResult_("];
+  [ms appendString: @"ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface SetReplicationResult_ : NSObject {
+  ThriftIOException * __ouch;
+
+  BOOL __ouch_isset;
+}
+
+- (id) initWithOuch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation SetReplicationResult_
+- (id) initWithOuch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__ouch release];
+  [super dealloc];
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"SetReplicationResult_"];
+
+  if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"SetReplicationResult_("];
+  [ms appendString: @"ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@interface GetFileBlockLocationsResult_ : NSObject {
+  NSArray * __success;
+  ThriftIOException * __ouch;
+
+  BOOL __success_isset;
+  BOOL __ouch_isset;
+}
+
+- (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch;
+
+- (void) read: (id <TProtocol>) inProtocol;
+- (void) write: (id <TProtocol>) outProtocol;
+
+- (NSArray *) success;
+- (void) setSuccess: (NSArray *) success;
+- (BOOL) successIsSet;
+
+- (ThriftIOException *) ouch;
+- (void) setOuch: (ThriftIOException *) ouch;
+- (BOOL) ouchIsSet;
+
+@end
+
+@implementation GetFileBlockLocationsResult_
+- (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch
+{
+  self = [super init];
+  __success = [success retain];
+  __success_isset = YES;
+  __ouch = [ouch retain];
+  __ouch_isset = YES;
+  return self;
+}
+
+- (void) dealloc
+{
+  [__success release];
+  [__ouch release];
+  [super dealloc];
+}
+
+- (NSArray *) success {
+  return [[__success retain] autorelease];
+}
+
+- (void) setSuccess: (NSArray *) success {
+  [success retain];
+  [__success release];
+  __success = success;
+  __success_isset = YES;
+}
+
+- (BOOL) successIsSet {
+  return __success_isset;
+}
+
+- (void) unsetSuccess {
+  [__success release];
+  __success = nil;
+  __success_isset = NO;
+}
+
+- (ThriftIOException *) ouch {
+  return [[__ouch retain] autorelease];
+}
+
+- (void) setOuch: (ThriftIOException *) ouch {
+  [ouch retain];
+  [__ouch release];
+  __ouch = ouch;
+  __ouch_isset = YES;
+}
+
+- (BOOL) ouchIsSet {
+  return __ouch_isset;
+}
+
+- (void) unsetOuch {
+  [__ouch release];
+  __ouch = nil;
+  __ouch_isset = NO;
+}
+
+- (void) read: (id <TProtocol>) inProtocol
+{
+  NSString * fieldName;
+  int fieldType;
+  int fieldID;
+
+  [inProtocol readStructBeginReturningName: NULL];
+  while (true)
+  {
+    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
+    if (fieldType == TType_STOP) { 
+      break;
+    }
+    switch (fieldID)
+    {
+      case 0:
+        if (fieldType == TType_LIST) {
+          int _size15;
+          [inProtocol readListBeginReturningElementType: NULL size: &_size15];
+          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size15];
+          int _i16;
+          for (_i16 = 0; _i16 < _size15; ++_i16)
+          {
+            BlockLocation *_elem17 = [[BlockLocation alloc] init];
+            [_elem17 read: inProtocol];
+            [fieldValue addObject: _elem17];
+          }
+          [inProtocol readListEnd];
+          [self setSuccess: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      case 1:
+        if (fieldType == TType_STRUCT) {
+          ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
+          [fieldValue read: inProtocol];
+          [self setOuch: fieldValue];
+          [fieldValue release];
+        } else { 
+          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        }
+        break;
+      default:
+        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
+        break;
+    }
+    [inProtocol readFieldEnd];
+  }
+  [inProtocol readStructEnd];
+}
+
+- (void) write: (id <TProtocol>) outProtocol {
+  [outProtocol writeStructBeginWithName: @"GetFileBlockLocationsResult_"];
+
+  if (__success_isset) {
+    if (__success != nil) {
+      [outProtocol writeFieldBeginWithName: @"success" type: TType_LIST fieldID: 0];
+      {
+        [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__success count]];
+        int i19;
+        for (i19 = 0; i19 < [__success count]; i19++)
+        {
+          [[__success objectAtIndex: i19] write: outProtocol];
+        }
+        [outProtocol writeListEnd];
+      }
+      [outProtocol writeFieldEnd];
+    }
+  } else if (__ouch_isset) {
+    if (__ouch != nil) {
+      [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
+      [__ouch write: outProtocol];
+      [outProtocol writeFieldEnd];
+    }
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+}
+
+- (NSString *) description {
+  NSMutableString * ms = [NSMutableString stringWithString: @"GetFileBlockLocationsResult_("];
+  [ms appendString: @"success:"];
+  [ms appendFormat: @"%@", __success];
+  [ms appendString: @",ouch:"];
+  [ms appendFormat: @"%@", __ouch];
+  [ms appendString: @")"];
+  return [ms copy];
+}
+
+@end
+
+@implementation ThriftHadoopFileSystemClient
+- (id) initWithProtocol: (id <TProtocol>) protocol
+{
+  return [self initWithInProtocol: protocol outProtocol: protocol];
+}
+
+- (id) initWithInProtocol: (id <TProtocol>) anInProtocol outProtocol: (id <TProtocol>) anOutProtocol
+{
+  [super init];
+  inProtocol = [anInProtocol retain];
+  outProtocol = [anOutProtocol retain];
+  return self;
+}
+
+- (void) dealloc
+{
+  [inProtocol release];
+  [outProtocol release];
+  [super dealloc];
+}
+
+- (void) send_setInactivityTimeoutPeriod: (int64_t) periodInSeconds
+{
+  [outProtocol writeMessageBeginWithName: @"setInactivityTimeoutPeriod" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"setInactivityTimeoutPeriod_args"];
+  [outProtocol writeFieldBeginWithName: @"periodInSeconds" type: TType_I64 fieldID: 1];
+  [outProtocol writeI64: periodInSeconds];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (void) recv_setInactivityTimeoutPeriod
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  SetInactivityTimeoutPeriodResult_ * result = [[[SetInactivityTimeoutPeriodResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  return;
+}
+
+- (void) setInactivityTimeoutPeriod: (int64_t) periodInSeconds
+{
+  [self send_setInactivityTimeoutPeriod: periodInSeconds];
+  [self recv_setInactivityTimeoutPeriod];
+}
+
+- (void) send_shutdown: (int32_t) status
+{
+  [outProtocol writeMessageBeginWithName: @"shutdown" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"shutdown_args"];
+  [outProtocol writeFieldBeginWithName: @"status" type: TType_I32 fieldID: 1];
+  [outProtocol writeI32: status];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (void) recv_shutdown
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  ShutdownResult_ * result = [[[ShutdownResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  return;
+}
+
+- (void) shutdown: (int32_t) status
+{
+  [self send_shutdown: status];
+  [self recv_shutdown];
+}
+
+- (void) send_create: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"create" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"create_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (ThriftHandle *) recv_create
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  CreateResult_ * result = [[[CreateResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"create failed: unknown result"];
+}
+
+- (ThriftHandle *) create: (Pathname *) path
+{
+  [self send_create: path];
+  return [self recv_create];
+}
+
+- (void) send_createFile: (Pathname *) path : (int16_t) mode : (BOOL) overwrite : (int32_t) bufferSize : (int16_t) block_replication : (int64_t) blocksize
+{
+  [outProtocol writeMessageBeginWithName: @"createFile" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"createFile_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldBeginWithName: @"mode" type: TType_I16 fieldID: 2];
+  [outProtocol writeI16: mode];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldBeginWithName: @"overwrite" type: TType_BOOL fieldID: 3];
+  [outProtocol writeBool: overwrite];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldBeginWithName: @"bufferSize" type: TType_I32 fieldID: 4];
+  [outProtocol writeI32: bufferSize];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldBeginWithName: @"block_replication" type: TType_I16 fieldID: 5];
+  [outProtocol writeI16: block_replication];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldBeginWithName: @"blocksize" type: TType_I64 fieldID: 6];
+  [outProtocol writeI64: blocksize];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (ThriftHandle *) recv_createFile
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  CreateFileResult_ * result = [[[CreateFileResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"createFile failed: unknown result"];
+}
+
+- (ThriftHandle *) createFile: (Pathname *) path : (int16_t) mode : (BOOL) overwrite : (int32_t) bufferSize : (int16_t) block_replication : (int64_t) blocksize
+{
+  [self send_createFile: path : mode : overwrite : bufferSize : block_replication : blocksize];
+  return [self recv_createFile];
+}
+
+- (void) send_open: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"open" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"open_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (ThriftHandle *) recv_open
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  OpenResult_ * result = [[[OpenResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"open failed: unknown result"];
+}
+
+- (ThriftHandle *) open: (Pathname *) path
+{
+  [self send_open: path];
+  return [self recv_open];
+}
+
+- (void) send_append: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"append" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"append_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (ThriftHandle *) recv_append
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  AppendResult_ * result = [[[AppendResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"append failed: unknown result"];
+}
+
+- (ThriftHandle *) append: (Pathname *) path
+{
+  [self send_append: path];
+  return [self recv_append];
+}
+
+- (void) send_write: (ThriftHandle *) handle : (NSString *) data
+{
+  [outProtocol writeMessageBeginWithName: @"write" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"write_args"];
+  if (handle != nil)  {
+    [outProtocol writeFieldBeginWithName: @"handle" type: TType_STRUCT fieldID: 1];
+    [handle write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  if (data != nil)  {
+    [outProtocol writeFieldBeginWithName: @"data" type: TType_STRING fieldID: -1];
+    [outProtocol writeString: data];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (BOOL) recv_write
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  WriteResult_ * result = [[[WriteResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"write failed: unknown result"];
+}
+
+- (BOOL) write: (ThriftHandle *) handle : (NSString *) data
+{
+  [self send_write: handle : data];
+  return [self recv_write];
+}
+
+- (void) send_read: (ThriftHandle *) handle : (int64_t) offset : (int32_t) size
+{
+  [outProtocol writeMessageBeginWithName: @"read" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"read_args"];
+  if (handle != nil)  {
+    [outProtocol writeFieldBeginWithName: @"handle" type: TType_STRUCT fieldID: 1];
+    [handle write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldBeginWithName: @"offset" type: TType_I64 fieldID: -1];
+  [outProtocol writeI64: offset];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldBeginWithName: @"size" type: TType_I32 fieldID: -2];
+  [outProtocol writeI32: size];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (NSString *) recv_read
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  ReadResult_ * result = [[[ReadResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"read failed: unknown result"];
+}
+
+- (NSString *) read: (ThriftHandle *) handle : (int64_t) offset : (int32_t) size
+{
+  [self send_read: handle : offset : size];
+  return [self recv_read];
+}
+
+- (void) send_close: (ThriftHandle *) out
+{
+  [outProtocol writeMessageBeginWithName: @"close" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"close_args"];
+  if (out != nil)  {
+    [outProtocol writeFieldBeginWithName: @"out" type: TType_STRUCT fieldID: 1];
+    [out write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (BOOL) recv_close
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  CloseResult_ * result = [[[CloseResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"close failed: unknown result"];
+}
+
+- (BOOL) close: (ThriftHandle *) out
+{
+  [self send_close: out];
+  return [self recv_close];
+}
+
+- (void) send_rm: (Pathname *) path : (BOOL) recursive
+{
+  [outProtocol writeMessageBeginWithName: @"rm" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"rm_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldBeginWithName: @"recursive" type: TType_BOOL fieldID: 2];
+  [outProtocol writeBool: recursive];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (BOOL) recv_rm
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  RmResult_ * result = [[[RmResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"rm failed: unknown result"];
+}
+
+- (BOOL) rm: (Pathname *) path : (BOOL) recursive
+{
+  [self send_rm: path : recursive];
+  return [self recv_rm];
+}
+
+- (void) send_rename: (Pathname *) path : (Pathname *) dest
+{
+  [outProtocol writeMessageBeginWithName: @"rename" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"rename_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  if (dest != nil)  {
+    [outProtocol writeFieldBeginWithName: @"dest" type: TType_STRUCT fieldID: 2];
+    [dest write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (BOOL) recv_rename
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  RenameResult_ * result = [[[RenameResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"rename failed: unknown result"];
+}
+
+- (BOOL) rename: (Pathname *) path : (Pathname *) dest
+{
+  [self send_rename: path : dest];
+  return [self recv_rename];
+}
+
+- (void) send_mkdirs: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"mkdirs" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"mkdirs_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (BOOL) recv_mkdirs
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  MkdirsResult_ * result = [[[MkdirsResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"mkdirs failed: unknown result"];
+}
+
+- (BOOL) mkdirs: (Pathname *) path
+{
+  [self send_mkdirs: path];
+  return [self recv_mkdirs];
+}
+
+- (void) send_exists: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"exists" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"exists_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (BOOL) recv_exists
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  ExistsResult_ * result = [[[ExistsResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"exists failed: unknown result"];
+}
+
+- (BOOL) exists: (Pathname *) path
+{
+  [self send_exists: path];
+  return [self recv_exists];
+}
+
+- (void) send_stat: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"stat" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"stat_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (FileStatus *) recv_stat
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  StatResult_ * result = [[[StatResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"stat failed: unknown result"];
+}
+
+- (FileStatus *) stat: (Pathname *) path
+{
+  [self send_stat: path];
+  return [self recv_stat];
+}
+
+- (void) send_listStatus: (Pathname *) path
+{
+  [outProtocol writeMessageBeginWithName: @"listStatus" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"listStatus_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (NSArray *) recv_listStatus
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  ListStatusResult_ * result = [[[ListStatusResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"listStatus failed: unknown result"];
+}
+
+- (NSArray *) listStatus: (Pathname *) path
+{
+  [self send_listStatus: path];
+  return [self recv_listStatus];
+}
+
+- (void) send_chmod: (Pathname *) path : (int16_t) mode
+{
+  [outProtocol writeMessageBeginWithName: @"chmod" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"chmod_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldBeginWithName: @"mode" type: TType_I16 fieldID: 2];
+  [outProtocol writeI16: mode];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (void) recv_chmod
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  ChmodResult_ * result = [[[ChmodResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  return;
+}
+
+- (void) chmod: (Pathname *) path : (int16_t) mode
+{
+  [self send_chmod: path : mode];
+  [self recv_chmod];
+}
+
+- (void) send_chown: (Pathname *) path : (NSString *) owner : (NSString *) group
+{
+  [outProtocol writeMessageBeginWithName: @"chown" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"chown_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  if (owner != nil)  {
+    [outProtocol writeFieldBeginWithName: @"owner" type: TType_STRING fieldID: 2];
+    [outProtocol writeString: owner];
+    [outProtocol writeFieldEnd];
+  }
+  if (group != nil)  {
+    [outProtocol writeFieldBeginWithName: @"group" type: TType_STRING fieldID: 3];
+    [outProtocol writeString: group];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (void) recv_chown
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  ChownResult_ * result = [[[ChownResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  return;
+}
+
+- (void) chown: (Pathname *) path : (NSString *) owner : (NSString *) group
+{
+  [self send_chown: path : owner : group];
+  [self recv_chown];
+}
+
+- (void) send_setReplication: (Pathname *) path : (int16_t) replication
+{
+  [outProtocol writeMessageBeginWithName: @"setReplication" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"setReplication_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldBeginWithName: @"replication" type: TType_I16 fieldID: 2];
+  [outProtocol writeI16: replication];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (void) recv_setReplication
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  SetReplicationResult_ * result = [[[SetReplicationResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  return;
+}
+
+- (void) setReplication: (Pathname *) path : (int16_t) replication
+{
+  [self send_setReplication: path : replication];
+  [self recv_setReplication];
+}
+
+- (void) send_getFileBlockLocations: (Pathname *) path : (int64_t) start : (int64_t) length
+{
+  [outProtocol writeMessageBeginWithName: @"getFileBlockLocations" type: TMessageType_CALL sequenceID: 0];
+  [outProtocol writeStructBeginWithName: @"getFileBlockLocations_args"];
+  if (path != nil)  {
+    [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1];
+    [path write: outProtocol];
+    [outProtocol writeFieldEnd];
+  }
+  [outProtocol writeFieldBeginWithName: @"start" type: TType_I64 fieldID: 2];
+  [outProtocol writeI64: start];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 3];
+  [outProtocol writeI64: length];
+  [outProtocol writeFieldEnd];
+  [outProtocol writeFieldStop];
+  [outProtocol writeStructEnd];
+  [outProtocol writeMessageEnd];
+  [[outProtocol transport] flush];
+}
+
+- (NSArray *) recv_getFileBlockLocations
+{
+  int msgType = 0;
+  [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL];
+  if (msgType == TMessageType_EXCEPTION) {
+    TApplicationException * x = [TApplicationException read: inProtocol];
+    [inProtocol readMessageEnd];
+    @throw x;
+  }
+  GetFileBlockLocationsResult_ * result = [[[GetFileBlockLocationsResult_ alloc] init] autorelease];
+  [result read: inProtocol];
+  [inProtocol readMessageEnd];
+  if ([result successIsSet]) {
+    return [result success];
+  }
+  if ([result ouchIsSet]) {
+    @throw [result ouch];
+  }
+  @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT
+                                           reason: @"getFileBlockLocations failed: unknown result"];
+}
+
+- (NSArray *) getFileBlockLocations: (Pathname *) path : (int64_t) start : (int64_t) length
+{
+  [self send_getFileBlockLocations: path : start : length];
+  return [self recv_getFileBlockLocations];
+}
+
+@end
+

+ 5344 - 0
src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem.cpp

@@ -0,0 +1,5344 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "ThriftHadoopFileSystem.h"
+
+
+
+uint32_t ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->periodInSeconds);
+          this->__isset.periodInSeconds = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args");
+  xfer += oprot->writeFieldBegin("periodInSeconds", facebook::thrift::protocol::T_I64, 1);
+  xfer += oprot->writeI64(this->periodInSeconds);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs");
+  xfer += oprot->writeFieldBegin("periodInSeconds", facebook::thrift::protocol::T_I64, 1);
+  xfer += oprot->writeI64((*(this->periodInSeconds)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result");
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setInactivityTimeoutPeriod_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_shutdown_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->status);
+          this->__isset.status = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_shutdown_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_shutdown_args");
+  xfer += oprot->writeFieldBegin("status", facebook::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32(this->status);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_shutdown_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_shutdown_pargs");
+  xfer += oprot->writeFieldBegin("status", facebook::thrift::protocol::T_I32, 1);
+  xfer += oprot->writeI32((*(this->status)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_shutdown_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_shutdown_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_shutdown_result");
+
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_shutdown_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_create_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_create_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_create_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_create_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_create_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_create_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_create_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_create_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_create_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_createFile_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_I16) {
+          xfer += iprot->readI16(this->mode);
+          this->__isset.mode = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->overwrite);
+          this->__isset.overwrite = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == facebook::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->bufferSize);
+          this->__isset.bufferSize = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == facebook::thrift::protocol::T_I16) {
+          xfer += iprot->readI16(this->block_replication);
+          this->__isset.block_replication = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 6:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->blocksize);
+          this->__isset.blocksize = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_createFile_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_createFile_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("mode", facebook::thrift::protocol::T_I16, 2);
+  xfer += oprot->writeI16(this->mode);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("overwrite", facebook::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeBool(this->overwrite);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("bufferSize", facebook::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32(this->bufferSize);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("block_replication", facebook::thrift::protocol::T_I16, 5);
+  xfer += oprot->writeI16(this->block_replication);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("blocksize", facebook::thrift::protocol::T_I64, 6);
+  xfer += oprot->writeI64(this->blocksize);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_createFile_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_createFile_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("mode", facebook::thrift::protocol::T_I16, 2);
+  xfer += oprot->writeI16((*(this->mode)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("overwrite", facebook::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeBool((*(this->overwrite)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("bufferSize", facebook::thrift::protocol::T_I32, 4);
+  xfer += oprot->writeI32((*(this->bufferSize)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("block_replication", facebook::thrift::protocol::T_I16, 5);
+  xfer += oprot->writeI16((*(this->block_replication)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("blocksize", facebook::thrift::protocol::T_I64, 6);
+  xfer += oprot->writeI64((*(this->blocksize)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_createFile_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_createFile_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_createFile_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_createFile_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_open_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_open_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_open_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_open_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_open_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_open_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_open_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_open_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_open_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_append_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_append_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_append_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_append_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_append_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_append_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_append_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_append_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_append_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_write_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->handle.read(iprot);
+          this->__isset.handle = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case -1:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->data);
+          this->__isset.data = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_write_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_write_args");
+  xfer += oprot->writeFieldBegin("handle", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->handle.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("data", facebook::thrift::protocol::T_STRING, -1);
+  xfer += oprot->writeString(this->data);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_write_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_write_pargs");
+  xfer += oprot->writeFieldBegin("handle", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->handle)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("data", facebook::thrift::protocol::T_STRING, -1);
+  xfer += oprot->writeString((*(this->data)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_write_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_write_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_write_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_write_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_read_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->handle.read(iprot);
+          this->__isset.handle = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case -1:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->offset);
+          this->__isset.offset = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case -2:
+        if (ftype == facebook::thrift::protocol::T_I32) {
+          xfer += iprot->readI32(this->size);
+          this->__isset.size = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_read_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_read_args");
+  xfer += oprot->writeFieldBegin("handle", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->handle.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("offset", facebook::thrift::protocol::T_I64, -1);
+  xfer += oprot->writeI64(this->offset);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("size", facebook::thrift::protocol::T_I32, -2);
+  xfer += oprot->writeI32(this->size);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_read_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_read_pargs");
+  xfer += oprot->writeFieldBegin("handle", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->handle)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("offset", facebook::thrift::protocol::T_I64, -1);
+  xfer += oprot->writeI64((*(this->offset)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("size", facebook::thrift::protocol::T_I32, -2);
+  xfer += oprot->writeI32((*(this->size)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_read_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_read_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_read_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_STRING, 0);
+    xfer += oprot->writeString(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_read_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_close_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->out.read(iprot);
+          this->__isset.out = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_close_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_close_args");
+  xfer += oprot->writeFieldBegin("out", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->out.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_close_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_close_pargs");
+  xfer += oprot->writeFieldBegin("out", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->out)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_close_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_close_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_close_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_close_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rm_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->recursive);
+          this->__isset.recursive = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rm_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_rm_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("recursive", facebook::thrift::protocol::T_BOOL, 2);
+  xfer += oprot->writeBool(this->recursive);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rm_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_rm_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("recursive", facebook::thrift::protocol::T_BOOL, 2);
+  xfer += oprot->writeBool((*(this->recursive)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rm_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rm_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_rm_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rm_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rename_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->dest.read(iprot);
+          this->__isset.dest = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rename_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_rename_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dest", facebook::thrift::protocol::T_STRUCT, 2);
+  xfer += this->dest.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rename_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_rename_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("dest", facebook::thrift::protocol::T_STRUCT, 2);
+  xfer += (*(this->dest)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rename_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rename_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_rename_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_rename_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_mkdirs_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_mkdirs_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_mkdirs_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_mkdirs_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_mkdirs_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_mkdirs_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_mkdirs_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_mkdirs_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_mkdirs_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_exists_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_exists_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_exists_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_exists_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_exists_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_exists_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->success);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_exists_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_exists_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_BOOL, 0);
+    xfer += oprot->writeBool(this->success);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_exists_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool((*(this->success)));
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_stat_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_stat_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_stat_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_stat_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_stat_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_stat_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->success.read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_stat_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_stat_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_STRUCT, 0);
+    xfer += this->success.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_stat_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += (*(this->success)).read(iprot);
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_listStatus_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_listStatus_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_listStatus_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_listStatus_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_listStatus_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_listStatus_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size12;
+            facebook::thrift::protocol::TType _etype15;
+            iprot->readListBegin(_etype15, _size12);
+            this->success.resize(_size12);
+            uint32_t _i16;
+            for (_i16 = 0; _i16 < _size12; ++_i16)
+            {
+              xfer += this->success[_i16].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_listStatus_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_listStatus_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<FileStatus> ::const_iterator _iter17;
+      for (_iter17 = this->success.begin(); _iter17 != this->success.end(); ++_iter17)
+      {
+        xfer += (*_iter17).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_listStatus_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size18;
+            facebook::thrift::protocol::TType _etype21;
+            iprot->readListBegin(_etype21, _size18);
+            (*(this->success)).resize(_size18);
+            uint32_t _i22;
+            for (_i22 = 0; _i22 < _size18; ++_i22)
+            {
+              xfer += (*(this->success))[_i22].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chmod_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_I16) {
+          xfer += iprot->readI16(this->mode);
+          this->__isset.mode = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chmod_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_chmod_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("mode", facebook::thrift::protocol::T_I16, 2);
+  xfer += oprot->writeI16(this->mode);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chmod_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_chmod_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("mode", facebook::thrift::protocol::T_I16, 2);
+  xfer += oprot->writeI16((*(this->mode)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chmod_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chmod_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_chmod_result");
+
+  if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chmod_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chown_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->owner);
+          this->__isset.owner = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->group);
+          this->__isset.group = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chown_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_chown_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("owner", facebook::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->owner);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("group", facebook::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->group);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chown_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_chown_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("owner", facebook::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->owner)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("group", facebook::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString((*(this->group)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chown_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chown_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_chown_result");
+
+  if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_chown_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setReplication_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_I16) {
+          xfer += iprot->readI16(this->replication);
+          this->__isset.replication = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setReplication_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_setReplication_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("replication", facebook::thrift::protocol::T_I16, 2);
+  xfer += oprot->writeI16(this->replication);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setReplication_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_setReplication_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("replication", facebook::thrift::protocol::T_I16, 2);
+  xfer += oprot->writeI16((*(this->replication)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setReplication_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setReplication_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_setReplication_result");
+
+  if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_setReplication_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_getFileBlockLocations_args::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->path.read(iprot);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->start);
+          this->__isset.start = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->length);
+          this->__isset.length = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_getFileBlockLocations_args::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_getFileBlockLocations_args");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += this->path.write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("start", facebook::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->start);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("length", facebook::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64(this->length);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_getFileBlockLocations_pargs::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_getFileBlockLocations_pargs");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRUCT, 1);
+  xfer += (*(this->path)).write(oprot);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("start", facebook::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64((*(this->start)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("length", facebook::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64((*(this->length)));
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_getFileBlockLocations_result::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_LIST) {
+          {
+            this->success.clear();
+            uint32_t _size23;
+            facebook::thrift::protocol::TType _etype26;
+            iprot->readListBegin(_etype26, _size23);
+            this->success.resize(_size23);
+            uint32_t _i27;
+            for (_i27 = 0; _i27 < _size23; ++_i27)
+            {
+              xfer += this->success[_i27].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_getFileBlockLocations_result::write(facebook::thrift::protocol::TProtocol* oprot) const {
+
+  uint32_t xfer = 0;
+
+  xfer += oprot->writeStructBegin("ThriftHadoopFileSystem_getFileBlockLocations_result");
+
+  if (this->__isset.success) {
+    xfer += oprot->writeFieldBegin("success", facebook::thrift::protocol::T_LIST, 0);
+    {
+      xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRUCT, this->success.size());
+      std::vector<BlockLocation> ::const_iterator _iter28;
+      for (_iter28 = this->success.begin(); _iter28 != this->success.end(); ++_iter28)
+      {
+        xfer += (*_iter28).write(oprot);
+      }
+      xfer += oprot->writeListEnd();
+    }
+    xfer += oprot->writeFieldEnd();
+  } else if (this->__isset.ouch) {
+    xfer += oprot->writeFieldBegin("ouch", facebook::thrift::protocol::T_STRUCT, 1);
+    xfer += this->ouch.write(oprot);
+    xfer += oprot->writeFieldEnd();
+  }
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+uint32_t ThriftHadoopFileSystem_getFileBlockLocations_presult::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 0:
+        if (ftype == facebook::thrift::protocol::T_LIST) {
+          {
+            (*(this->success)).clear();
+            uint32_t _size29;
+            facebook::thrift::protocol::TType _etype32;
+            iprot->readListBegin(_etype32, _size29);
+            (*(this->success)).resize(_size29);
+            uint32_t _i33;
+            for (_i33 = 0; _i33 < _size29; ++_i33)
+            {
+              xfer += (*(this->success))[_i33].read(iprot);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.success = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRUCT) {
+          xfer += this->ouch.read(iprot);
+          this->__isset.ouch = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+void ThriftHadoopFileSystemClient::setInactivityTimeoutPeriod(const int64_t periodInSeconds)
+{
+  send_setInactivityTimeoutPeriod(periodInSeconds);
+  recv_setInactivityTimeoutPeriod();
+}
+
+void ThriftHadoopFileSystemClient::send_setInactivityTimeoutPeriod(const int64_t periodInSeconds)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("setInactivityTimeoutPeriod", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs args;
+  args.periodInSeconds = &periodInSeconds;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_setInactivityTimeoutPeriod()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("setInactivityTimeoutPeriod") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  return;
+}
+
+void ThriftHadoopFileSystemClient::shutdown(const int32_t status)
+{
+  send_shutdown(status);
+  recv_shutdown();
+}
+
+void ThriftHadoopFileSystemClient::send_shutdown(const int32_t status)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("shutdown", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_shutdown_pargs args;
+  args.status = &status;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_shutdown()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("shutdown") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_shutdown_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  return;
+}
+
+void ThriftHadoopFileSystemClient::create(ThriftHandle& _return, const Pathname& path)
+{
+  send_create(path);
+  recv_create(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_create(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("create", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_create_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_create(ThriftHandle& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("create") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_create_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "create failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize)
+{
+  send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize);
+  recv_createFile(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_createFile(const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("createFile", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_createFile_pargs args;
+  args.path = &path;
+  args.mode = &mode;
+  args.overwrite = &overwrite;
+  args.bufferSize = &bufferSize;
+  args.block_replication = &block_replication;
+  args.blocksize = &blocksize;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_createFile(ThriftHandle& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("createFile") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_createFile_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "createFile failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::open(ThriftHandle& _return, const Pathname& path)
+{
+  send_open(path);
+  recv_open(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_open(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("open", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_open_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_open(ThriftHandle& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("open") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_open_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "open failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::append(ThriftHandle& _return, const Pathname& path)
+{
+  send_append(path);
+  recv_append(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_append(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("append", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_append_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_append(ThriftHandle& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("append") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_append_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "append failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemClient::write(const ThriftHandle& handle, const std::string& data)
+{
+  send_write(handle, data);
+  return recv_write();
+}
+
+void ThriftHadoopFileSystemClient::send_write(const ThriftHandle& handle, const std::string& data)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("write", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_write_pargs args;
+  args.handle = &handle;
+  args.data = &data;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+bool ThriftHadoopFileSystemClient::recv_write()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("write") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  bool _return;
+  ThriftHadoopFileSystem_write_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "write failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size)
+{
+  send_read(handle, offset, size);
+  recv_read(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_read(const ThriftHandle& handle, const int64_t offset, const int32_t size)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("read", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_read_pargs args;
+  args.handle = &handle;
+  args.offset = &offset;
+  args.size = &size;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_read(std::string& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("read") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_read_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "read failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemClient::close(const ThriftHandle& out)
+{
+  send_close(out);
+  return recv_close();
+}
+
+void ThriftHadoopFileSystemClient::send_close(const ThriftHandle& out)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("close", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_close_pargs args;
+  args.out = &out;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+bool ThriftHadoopFileSystemClient::recv_close()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("close") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  bool _return;
+  ThriftHadoopFileSystem_close_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "close failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemClient::rm(const Pathname& path, const bool recursive)
+{
+  send_rm(path, recursive);
+  return recv_rm();
+}
+
+void ThriftHadoopFileSystemClient::send_rm(const Pathname& path, const bool recursive)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("rm", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_rm_pargs args;
+  args.path = &path;
+  args.recursive = &recursive;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+bool ThriftHadoopFileSystemClient::recv_rm()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("rm") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  bool _return;
+  ThriftHadoopFileSystem_rm_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "rm failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemClient::rename(const Pathname& path, const Pathname& dest)
+{
+  send_rename(path, dest);
+  return recv_rename();
+}
+
+void ThriftHadoopFileSystemClient::send_rename(const Pathname& path, const Pathname& dest)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("rename", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_rename_pargs args;
+  args.path = &path;
+  args.dest = &dest;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+bool ThriftHadoopFileSystemClient::recv_rename()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("rename") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  bool _return;
+  ThriftHadoopFileSystem_rename_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "rename failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemClient::mkdirs(const Pathname& path)
+{
+  send_mkdirs(path);
+  return recv_mkdirs();
+}
+
+void ThriftHadoopFileSystemClient::send_mkdirs(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("mkdirs", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_mkdirs_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+bool ThriftHadoopFileSystemClient::recv_mkdirs()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("mkdirs") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  bool _return;
+  ThriftHadoopFileSystem_mkdirs_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "mkdirs failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemClient::exists(const Pathname& path)
+{
+  send_exists(path);
+  return recv_exists();
+}
+
+void ThriftHadoopFileSystemClient::send_exists(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("exists", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_exists_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+bool ThriftHadoopFileSystemClient::recv_exists()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("exists") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  bool _return;
+  ThriftHadoopFileSystem_exists_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    return _return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "exists failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::stat(FileStatus& _return, const Pathname& path)
+{
+  send_stat(path);
+  recv_stat(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_stat(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("stat", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_stat_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_stat(FileStatus& _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("stat") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_stat_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "stat failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::listStatus(std::vector<FileStatus> & _return, const Pathname& path)
+{
+  send_listStatus(path);
+  recv_listStatus(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_listStatus(const Pathname& path)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("listStatus", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_listStatus_pargs args;
+  args.path = &path;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_listStatus(std::vector<FileStatus> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("listStatus") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_listStatus_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "listStatus failed: unknown result");
+}
+
+void ThriftHadoopFileSystemClient::chmod(const Pathname& path, const int16_t mode)
+{
+  send_chmod(path, mode);
+  recv_chmod();
+}
+
+void ThriftHadoopFileSystemClient::send_chmod(const Pathname& path, const int16_t mode)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("chmod", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_chmod_pargs args;
+  args.path = &path;
+  args.mode = &mode;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_chmod()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("chmod") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_chmod_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  return;
+}
+
+void ThriftHadoopFileSystemClient::chown(const Pathname& path, const std::string& owner, const std::string& group)
+{
+  send_chown(path, owner, group);
+  recv_chown();
+}
+
+void ThriftHadoopFileSystemClient::send_chown(const Pathname& path, const std::string& owner, const std::string& group)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("chown", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_chown_pargs args;
+  args.path = &path;
+  args.owner = &owner;
+  args.group = &group;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_chown()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("chown") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_chown_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  return;
+}
+
+void ThriftHadoopFileSystemClient::setReplication(const Pathname& path, const int16_t replication)
+{
+  send_setReplication(path, replication);
+  recv_setReplication();
+}
+
+void ThriftHadoopFileSystemClient::send_setReplication(const Pathname& path, const int16_t replication)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("setReplication", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_setReplication_pargs args;
+  args.path = &path;
+  args.replication = &replication;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_setReplication()
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("setReplication") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_setReplication_presult result;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  return;
+}
+
+void ThriftHadoopFileSystemClient::getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length)
+{
+  send_getFileBlockLocations(path, start, length);
+  recv_getFileBlockLocations(_return);
+}
+
+void ThriftHadoopFileSystemClient::send_getFileBlockLocations(const Pathname& path, const int64_t start, const int64_t length)
+{
+  int32_t cseqid = 0;
+  oprot_->writeMessageBegin("getFileBlockLocations", facebook::thrift::protocol::T_CALL, cseqid);
+
+  ThriftHadoopFileSystem_getFileBlockLocations_pargs args;
+  args.path = &path;
+  args.start = &start;
+  args.length = &length;
+  args.write(oprot_);
+
+  oprot_->writeMessageEnd();
+  oprot_->getTransport()->flush();
+  oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemClient::recv_getFileBlockLocations(std::vector<BlockLocation> & _return)
+{
+
+  int32_t rseqid = 0;
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+
+  iprot_->readMessageBegin(fname, mtype, rseqid);
+  if (mtype == facebook::thrift::protocol::T_EXCEPTION) {
+    facebook::thrift::TApplicationException x;
+    x.read(iprot_);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw x;
+  }
+  if (mtype != facebook::thrift::protocol::T_REPLY) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+  }
+  if (fname.compare("getFileBlockLocations") != 0) {
+    iprot_->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot_->readMessageEnd();
+    iprot_->getTransport()->readEnd();
+    throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);
+  }
+  ThriftHadoopFileSystem_getFileBlockLocations_presult result;
+  result.success = &_return;
+  result.read(iprot_);
+  iprot_->readMessageEnd();
+  iprot_->getTransport()->readEnd();
+
+  if (result.__isset.success) {
+    // _return pointer has now been filled
+    return;
+  }
+  if (result.__isset.ouch) {
+    throw result.ouch;
+  }
+  throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, "getFileBlockLocations failed: unknown result");
+}
+
+bool ThriftHadoopFileSystemProcessor::process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot) {
+
+  facebook::thrift::protocol::TProtocol* iprot = piprot.get();
+  facebook::thrift::protocol::TProtocol* oprot = poprot.get();
+  std::string fname;
+  facebook::thrift::protocol::TMessageType mtype;
+  int32_t seqid;
+
+  iprot->readMessageBegin(fname, mtype, seqid);
+
+  if (mtype != facebook::thrift::protocol::T_CALL) {
+    iprot->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot->readMessageEnd();
+    iprot->getTransport()->readEnd();
+    facebook::thrift::TApplicationException x(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+    oprot->writeMessageBegin(fname, facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return true;
+  }
+
+  return process_fn(iprot, oprot, fname, seqid);
+}
+
+bool ThriftHadoopFileSystemProcessor::process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) {
+  std::map<std::string, void (ThriftHadoopFileSystemProcessor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)>::iterator pfn;
+  pfn = processMap_.find(fname);
+  if (pfn == processMap_.end()) {
+    iprot->skip(facebook::thrift::protocol::T_STRUCT);
+    iprot->readMessageEnd();
+    iprot->getTransport()->readEnd();
+    facebook::thrift::TApplicationException x(facebook::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'");
+    oprot->writeMessageBegin(fname, facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return true;
+  }
+  (this->*(pfn->second))(seqid, iprot, oprot);
+  return true;
+}
+
+void ThriftHadoopFileSystemProcessor::process_setInactivityTimeoutPeriod(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result result;
+  try {
+    iface_->setInactivityTimeoutPeriod(args.periodInSeconds);
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("setInactivityTimeoutPeriod", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("setInactivityTimeoutPeriod", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_shutdown(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_shutdown_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_shutdown_result result;
+  try {
+    iface_->shutdown(args.status);
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("shutdown", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("shutdown", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_create(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_create_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_create_result result;
+  try {
+    iface_->create(result.success, args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("create", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("create", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_createFile(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_createFile_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_createFile_result result;
+  try {
+    iface_->createFile(result.success, args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("createFile", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("createFile", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_open(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_open_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_open_result result;
+  try {
+    iface_->open(result.success, args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("open", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("open", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_append(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_append_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_append_result result;
+  try {
+    iface_->append(result.success, args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("append", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("append", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_write(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_write_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_write_result result;
+  try {
+    result.success = iface_->write(args.handle, args.data);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("write", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("write", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_read(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_read_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_read_result result;
+  try {
+    iface_->read(result.success, args.handle, args.offset, args.size);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("read", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("read", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_close(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_close_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_close_result result;
+  try {
+    result.success = iface_->close(args.out);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("close", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("close", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_rm(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_rm_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_rm_result result;
+  try {
+    result.success = iface_->rm(args.path, args.recursive);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("rm", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("rm", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_rename(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_rename_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_rename_result result;
+  try {
+    result.success = iface_->rename(args.path, args.dest);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("rename", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("rename", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_mkdirs(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_mkdirs_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_mkdirs_result result;
+  try {
+    result.success = iface_->mkdirs(args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("mkdirs", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("mkdirs", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_exists(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_exists_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_exists_result result;
+  try {
+    result.success = iface_->exists(args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("exists", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("exists", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_stat(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_stat_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_stat_result result;
+  try {
+    iface_->stat(result.success, args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("stat", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("stat", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_listStatus(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_listStatus_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_listStatus_result result;
+  try {
+    iface_->listStatus(result.success, args.path);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("listStatus", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("listStatus", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_chmod(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_chmod_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_chmod_result result;
+  try {
+    iface_->chmod(args.path, args.mode);
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("chmod", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("chmod", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_chown(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_chown_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_chown_result result;
+  try {
+    iface_->chown(args.path, args.owner, args.group);
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("chown", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("chown", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_setReplication(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_setReplication_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_setReplication_result result;
+  try {
+    iface_->setReplication(args.path, args.replication);
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("setReplication", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("setReplication", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+void ThriftHadoopFileSystemProcessor::process_getFileBlockLocations(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)
+{
+  ThriftHadoopFileSystem_getFileBlockLocations_args args;
+  args.read(iprot);
+  iprot->readMessageEnd();
+  iprot->getTransport()->readEnd();
+
+  ThriftHadoopFileSystem_getFileBlockLocations_result result;
+  try {
+    iface_->getFileBlockLocations(result.success, args.path, args.start, args.length);
+    result.__isset.success = true;
+  } catch (ThriftIOException &ouch) {
+    result.ouch = ouch;
+    result.__isset.ouch = true;
+  } catch (const std::exception& e) {
+    facebook::thrift::TApplicationException x(e.what());
+    oprot->writeMessageBegin("getFileBlockLocations", facebook::thrift::protocol::T_EXCEPTION, seqid);
+    x.write(oprot);
+    oprot->writeMessageEnd();
+    oprot->getTransport()->flush();
+    oprot->getTransport()->writeEnd();
+    return;
+  }
+
+  oprot->writeMessageBegin("getFileBlockLocations", facebook::thrift::protocol::T_REPLY, seqid);
+  result.write(oprot);
+  oprot->writeMessageEnd();
+  oprot->getTransport()->flush();
+  oprot->getTransport()->writeEnd();
+}
+
+
+

+ 2359 - 0
src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem.h

@@ -0,0 +1,2359 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef ThriftHadoopFileSystem_H
+#define ThriftHadoopFileSystem_H
+
+#include <TProcessor.h>
+#include "hadoopfs_types.h"
+
+
+
+class ThriftHadoopFileSystemIf {
+ public:
+  virtual ~ThriftHadoopFileSystemIf() {}
+  virtual void setInactivityTimeoutPeriod(const int64_t periodInSeconds) = 0;
+  virtual void shutdown(const int32_t status) = 0;
+  virtual void create(ThriftHandle& _return, const Pathname& path) = 0;
+  virtual void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize) = 0;
+  virtual void open(ThriftHandle& _return, const Pathname& path) = 0;
+  virtual void append(ThriftHandle& _return, const Pathname& path) = 0;
+  virtual bool write(const ThriftHandle& handle, const std::string& data) = 0;
+  virtual void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size) = 0;
+  virtual bool close(const ThriftHandle& out) = 0;
+  virtual bool rm(const Pathname& path, const bool recursive) = 0;
+  virtual bool rename(const Pathname& path, const Pathname& dest) = 0;
+  virtual bool mkdirs(const Pathname& path) = 0;
+  virtual bool exists(const Pathname& path) = 0;
+  virtual void stat(FileStatus& _return, const Pathname& path) = 0;
+  virtual void listStatus(std::vector<FileStatus> & _return, const Pathname& path) = 0;
+  virtual void chmod(const Pathname& path, const int16_t mode) = 0;
+  virtual void chown(const Pathname& path, const std::string& owner, const std::string& group) = 0;
+  virtual void setReplication(const Pathname& path, const int16_t replication) = 0;
+  virtual void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length) = 0;
+};
+
+class ThriftHadoopFileSystemNull : virtual public ThriftHadoopFileSystemIf {
+ public:
+  virtual ~ThriftHadoopFileSystemNull() {}
+  void setInactivityTimeoutPeriod(const int64_t /* periodInSeconds */) {
+    return;
+  }
+  void shutdown(const int32_t /* status */) {
+    return;
+  }
+  void create(ThriftHandle& /* _return */, const Pathname& /* path */) {
+    return;
+  }
+  void createFile(ThriftHandle& /* _return */, const Pathname& /* path */, const int16_t /* mode */, const bool /* overwrite */, const int32_t /* bufferSize */, const int16_t /* block_replication */, const int64_t /* blocksize */) {
+    return;
+  }
+  void open(ThriftHandle& /* _return */, const Pathname& /* path */) {
+    return;
+  }
+  void append(ThriftHandle& /* _return */, const Pathname& /* path */) {
+    return;
+  }
+  bool write(const ThriftHandle& /* handle */, const std::string& /* data */) {
+    bool _return = false;
+    return _return;
+  }
+  void read(std::string& /* _return */, const ThriftHandle& /* handle */, const int64_t /* offset */, const int32_t /* size */) {
+    return;
+  }
+  bool close(const ThriftHandle& /* out */) {
+    bool _return = false;
+    return _return;
+  }
+  bool rm(const Pathname& /* path */, const bool /* recursive */) {
+    bool _return = false;
+    return _return;
+  }
+  bool rename(const Pathname& /* path */, const Pathname& /* dest */) {
+    bool _return = false;
+    return _return;
+  }
+  bool mkdirs(const Pathname& /* path */) {
+    bool _return = false;
+    return _return;
+  }
+  bool exists(const Pathname& /* path */) {
+    bool _return = false;
+    return _return;
+  }
+  void stat(FileStatus& /* _return */, const Pathname& /* path */) {
+    return;
+  }
+  void listStatus(std::vector<FileStatus> & /* _return */, const Pathname& /* path */) {
+    return;
+  }
+  void chmod(const Pathname& /* path */, const int16_t /* mode */) {
+    return;
+  }
+  void chown(const Pathname& /* path */, const std::string& /* owner */, const std::string& /* group */) {
+    return;
+  }
+  void setReplication(const Pathname& /* path */, const int16_t /* replication */) {
+    return;
+  }
+  void getFileBlockLocations(std::vector<BlockLocation> & /* _return */, const Pathname& /* path */, const int64_t /* start */, const int64_t /* length */) {
+    return;
+  }
+};
+
+class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args {
+ public:
+
+  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args() : periodInSeconds(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args() throw() {}
+
+  int64_t periodInSeconds;
+
+  struct __isset {
+    __isset() : periodInSeconds(false) {}
+    bool periodInSeconds;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args & rhs) const
+  {
+    if (!(periodInSeconds == rhs.periodInSeconds))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs() throw() {}
+
+  const int64_t* periodInSeconds;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result {
+ public:
+
+  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result() throw() {}
+
+
+  bool operator == (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_presult() throw() {}
+
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_shutdown_args {
+ public:
+
+  ThriftHadoopFileSystem_shutdown_args() : status(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_shutdown_args() throw() {}
+
+  int32_t status;
+
+  struct __isset {
+    __isset() : status(false) {}
+    bool status;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_shutdown_args & rhs) const
+  {
+    if (!(status == rhs.status))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_shutdown_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_shutdown_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_shutdown_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_shutdown_pargs() throw() {}
+
+  const int32_t* status;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_shutdown_result {
+ public:
+
+  ThriftHadoopFileSystem_shutdown_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_shutdown_result() throw() {}
+
+
+  bool operator == (const ThriftHadoopFileSystem_shutdown_result & /* rhs */) const
+  {
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_shutdown_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_shutdown_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_shutdown_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_shutdown_presult() throw() {}
+
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_create_args {
+ public:
+
+  ThriftHadoopFileSystem_create_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_create_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_create_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_create_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_create_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_create_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_create_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_create_result {
+ public:
+
+  ThriftHadoopFileSystem_create_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_create_result() throw() {}
+
+  ThriftHandle success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_create_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_create_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_create_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_create_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_create_presult() throw() {}
+
+  ThriftHandle* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_createFile_args {
+ public:
+
+  ThriftHadoopFileSystem_createFile_args() : mode(0), overwrite(0), bufferSize(0), block_replication(0), blocksize(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_createFile_args() throw() {}
+
+  Pathname path;
+  int16_t mode;
+  bool overwrite;
+  int32_t bufferSize;
+  int16_t block_replication;
+  int64_t blocksize;
+
+  struct __isset {
+    __isset() : path(false), mode(false), overwrite(false), bufferSize(false), block_replication(false), blocksize(false) {}
+    bool path;
+    bool mode;
+    bool overwrite;
+    bool bufferSize;
+    bool block_replication;
+    bool blocksize;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_createFile_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(mode == rhs.mode))
+      return false;
+    if (!(overwrite == rhs.overwrite))
+      return false;
+    if (!(bufferSize == rhs.bufferSize))
+      return false;
+    if (!(block_replication == rhs.block_replication))
+      return false;
+    if (!(blocksize == rhs.blocksize))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_createFile_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_createFile_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_createFile_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_createFile_pargs() throw() {}
+
+  const Pathname* path;
+  const int16_t* mode;
+  const bool* overwrite;
+  const int32_t* bufferSize;
+  const int16_t* block_replication;
+  const int64_t* blocksize;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_createFile_result {
+ public:
+
+  ThriftHadoopFileSystem_createFile_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_createFile_result() throw() {}
+
+  ThriftHandle success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_createFile_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_createFile_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_createFile_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_createFile_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_createFile_presult() throw() {}
+
+  ThriftHandle* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_open_args {
+ public:
+
+  ThriftHadoopFileSystem_open_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_open_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_open_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_open_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_open_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_open_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_open_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_open_result {
+ public:
+
+  ThriftHadoopFileSystem_open_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_open_result() throw() {}
+
+  ThriftHandle success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_open_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_open_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_open_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_open_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_open_presult() throw() {}
+
+  ThriftHandle* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_append_args {
+ public:
+
+  ThriftHadoopFileSystem_append_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_append_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_append_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_append_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_append_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_append_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_append_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_append_result {
+ public:
+
+  ThriftHadoopFileSystem_append_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_append_result() throw() {}
+
+  ThriftHandle success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_append_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_append_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_append_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_append_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_append_presult() throw() {}
+
+  ThriftHandle* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_write_args {
+ public:
+
+  ThriftHadoopFileSystem_write_args() : data("") {
+  }
+
+  virtual ~ThriftHadoopFileSystem_write_args() throw() {}
+
+  ThriftHandle handle;
+  std::string data;
+
+  struct __isset {
+    __isset() : handle(false), data(false) {}
+    bool handle;
+    bool data;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_write_args & rhs) const
+  {
+    if (!(handle == rhs.handle))
+      return false;
+    if (!(data == rhs.data))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_write_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_write_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_write_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_write_pargs() throw() {}
+
+  const ThriftHandle* handle;
+  const std::string* data;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_write_result {
+ public:
+
+  ThriftHadoopFileSystem_write_result() : success(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_write_result() throw() {}
+
+  bool success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_write_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_write_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_write_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_write_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_write_presult() throw() {}
+
+  bool* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_read_args {
+ public:
+
+  ThriftHadoopFileSystem_read_args() : offset(0), size(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_read_args() throw() {}
+
+  ThriftHandle handle;
+  int64_t offset;
+  int32_t size;
+
+  struct __isset {
+    __isset() : handle(false), offset(false), size(false) {}
+    bool handle;
+    bool offset;
+    bool size;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_read_args & rhs) const
+  {
+    if (!(handle == rhs.handle))
+      return false;
+    if (!(offset == rhs.offset))
+      return false;
+    if (!(size == rhs.size))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_read_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_read_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_read_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_read_pargs() throw() {}
+
+  const ThriftHandle* handle;
+  const int64_t* offset;
+  const int32_t* size;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_read_result {
+ public:
+
+  ThriftHadoopFileSystem_read_result() : success("") {
+  }
+
+  virtual ~ThriftHadoopFileSystem_read_result() throw() {}
+
+  std::string success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_read_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_read_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_read_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_read_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_read_presult() throw() {}
+
+  std::string* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_close_args {
+ public:
+
+  ThriftHadoopFileSystem_close_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_close_args() throw() {}
+
+  ThriftHandle out;
+
+  struct __isset {
+    __isset() : out(false) {}
+    bool out;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_close_args & rhs) const
+  {
+    if (!(out == rhs.out))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_close_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_close_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_close_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_close_pargs() throw() {}
+
+  const ThriftHandle* out;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_close_result {
+ public:
+
+  ThriftHadoopFileSystem_close_result() : success(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_close_result() throw() {}
+
+  bool success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_close_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_close_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_close_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_close_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_close_presult() throw() {}
+
+  bool* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_rm_args {
+ public:
+
+  ThriftHadoopFileSystem_rm_args() : recursive(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_rm_args() throw() {}
+
+  Pathname path;
+  bool recursive;
+
+  struct __isset {
+    __isset() : path(false), recursive(false) {}
+    bool path;
+    bool recursive;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_rm_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(recursive == rhs.recursive))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_rm_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_rm_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_rm_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_rm_pargs() throw() {}
+
+  const Pathname* path;
+  const bool* recursive;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_rm_result {
+ public:
+
+  ThriftHadoopFileSystem_rm_result() : success(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_rm_result() throw() {}
+
+  bool success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_rm_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_rm_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_rm_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_rm_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_rm_presult() throw() {}
+
+  bool* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_rename_args {
+ public:
+
+  ThriftHadoopFileSystem_rename_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_rename_args() throw() {}
+
+  Pathname path;
+  Pathname dest;
+
+  struct __isset {
+    __isset() : path(false), dest(false) {}
+    bool path;
+    bool dest;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_rename_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(dest == rhs.dest))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_rename_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_rename_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_rename_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_rename_pargs() throw() {}
+
+  const Pathname* path;
+  const Pathname* dest;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_rename_result {
+ public:
+
+  ThriftHadoopFileSystem_rename_result() : success(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_rename_result() throw() {}
+
+  bool success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_rename_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_rename_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_rename_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_rename_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_rename_presult() throw() {}
+
+  bool* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_mkdirs_args {
+ public:
+
+  ThriftHadoopFileSystem_mkdirs_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_mkdirs_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_mkdirs_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_mkdirs_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_mkdirs_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_mkdirs_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_mkdirs_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_mkdirs_result {
+ public:
+
+  ThriftHadoopFileSystem_mkdirs_result() : success(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_mkdirs_result() throw() {}
+
+  bool success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_mkdirs_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_mkdirs_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_mkdirs_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_mkdirs_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_mkdirs_presult() throw() {}
+
+  bool* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_exists_args {
+ public:
+
+  ThriftHadoopFileSystem_exists_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_exists_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_exists_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_exists_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_exists_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_exists_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_exists_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_exists_result {
+ public:
+
+  ThriftHadoopFileSystem_exists_result() : success(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_exists_result() throw() {}
+
+  bool success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_exists_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_exists_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_exists_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_exists_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_exists_presult() throw() {}
+
+  bool* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_stat_args {
+ public:
+
+  ThriftHadoopFileSystem_stat_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_stat_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_stat_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_stat_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_stat_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_stat_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_stat_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_stat_result {
+ public:
+
+  ThriftHadoopFileSystem_stat_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_stat_result() throw() {}
+
+  FileStatus success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_stat_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_stat_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_stat_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_stat_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_stat_presult() throw() {}
+
+  FileStatus* success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_listStatus_args {
+ public:
+
+  ThriftHadoopFileSystem_listStatus_args() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_listStatus_args() throw() {}
+
+  Pathname path;
+
+  struct __isset {
+    __isset() : path(false) {}
+    bool path;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_listStatus_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_listStatus_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_listStatus_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_listStatus_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_listStatus_pargs() throw() {}
+
+  const Pathname* path;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_listStatus_result {
+ public:
+
+  ThriftHadoopFileSystem_listStatus_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_listStatus_result() throw() {}
+
+  std::vector<FileStatus>  success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_listStatus_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_listStatus_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_listStatus_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_listStatus_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_listStatus_presult() throw() {}
+
+  std::vector<FileStatus> * success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_chmod_args {
+ public:
+
+  ThriftHadoopFileSystem_chmod_args() : mode(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_chmod_args() throw() {}
+
+  Pathname path;
+  int16_t mode;
+
+  struct __isset {
+    __isset() : path(false), mode(false) {}
+    bool path;
+    bool mode;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_chmod_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(mode == rhs.mode))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_chmod_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_chmod_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_chmod_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_chmod_pargs() throw() {}
+
+  const Pathname* path;
+  const int16_t* mode;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_chmod_result {
+ public:
+
+  ThriftHadoopFileSystem_chmod_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_chmod_result() throw() {}
+
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : ouch(false) {}
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_chmod_result & rhs) const
+  {
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_chmod_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_chmod_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_chmod_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_chmod_presult() throw() {}
+
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : ouch(false) {}
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_chown_args {
+ public:
+
+  ThriftHadoopFileSystem_chown_args() : owner(""), group("") {
+  }
+
+  virtual ~ThriftHadoopFileSystem_chown_args() throw() {}
+
+  Pathname path;
+  std::string owner;
+  std::string group;
+
+  struct __isset {
+    __isset() : path(false), owner(false), group(false) {}
+    bool path;
+    bool owner;
+    bool group;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_chown_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(owner == rhs.owner))
+      return false;
+    if (!(group == rhs.group))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_chown_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_chown_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_chown_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_chown_pargs() throw() {}
+
+  const Pathname* path;
+  const std::string* owner;
+  const std::string* group;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_chown_result {
+ public:
+
+  ThriftHadoopFileSystem_chown_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_chown_result() throw() {}
+
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : ouch(false) {}
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_chown_result & rhs) const
+  {
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_chown_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_chown_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_chown_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_chown_presult() throw() {}
+
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : ouch(false) {}
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_setReplication_args {
+ public:
+
+  ThriftHadoopFileSystem_setReplication_args() : replication(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_setReplication_args() throw() {}
+
+  Pathname path;
+  int16_t replication;
+
+  struct __isset {
+    __isset() : path(false), replication(false) {}
+    bool path;
+    bool replication;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_setReplication_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(replication == rhs.replication))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_setReplication_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_setReplication_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_setReplication_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_setReplication_pargs() throw() {}
+
+  const Pathname* path;
+  const int16_t* replication;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_setReplication_result {
+ public:
+
+  ThriftHadoopFileSystem_setReplication_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_setReplication_result() throw() {}
+
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : ouch(false) {}
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_setReplication_result & rhs) const
+  {
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_setReplication_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_setReplication_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_setReplication_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_setReplication_presult() throw() {}
+
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : ouch(false) {}
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystem_getFileBlockLocations_args {
+ public:
+
+  ThriftHadoopFileSystem_getFileBlockLocations_args() : start(0), length(0) {
+  }
+
+  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_args() throw() {}
+
+  Pathname path;
+  int64_t start;
+  int64_t length;
+
+  struct __isset {
+    __isset() : path(false), start(false), length(false) {}
+    bool path;
+    bool start;
+    bool length;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_getFileBlockLocations_args & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(start == rhs.start))
+      return false;
+    if (!(length == rhs.length))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_getFileBlockLocations_args &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_getFileBlockLocations_args & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_getFileBlockLocations_pargs {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_pargs() throw() {}
+
+  const Pathname* path;
+  const int64_t* start;
+  const int64_t* length;
+
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_getFileBlockLocations_result {
+ public:
+
+  ThriftHadoopFileSystem_getFileBlockLocations_result() {
+  }
+
+  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_result() throw() {}
+
+  std::vector<BlockLocation>  success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  bool operator == (const ThriftHadoopFileSystem_getFileBlockLocations_result & rhs) const
+  {
+    if (!(success == rhs.success))
+      return false;
+    if (!(ouch == rhs.ouch))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHadoopFileSystem_getFileBlockLocations_result &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHadoopFileSystem_getFileBlockLocations_result & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHadoopFileSystem_getFileBlockLocations_presult {
+ public:
+
+
+  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_presult() throw() {}
+
+  std::vector<BlockLocation> * success;
+  ThriftIOException ouch;
+
+  struct __isset {
+    __isset() : success(false), ouch(false) {}
+    bool success;
+    bool ouch;
+  } __isset;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+
+};
+
+class ThriftHadoopFileSystemClient : virtual public ThriftHadoopFileSystemIf {
+ public:
+  ThriftHadoopFileSystemClient(boost::shared_ptr<facebook::thrift::protocol::TProtocol> prot) :
+    piprot_(prot),
+    poprot_(prot) {
+    iprot_ = prot.get();
+    oprot_ = prot.get();
+  }
+  ThriftHadoopFileSystemClient(boost::shared_ptr<facebook::thrift::protocol::TProtocol> iprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> oprot) :
+    piprot_(iprot),
+    poprot_(oprot) {
+    iprot_ = iprot.get();
+    oprot_ = oprot.get();
+  }
+  boost::shared_ptr<facebook::thrift::protocol::TProtocol> getInputProtocol() {
+    return piprot_;
+  }
+  boost::shared_ptr<facebook::thrift::protocol::TProtocol> getOutputProtocol() {
+    return poprot_;
+  }
+  void setInactivityTimeoutPeriod(const int64_t periodInSeconds);
+  void send_setInactivityTimeoutPeriod(const int64_t periodInSeconds);
+  void recv_setInactivityTimeoutPeriod();
+  void shutdown(const int32_t status);
+  void send_shutdown(const int32_t status);
+  void recv_shutdown();
+  void create(ThriftHandle& _return, const Pathname& path);
+  void send_create(const Pathname& path);
+  void recv_create(ThriftHandle& _return);
+  void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize);
+  void send_createFile(const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize);
+  void recv_createFile(ThriftHandle& _return);
+  void open(ThriftHandle& _return, const Pathname& path);
+  void send_open(const Pathname& path);
+  void recv_open(ThriftHandle& _return);
+  void append(ThriftHandle& _return, const Pathname& path);
+  void send_append(const Pathname& path);
+  void recv_append(ThriftHandle& _return);
+  bool write(const ThriftHandle& handle, const std::string& data);
+  void send_write(const ThriftHandle& handle, const std::string& data);
+  bool recv_write();
+  void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size);
+  void send_read(const ThriftHandle& handle, const int64_t offset, const int32_t size);
+  void recv_read(std::string& _return);
+  bool close(const ThriftHandle& out);
+  void send_close(const ThriftHandle& out);
+  bool recv_close();
+  bool rm(const Pathname& path, const bool recursive);
+  void send_rm(const Pathname& path, const bool recursive);
+  bool recv_rm();
+  bool rename(const Pathname& path, const Pathname& dest);
+  void send_rename(const Pathname& path, const Pathname& dest);
+  bool recv_rename();
+  bool mkdirs(const Pathname& path);
+  void send_mkdirs(const Pathname& path);
+  bool recv_mkdirs();
+  bool exists(const Pathname& path);
+  void send_exists(const Pathname& path);
+  bool recv_exists();
+  void stat(FileStatus& _return, const Pathname& path);
+  void send_stat(const Pathname& path);
+  void recv_stat(FileStatus& _return);
+  void listStatus(std::vector<FileStatus> & _return, const Pathname& path);
+  void send_listStatus(const Pathname& path);
+  void recv_listStatus(std::vector<FileStatus> & _return);
+  void chmod(const Pathname& path, const int16_t mode);
+  void send_chmod(const Pathname& path, const int16_t mode);
+  void recv_chmod();
+  void chown(const Pathname& path, const std::string& owner, const std::string& group);
+  void send_chown(const Pathname& path, const std::string& owner, const std::string& group);
+  void recv_chown();
+  void setReplication(const Pathname& path, const int16_t replication);
+  void send_setReplication(const Pathname& path, const int16_t replication);
+  void recv_setReplication();
+  void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length);
+  void send_getFileBlockLocations(const Pathname& path, const int64_t start, const int64_t length);
+  void recv_getFileBlockLocations(std::vector<BlockLocation> & _return);
+ protected:
+  boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;
+  boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot_;
+  facebook::thrift::protocol::TProtocol* iprot_;
+  facebook::thrift::protocol::TProtocol* oprot_;
+};
+
+class ThriftHadoopFileSystemProcessor : virtual public facebook::thrift::TProcessor {
+ protected:
+  boost::shared_ptr<ThriftHadoopFileSystemIf> iface_;
+  virtual bool process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);
+ private:
+  std::map<std::string, void (ThriftHadoopFileSystemProcessor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)> processMap_;
+  void process_setInactivityTimeoutPeriod(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_shutdown(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_create(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_createFile(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_open(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_append(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_write(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_read(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_close(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_rm(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_rename(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_mkdirs(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_exists(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_stat(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_listStatus(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_chmod(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_chown(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_setReplication(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+  void process_getFileBlockLocations(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
+ public:
+  ThriftHadoopFileSystemProcessor(boost::shared_ptr<ThriftHadoopFileSystemIf> iface) :
+    iface_(iface) {
+    processMap_["setInactivityTimeoutPeriod"] = &ThriftHadoopFileSystemProcessor::process_setInactivityTimeoutPeriod;
+    processMap_["shutdown"] = &ThriftHadoopFileSystemProcessor::process_shutdown;
+    processMap_["create"] = &ThriftHadoopFileSystemProcessor::process_create;
+    processMap_["createFile"] = &ThriftHadoopFileSystemProcessor::process_createFile;
+    processMap_["open"] = &ThriftHadoopFileSystemProcessor::process_open;
+    processMap_["append"] = &ThriftHadoopFileSystemProcessor::process_append;
+    processMap_["write"] = &ThriftHadoopFileSystemProcessor::process_write;
+    processMap_["read"] = &ThriftHadoopFileSystemProcessor::process_read;
+    processMap_["close"] = &ThriftHadoopFileSystemProcessor::process_close;
+    processMap_["rm"] = &ThriftHadoopFileSystemProcessor::process_rm;
+    processMap_["rename"] = &ThriftHadoopFileSystemProcessor::process_rename;
+    processMap_["mkdirs"] = &ThriftHadoopFileSystemProcessor::process_mkdirs;
+    processMap_["exists"] = &ThriftHadoopFileSystemProcessor::process_exists;
+    processMap_["stat"] = &ThriftHadoopFileSystemProcessor::process_stat;
+    processMap_["listStatus"] = &ThriftHadoopFileSystemProcessor::process_listStatus;
+    processMap_["chmod"] = &ThriftHadoopFileSystemProcessor::process_chmod;
+    processMap_["chown"] = &ThriftHadoopFileSystemProcessor::process_chown;
+    processMap_["setReplication"] = &ThriftHadoopFileSystemProcessor::process_setReplication;
+    processMap_["getFileBlockLocations"] = &ThriftHadoopFileSystemProcessor::process_getFileBlockLocations;
+  }
+
+  virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot);
+  virtual ~ThriftHadoopFileSystemProcessor() {}
+};
+
+class ThriftHadoopFileSystemMultiface : virtual public ThriftHadoopFileSystemIf {
+ public:
+  ThriftHadoopFileSystemMultiface(std::vector<boost::shared_ptr<ThriftHadoopFileSystemIf> >& ifaces) : ifaces_(ifaces) {
+  }
+  virtual ~ThriftHadoopFileSystemMultiface() {}
+ protected:
+  std::vector<boost::shared_ptr<ThriftHadoopFileSystemIf> > ifaces_;
+  ThriftHadoopFileSystemMultiface() {}
+  void add(boost::shared_ptr<ThriftHadoopFileSystemIf> iface) {
+    ifaces_.push_back(iface);
+  }
+ public:
+  void setInactivityTimeoutPeriod(const int64_t periodInSeconds) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->setInactivityTimeoutPeriod(periodInSeconds);
+    }
+  }
+
+  void shutdown(const int32_t status) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->shutdown(status);
+    }
+  }
+
+  void create(ThriftHandle& _return, const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->create(_return, path);
+        return;
+      } else {
+        ifaces_[i]->create(_return, path);
+      }
+    }
+  }
+
+  void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->createFile(_return, path, mode, overwrite, bufferSize, block_replication, blocksize);
+        return;
+      } else {
+        ifaces_[i]->createFile(_return, path, mode, overwrite, bufferSize, block_replication, blocksize);
+      }
+    }
+  }
+
+  void open(ThriftHandle& _return, const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->open(_return, path);
+        return;
+      } else {
+        ifaces_[i]->open(_return, path);
+      }
+    }
+  }
+
+  void append(ThriftHandle& _return, const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->append(_return, path);
+        return;
+      } else {
+        ifaces_[i]->append(_return, path);
+      }
+    }
+  }
+
+  bool write(const ThriftHandle& handle, const std::string& data) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->write(handle, data);
+      } else {
+        ifaces_[i]->write(handle, data);
+      }
+    }
+  }
+
+  void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->read(_return, handle, offset, size);
+        return;
+      } else {
+        ifaces_[i]->read(_return, handle, offset, size);
+      }
+    }
+  }
+
+  bool close(const ThriftHandle& out) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->close(out);
+      } else {
+        ifaces_[i]->close(out);
+      }
+    }
+  }
+
+  bool rm(const Pathname& path, const bool recursive) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->rm(path, recursive);
+      } else {
+        ifaces_[i]->rm(path, recursive);
+      }
+    }
+  }
+
+  bool rename(const Pathname& path, const Pathname& dest) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->rename(path, dest);
+      } else {
+        ifaces_[i]->rename(path, dest);
+      }
+    }
+  }
+
+  bool mkdirs(const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->mkdirs(path);
+      } else {
+        ifaces_[i]->mkdirs(path);
+      }
+    }
+  }
+
+  bool exists(const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        return ifaces_[i]->exists(path);
+      } else {
+        ifaces_[i]->exists(path);
+      }
+    }
+  }
+
+  void stat(FileStatus& _return, const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->stat(_return, path);
+        return;
+      } else {
+        ifaces_[i]->stat(_return, path);
+      }
+    }
+  }
+
+  void listStatus(std::vector<FileStatus> & _return, const Pathname& path) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->listStatus(_return, path);
+        return;
+      } else {
+        ifaces_[i]->listStatus(_return, path);
+      }
+    }
+  }
+
+  void chmod(const Pathname& path, const int16_t mode) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->chmod(path, mode);
+    }
+  }
+
+  void chown(const Pathname& path, const std::string& owner, const std::string& group) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->chown(path, owner, group);
+    }
+  }
+
+  void setReplication(const Pathname& path, const int16_t replication) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      ifaces_[i]->setReplication(path, replication);
+    }
+  }
+
+  void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length) {
+    uint32_t sz = ifaces_.size();
+    for (uint32_t i = 0; i < sz; ++i) {
+      if (i == sz - 1) {
+        ifaces_[i]->getFileBlockLocations(_return, path, start, length);
+        return;
+      } else {
+        ifaces_[i]->getFileBlockLocations(_return, path, start, length);
+      }
+    }
+  }
+
+};
+
+
+
+#endif

+ 132 - 0
src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem_server.skeleton.cpp

@@ -0,0 +1,132 @@
+// This autogenerated skeleton file illustrates how to build a server.
+// You should copy it to another filename to avoid overwriting it.
+
+#include "ThriftHadoopFileSystem.h"
+#include <protocol/TBinaryProtocol.h>
+#include <server/TSimpleServer.h>
+#include <transport/TServerSocket.h>
+#include <transport/TBufferTransports.h>
+
+using namespace facebook::thrift;
+using namespace facebook::thrift::protocol;
+using namespace facebook::thrift::transport;
+using namespace facebook::thrift::server;
+
+using boost::shared_ptr;
+
+class ThriftHadoopFileSystemHandler : virtual public ThriftHadoopFileSystemIf {
+ public:
+  ThriftHadoopFileSystemHandler() {
+    // Your initialization goes here
+  }
+
+  void setInactivityTimeoutPeriod(const int64_t periodInSeconds) {
+    // Your implementation goes here
+    printf("setInactivityTimeoutPeriod\n");
+  }
+
+  void shutdown(const int32_t status) {
+    // Your implementation goes here
+    printf("shutdown\n");
+  }
+
+  void create(ThriftHandle& _return, const Pathname& path) {
+    // Your implementation goes here
+    printf("create\n");
+  }
+
+  void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize) {
+    // Your implementation goes here
+    printf("createFile\n");
+  }
+
+  void open(ThriftHandle& _return, const Pathname& path) {
+    // Your implementation goes here
+    printf("open\n");
+  }
+
+  void append(ThriftHandle& _return, const Pathname& path) {
+    // Your implementation goes here
+    printf("append\n");
+  }
+
+  bool write(const ThriftHandle& handle, const std::string& data) {
+    // Your implementation goes here
+    printf("write\n");
+  }
+
+  void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size) {
+    // Your implementation goes here
+    printf("read\n");
+  }
+
+  bool close(const ThriftHandle& out) {
+    // Your implementation goes here
+    printf("close\n");
+  }
+
+  bool rm(const Pathname& path, const bool recursive) {
+    // Your implementation goes here
+    printf("rm\n");
+  }
+
+  bool rename(const Pathname& path, const Pathname& dest) {
+    // Your implementation goes here
+    printf("rename\n");
+  }
+
+  bool mkdirs(const Pathname& path) {
+    // Your implementation goes here
+    printf("mkdirs\n");
+  }
+
+  bool exists(const Pathname& path) {
+    // Your implementation goes here
+    printf("exists\n");
+  }
+
+  void stat(FileStatus& _return, const Pathname& path) {
+    // Your implementation goes here
+    printf("stat\n");
+  }
+
+  void listStatus(std::vector<FileStatus> & _return, const Pathname& path) {
+    // Your implementation goes here
+    printf("listStatus\n");
+  }
+
+  void chmod(const Pathname& path, const int16_t mode) {
+    // Your implementation goes here
+    printf("chmod\n");
+  }
+
+  void chown(const Pathname& path, const std::string& owner, const std::string& group) {
+    // Your implementation goes here
+    printf("chown\n");
+  }
+
+  void setReplication(const Pathname& path, const int16_t replication) {
+    // Your implementation goes here
+    printf("setReplication\n");
+  }
+
+  void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length) {
+    // Your implementation goes here
+    printf("getFileBlockLocations\n");
+  }
+
+};
+
+int main(int argc, char **argv) {
+  int port = 9090;
+  shared_ptr<ThriftHadoopFileSystemHandler> handler(new ThriftHadoopFileSystemHandler());
+  shared_ptr<TProcessor> processor(new ThriftHadoopFileSystemProcessor(handler));
+  shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
+  shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+  shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+
+  TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
+  server.serve();
+  return 0;
+}
+

+ 16 - 0
src/contrib/thriftfs/gen-cpp/hadoopfs_constants.cpp

@@ -0,0 +1,16 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "hadoopfs_constants.h"
+
+
+
+const hadoopfsConstants g_hadoopfs_constants;
+
+hadoopfsConstants::hadoopfsConstants() {
+}
+
+
+

+ 23 - 0
src/contrib/thriftfs/gen-cpp/hadoopfs_constants.h

@@ -0,0 +1,23 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef hadoopfs_CONSTANTS_H
+#define hadoopfs_CONSTANTS_H
+
+#include "hadoopfs_types.h"
+
+
+
+class hadoopfsConstants {
+ public:
+  hadoopfsConstants();
+
+};
+
+extern const hadoopfsConstants g_hadoopfs_constants;
+
+
+
+#endif

+ 495 - 0
src/contrib/thriftfs/gen-cpp/hadoopfs_types.cpp

@@ -0,0 +1,495 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#include "hadoopfs_types.h"
+
+
+
+const char* ThriftHandle::ascii_fingerprint = "2317B51D4172A111734AAB85F990F7C6";
+const uint8_t ThriftHandle::binary_fingerprint[16] = {0x23,0x17,0xB5,0x1D,0x41,0x72,0xA1,0x11,0x73,0x4A,0xAB,0x85,0xF9,0x90,0xF7,0xC6};
+
+uint32_t ThriftHandle::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case -1:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->id);
+          this->__isset.id = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftHandle::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftHandle");
+  xfer += oprot->writeFieldBegin("id", facebook::thrift::protocol::T_I64, -1);
+  xfer += oprot->writeI64(this->id);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* Pathname::ascii_fingerprint = "E2167DA91A8F7459A2FE1B5F56D14B5D";
+const uint8_t Pathname::binary_fingerprint[16] = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D};
+
+uint32_t Pathname::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case -1:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->pathname);
+          this->__isset.pathname = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t Pathname::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("Pathname");
+  xfer += oprot->writeFieldBegin("pathname", facebook::thrift::protocol::T_STRING, -1);
+  xfer += oprot->writeString(this->pathname);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* FileStatus::ascii_fingerprint = "68FE7242A6727149B291A86FB9570D2B";
+const uint8_t FileStatus::binary_fingerprint[16] = {0x68,0xFE,0x72,0x42,0xA6,0x72,0x71,0x49,0xB2,0x91,0xA8,0x6F,0xB9,0x57,0x0D,0x2B};
+
+uint32_t FileStatus::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->path);
+          this->__isset.path = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->length);
+          this->__isset.length = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == facebook::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->isdir);
+          this->__isset.isdir = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == facebook::thrift::protocol::T_I16) {
+          xfer += iprot->readI16(this->block_replication);
+          this->__isset.block_replication = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 5:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->blocksize);
+          this->__isset.blocksize = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 6:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->modification_time);
+          this->__isset.modification_time = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 7:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->permission);
+          this->__isset.permission = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 8:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->owner);
+          this->__isset.owner = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 9:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->group);
+          this->__isset.group = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t FileStatus::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("FileStatus");
+  xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->path);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("length", facebook::thrift::protocol::T_I64, 2);
+  xfer += oprot->writeI64(this->length);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("isdir", facebook::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeBool(this->isdir);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("block_replication", facebook::thrift::protocol::T_I16, 4);
+  xfer += oprot->writeI16(this->block_replication);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("blocksize", facebook::thrift::protocol::T_I64, 5);
+  xfer += oprot->writeI64(this->blocksize);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("modification_time", facebook::thrift::protocol::T_I64, 6);
+  xfer += oprot->writeI64(this->modification_time);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("permission", facebook::thrift::protocol::T_STRING, 7);
+  xfer += oprot->writeString(this->permission);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("owner", facebook::thrift::protocol::T_STRING, 8);
+  xfer += oprot->writeString(this->owner);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("group", facebook::thrift::protocol::T_STRING, 9);
+  xfer += oprot->writeString(this->group);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* BlockLocation::ascii_fingerprint = "8BF3B16BED96367B21783389BDF8B1C0";
+const uint8_t BlockLocation::binary_fingerprint[16] = {0x8B,0xF3,0xB1,0x6B,0xED,0x96,0x36,0x7B,0x21,0x78,0x33,0x89,0xBD,0xF8,0xB1,0xC0};
+
+uint32_t BlockLocation::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case 1:
+        if (ftype == facebook::thrift::protocol::T_LIST) {
+          {
+            this->hosts.clear();
+            uint32_t _size0;
+            facebook::thrift::protocol::TType _etype3;
+            iprot->readListBegin(_etype3, _size0);
+            this->hosts.resize(_size0);
+            uint32_t _i4;
+            for (_i4 = 0; _i4 < _size0; ++_i4)
+            {
+              xfer += iprot->readString(this->hosts[_i4]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.hosts = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 2:
+        if (ftype == facebook::thrift::protocol::T_LIST) {
+          {
+            this->names.clear();
+            uint32_t _size5;
+            facebook::thrift::protocol::TType _etype8;
+            iprot->readListBegin(_etype8, _size5);
+            this->names.resize(_size5);
+            uint32_t _i9;
+            for (_i9 = 0; _i9 < _size5; ++_i9)
+            {
+              xfer += iprot->readString(this->names[_i9]);
+            }
+            iprot->readListEnd();
+          }
+          this->__isset.names = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 3:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->offset);
+          this->__isset.offset = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == facebook::thrift::protocol::T_I64) {
+          xfer += iprot->readI64(this->length);
+          this->__isset.length = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t BlockLocation::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("BlockLocation");
+  xfer += oprot->writeFieldBegin("hosts", facebook::thrift::protocol::T_LIST, 1);
+  {
+    xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRING, this->hosts.size());
+    std::vector<std::string> ::const_iterator _iter10;
+    for (_iter10 = this->hosts.begin(); _iter10 != this->hosts.end(); ++_iter10)
+    {
+      xfer += oprot->writeString((*_iter10));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("names", facebook::thrift::protocol::T_LIST, 2);
+  {
+    xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRING, this->names.size());
+    std::vector<std::string> ::const_iterator _iter11;
+    for (_iter11 = this->names.begin(); _iter11 != this->names.end(); ++_iter11)
+    {
+      xfer += oprot->writeString((*_iter11));
+    }
+    xfer += oprot->writeListEnd();
+  }
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("offset", facebook::thrift::protocol::T_I64, 3);
+  xfer += oprot->writeI64(this->offset);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldBegin("length", facebook::thrift::protocol::T_I64, 4);
+  xfer += oprot->writeI64(this->length);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* MalformedInputException::ascii_fingerprint = "E2167DA91A8F7459A2FE1B5F56D14B5D";
+const uint8_t MalformedInputException::binary_fingerprint[16] = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D};
+
+uint32_t MalformedInputException::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case -1:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->message);
+          this->__isset.message = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t MalformedInputException::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("MalformedInputException");
+  xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, -1);
+  xfer += oprot->writeString(this->message);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+const char* ThriftIOException::ascii_fingerprint = "E2167DA91A8F7459A2FE1B5F56D14B5D";
+const uint8_t ThriftIOException::binary_fingerprint[16] = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D};
+
+uint32_t ThriftIOException::read(facebook::thrift::protocol::TProtocol* iprot) {
+
+  uint32_t xfer = 0;
+  std::string fname;
+  facebook::thrift::protocol::TType ftype;
+  int16_t fid;
+
+  xfer += iprot->readStructBegin(fname);
+
+  using facebook::thrift::protocol::TProtocolException;
+
+
+  while (true)
+  {
+    xfer += iprot->readFieldBegin(fname, ftype, fid);
+    if (ftype == facebook::thrift::protocol::T_STOP) {
+      break;
+    }
+    switch (fid)
+    {
+      case -1:
+        if (ftype == facebook::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->message);
+          this->__isset.message = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      default:
+        xfer += iprot->skip(ftype);
+        break;
+    }
+    xfer += iprot->readFieldEnd();
+  }
+
+  xfer += iprot->readStructEnd();
+
+  return xfer;
+}
+
+uint32_t ThriftIOException::write(facebook::thrift::protocol::TProtocol* oprot) const {
+  uint32_t xfer = 0;
+  xfer += oprot->writeStructBegin("ThriftIOException");
+  xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, -1);
+  xfer += oprot->writeString(this->message);
+  xfer += oprot->writeFieldEnd();
+  xfer += oprot->writeFieldStop();
+  xfer += oprot->writeStructEnd();
+  return xfer;
+}
+
+

+ 274 - 0
src/contrib/thriftfs/gen-cpp/hadoopfs_types.h

@@ -0,0 +1,274 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+#ifndef hadoopfs_TYPES_H
+#define hadoopfs_TYPES_H
+
+#include <Thrift.h>
+#include <reflection_limited_types.h>
+#include <protocol/TProtocol.h>
+#include <transport/TTransport.h>
+
+
+
+
+
+class ThriftHandle {
+ public:
+
+  static const char* ascii_fingerprint; // = "2317B51D4172A111734AAB85F990F7C6";
+  static const uint8_t binary_fingerprint[16]; // = {0x23,0x17,0xB5,0x1D,0x41,0x72,0xA1,0x11,0x73,0x4A,0xAB,0x85,0xF9,0x90,0xF7,0xC6};
+
+  ThriftHandle() : id(0) {
+  }
+
+  virtual ~ThriftHandle() throw() {}
+
+  int64_t id;
+
+  struct __isset {
+    __isset() : id(false) {}
+    bool id;
+  } __isset;
+
+  bool operator == (const ThriftHandle & rhs) const
+  {
+    if (!(id == rhs.id))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftHandle &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftHandle & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class Pathname {
+ public:
+
+  static const char* ascii_fingerprint; // = "E2167DA91A8F7459A2FE1B5F56D14B5D";
+  static const uint8_t binary_fingerprint[16]; // = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D};
+
+  Pathname() : pathname("") {
+  }
+
+  virtual ~Pathname() throw() {}
+
+  std::string pathname;
+
+  struct __isset {
+    __isset() : pathname(false) {}
+    bool pathname;
+  } __isset;
+
+  bool operator == (const Pathname & rhs) const
+  {
+    if (!(pathname == rhs.pathname))
+      return false;
+    return true;
+  }
+  bool operator != (const Pathname &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const Pathname & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class FileStatus {
+ public:
+
+  static const char* ascii_fingerprint; // = "68FE7242A6727149B291A86FB9570D2B";
+  static const uint8_t binary_fingerprint[16]; // = {0x68,0xFE,0x72,0x42,0xA6,0x72,0x71,0x49,0xB2,0x91,0xA8,0x6F,0xB9,0x57,0x0D,0x2B};
+
+  FileStatus() : path(""), length(0), isdir(0), block_replication(0), blocksize(0), modification_time(0), permission(""), owner(""), group("") {
+  }
+
+  virtual ~FileStatus() throw() {}
+
+  std::string path;
+  int64_t length;
+  bool isdir;
+  int16_t block_replication;
+  int64_t blocksize;
+  int64_t modification_time;
+  std::string permission;
+  std::string owner;
+  std::string group;
+
+  struct __isset {
+    __isset() : path(false), length(false), isdir(false), block_replication(false), blocksize(false), modification_time(false), permission(false), owner(false), group(false) {}
+    bool path;
+    bool length;
+    bool isdir;
+    bool block_replication;
+    bool blocksize;
+    bool modification_time;
+    bool permission;
+    bool owner;
+    bool group;
+  } __isset;
+
+  bool operator == (const FileStatus & rhs) const
+  {
+    if (!(path == rhs.path))
+      return false;
+    if (!(length == rhs.length))
+      return false;
+    if (!(isdir == rhs.isdir))
+      return false;
+    if (!(block_replication == rhs.block_replication))
+      return false;
+    if (!(blocksize == rhs.blocksize))
+      return false;
+    if (!(modification_time == rhs.modification_time))
+      return false;
+    if (!(permission == rhs.permission))
+      return false;
+    if (!(owner == rhs.owner))
+      return false;
+    if (!(group == rhs.group))
+      return false;
+    return true;
+  }
+  bool operator != (const FileStatus &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const FileStatus & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class BlockLocation {
+ public:
+
+  static const char* ascii_fingerprint; // = "8BF3B16BED96367B21783389BDF8B1C0";
+  static const uint8_t binary_fingerprint[16]; // = {0x8B,0xF3,0xB1,0x6B,0xED,0x96,0x36,0x7B,0x21,0x78,0x33,0x89,0xBD,0xF8,0xB1,0xC0};
+
+  BlockLocation() : offset(0), length(0) {
+  }
+
+  virtual ~BlockLocation() throw() {}
+
+  std::vector<std::string>  hosts;
+  std::vector<std::string>  names;
+  int64_t offset;
+  int64_t length;
+
+  struct __isset {
+    __isset() : hosts(false), names(false), offset(false), length(false) {}
+    bool hosts;
+    bool names;
+    bool offset;
+    bool length;
+  } __isset;
+
+  bool operator == (const BlockLocation & rhs) const
+  {
+    if (!(hosts == rhs.hosts))
+      return false;
+    if (!(names == rhs.names))
+      return false;
+    if (!(offset == rhs.offset))
+      return false;
+    if (!(length == rhs.length))
+      return false;
+    return true;
+  }
+  bool operator != (const BlockLocation &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const BlockLocation & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class MalformedInputException : public facebook::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "E2167DA91A8F7459A2FE1B5F56D14B5D";
+  static const uint8_t binary_fingerprint[16]; // = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D};
+
+  MalformedInputException() : message("") {
+  }
+
+  virtual ~MalformedInputException() throw() {}
+
+  std::string message;
+
+  struct __isset {
+    __isset() : message(false) {}
+    bool message;
+  } __isset;
+
+  bool operator == (const MalformedInputException & rhs) const
+  {
+    if (!(message == rhs.message))
+      return false;
+    return true;
+  }
+  bool operator != (const MalformedInputException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const MalformedInputException & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftIOException : public facebook::thrift::TException {
+ public:
+
+  static const char* ascii_fingerprint; // = "E2167DA91A8F7459A2FE1B5F56D14B5D";
+  static const uint8_t binary_fingerprint[16]; // = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D};
+
+  ThriftIOException() : message("") {
+  }
+
+  virtual ~ThriftIOException() throw() {}
+
+  std::string message;
+
+  struct __isset {
+    __isset() : message(false) {}
+    bool message;
+  } __isset;
+
+  bool operator == (const ThriftIOException & rhs) const
+  {
+    if (!(message == rhs.message))
+      return false;
+    return true;
+  }
+  bool operator != (const ThriftIOException &rhs) const {
+    return !(*this == rhs);
+  }
+
+  bool operator < (const ThriftIOException & ) const;
+
+  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
+  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+
+#endif

+ 243 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/BlockLocation.java

@@ -0,0 +1,243 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class BlockLocation implements TBase, java.io.Serializable {
+  public List<String> hosts;
+  public List<String> names;
+  public long offset;
+  public long length;
+
+  public final Isset __isset = new Isset();
+  public static final class Isset implements java.io.Serializable {
+    public boolean hosts = false;
+    public boolean names = false;
+    public boolean offset = false;
+    public boolean length = false;
+  }
+
+  public BlockLocation() {
+  }
+
+  public BlockLocation(
+    List<String> hosts,
+    List<String> names,
+    long offset,
+    long length)
+  {
+    this();
+    this.hosts = hosts;
+    this.__isset.hosts = true;
+    this.names = names;
+    this.__isset.names = true;
+    this.offset = offset;
+    this.__isset.offset = true;
+    this.length = length;
+    this.__isset.length = true;
+  }
+
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof BlockLocation)
+      return this.equals((BlockLocation)that);
+    return false;
+  }
+
+  public boolean equals(BlockLocation that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_hosts = true && (this.hosts != null);
+    boolean that_present_hosts = true && (that.hosts != null);
+    if (this_present_hosts || that_present_hosts) {
+      if (!(this_present_hosts && that_present_hosts))
+        return false;
+      if (!this.hosts.equals(that.hosts))
+        return false;
+    }
+
+    boolean this_present_names = true && (this.names != null);
+    boolean that_present_names = true && (that.names != null);
+    if (this_present_names || that_present_names) {
+      if (!(this_present_names && that_present_names))
+        return false;
+      if (!this.names.equals(that.names))
+        return false;
+    }
+
+    boolean this_present_offset = true;
+    boolean that_present_offset = true;
+    if (this_present_offset || that_present_offset) {
+      if (!(this_present_offset && that_present_offset))
+        return false;
+      if (this.offset != that.offset)
+        return false;
+    }
+
+    boolean this_present_length = true;
+    boolean that_present_length = true;
+    if (this_present_length || that_present_length) {
+      if (!(this_present_length && that_present_length))
+        return false;
+      if (this.length != that.length)
+        return false;
+    }
+
+    return true;
+  }
+
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case 1:
+          if (field.type == TType.LIST) {
+            {
+              TList _list0 = iprot.readListBegin();
+              this.hosts = new ArrayList<String>(_list0.size);
+              for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+              {
+                String _elem2 = null;
+                _elem2 = iprot.readString();
+                this.hosts.add(_elem2);
+              }
+              iprot.readListEnd();
+            }
+            this.__isset.hosts = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2:
+          if (field.type == TType.LIST) {
+            {
+              TList _list3 = iprot.readListBegin();
+              this.names = new ArrayList<String>(_list3.size);
+              for (int _i4 = 0; _i4 < _list3.size; ++_i4)
+              {
+                String _elem5 = null;
+                _elem5 = iprot.readString();
+                this.names.add(_elem5);
+              }
+              iprot.readListEnd();
+            }
+            this.__isset.names = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3:
+          if (field.type == TType.I64) {
+            this.offset = iprot.readI64();
+            this.__isset.offset = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4:
+          if (field.type == TType.I64) {
+            this.length = iprot.readI64();
+            this.__isset.length = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    TStruct struct = new TStruct("BlockLocation");
+    oprot.writeStructBegin(struct);
+    TField field = new TField();
+    if (this.hosts != null) {
+      field.name = "hosts";
+      field.type = TType.LIST;
+      field.id = 1;
+      oprot.writeFieldBegin(field);
+      {
+        oprot.writeListBegin(new TList(TType.STRING, this.hosts.size()));
+        for (String _iter6 : this.hosts)        {
+          oprot.writeString(_iter6);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.names != null) {
+      field.name = "names";
+      field.type = TType.LIST;
+      field.id = 2;
+      oprot.writeFieldBegin(field);
+      {
+        oprot.writeListBegin(new TList(TType.STRING, this.names.size()));
+        for (String _iter7 : this.names)        {
+          oprot.writeString(_iter7);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    field.name = "offset";
+    field.type = TType.I64;
+    field.id = 3;
+    oprot.writeFieldBegin(field);
+    oprot.writeI64(this.offset);
+    oprot.writeFieldEnd();
+    field.name = "length";
+    field.type = TType.I64;
+    field.id = 4;
+    oprot.writeFieldBegin(field);
+    oprot.writeI64(this.length);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  public String toString() {
+    StringBuilder sb = new StringBuilder("BlockLocation(");
+    sb.append("hosts:");
+    sb.append(this.hosts);
+    sb.append(",names:");
+    sb.append(this.names);
+    sb.append(",offset:");
+    sb.append(this.offset);
+    sb.append(",length:");
+    sb.append(this.length);
+    sb.append(")");
+    return sb.toString();
+  }
+
+}
+

+ 365 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/FileStatus.java

@@ -0,0 +1,365 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class FileStatus implements TBase, java.io.Serializable {
+  public String path;
+  public long length;
+  public boolean isdir;
+  public short block_replication;
+  public long blocksize;
+  public long modification_time;
+  public String permission;
+  public String owner;
+  public String group;
+
+  public final Isset __isset = new Isset();
+  public static final class Isset implements java.io.Serializable {
+    public boolean path = false;
+    public boolean length = false;
+    public boolean isdir = false;
+    public boolean block_replication = false;
+    public boolean blocksize = false;
+    public boolean modification_time = false;
+    public boolean permission = false;
+    public boolean owner = false;
+    public boolean group = false;
+  }
+
+  public FileStatus() {
+  }
+
+  public FileStatus(
+    String path,
+    long length,
+    boolean isdir,
+    short block_replication,
+    long blocksize,
+    long modification_time,
+    String permission,
+    String owner,
+    String group)
+  {
+    this();
+    this.path = path;
+    this.__isset.path = true;
+    this.length = length;
+    this.__isset.length = true;
+    this.isdir = isdir;
+    this.__isset.isdir = true;
+    this.block_replication = block_replication;
+    this.__isset.block_replication = true;
+    this.blocksize = blocksize;
+    this.__isset.blocksize = true;
+    this.modification_time = modification_time;
+    this.__isset.modification_time = true;
+    this.permission = permission;
+    this.__isset.permission = true;
+    this.owner = owner;
+    this.__isset.owner = true;
+    this.group = group;
+    this.__isset.group = true;
+  }
+
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof FileStatus)
+      return this.equals((FileStatus)that);
+    return false;
+  }
+
+  public boolean equals(FileStatus that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_path = true && (this.path != null);
+    boolean that_present_path = true && (that.path != null);
+    if (this_present_path || that_present_path) {
+      if (!(this_present_path && that_present_path))
+        return false;
+      if (!this.path.equals(that.path))
+        return false;
+    }
+
+    boolean this_present_length = true;
+    boolean that_present_length = true;
+    if (this_present_length || that_present_length) {
+      if (!(this_present_length && that_present_length))
+        return false;
+      if (this.length != that.length)
+        return false;
+    }
+
+    boolean this_present_isdir = true;
+    boolean that_present_isdir = true;
+    if (this_present_isdir || that_present_isdir) {
+      if (!(this_present_isdir && that_present_isdir))
+        return false;
+      if (this.isdir != that.isdir)
+        return false;
+    }
+
+    boolean this_present_block_replication = true;
+    boolean that_present_block_replication = true;
+    if (this_present_block_replication || that_present_block_replication) {
+      if (!(this_present_block_replication && that_present_block_replication))
+        return false;
+      if (this.block_replication != that.block_replication)
+        return false;
+    }
+
+    boolean this_present_blocksize = true;
+    boolean that_present_blocksize = true;
+    if (this_present_blocksize || that_present_blocksize) {
+      if (!(this_present_blocksize && that_present_blocksize))
+        return false;
+      if (this.blocksize != that.blocksize)
+        return false;
+    }
+
+    boolean this_present_modification_time = true;
+    boolean that_present_modification_time = true;
+    if (this_present_modification_time || that_present_modification_time) {
+      if (!(this_present_modification_time && that_present_modification_time))
+        return false;
+      if (this.modification_time != that.modification_time)
+        return false;
+    }
+
+    boolean this_present_permission = true && (this.permission != null);
+    boolean that_present_permission = true && (that.permission != null);
+    if (this_present_permission || that_present_permission) {
+      if (!(this_present_permission && that_present_permission))
+        return false;
+      if (!this.permission.equals(that.permission))
+        return false;
+    }
+
+    boolean this_present_owner = true && (this.owner != null);
+    boolean that_present_owner = true && (that.owner != null);
+    if (this_present_owner || that_present_owner) {
+      if (!(this_present_owner && that_present_owner))
+        return false;
+      if (!this.owner.equals(that.owner))
+        return false;
+    }
+
+    boolean this_present_group = true && (this.group != null);
+    boolean that_present_group = true && (that.group != null);
+    if (this_present_group || that_present_group) {
+      if (!(this_present_group && that_present_group))
+        return false;
+      if (!this.group.equals(that.group))
+        return false;
+    }
+
+    return true;
+  }
+
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case 1:
+          if (field.type == TType.STRING) {
+            this.path = iprot.readString();
+            this.__isset.path = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2:
+          if (field.type == TType.I64) {
+            this.length = iprot.readI64();
+            this.__isset.length = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3:
+          if (field.type == TType.BOOL) {
+            this.isdir = iprot.readBool();
+            this.__isset.isdir = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4:
+          if (field.type == TType.I16) {
+            this.block_replication = iprot.readI16();
+            this.__isset.block_replication = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 5:
+          if (field.type == TType.I64) {
+            this.blocksize = iprot.readI64();
+            this.__isset.blocksize = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 6:
+          if (field.type == TType.I64) {
+            this.modification_time = iprot.readI64();
+            this.__isset.modification_time = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 7:
+          if (field.type == TType.STRING) {
+            this.permission = iprot.readString();
+            this.__isset.permission = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 8:
+          if (field.type == TType.STRING) {
+            this.owner = iprot.readString();
+            this.__isset.owner = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 9:
+          if (field.type == TType.STRING) {
+            this.group = iprot.readString();
+            this.__isset.group = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    TStruct struct = new TStruct("FileStatus");
+    oprot.writeStructBegin(struct);
+    TField field = new TField();
+    if (this.path != null) {
+      field.name = "path";
+      field.type = TType.STRING;
+      field.id = 1;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.path);
+      oprot.writeFieldEnd();
+    }
+    field.name = "length";
+    field.type = TType.I64;
+    field.id = 2;
+    oprot.writeFieldBegin(field);
+    oprot.writeI64(this.length);
+    oprot.writeFieldEnd();
+    field.name = "isdir";
+    field.type = TType.BOOL;
+    field.id = 3;
+    oprot.writeFieldBegin(field);
+    oprot.writeBool(this.isdir);
+    oprot.writeFieldEnd();
+    field.name = "block_replication";
+    field.type = TType.I16;
+    field.id = 4;
+    oprot.writeFieldBegin(field);
+    oprot.writeI16(this.block_replication);
+    oprot.writeFieldEnd();
+    field.name = "blocksize";
+    field.type = TType.I64;
+    field.id = 5;
+    oprot.writeFieldBegin(field);
+    oprot.writeI64(this.blocksize);
+    oprot.writeFieldEnd();
+    field.name = "modification_time";
+    field.type = TType.I64;
+    field.id = 6;
+    oprot.writeFieldBegin(field);
+    oprot.writeI64(this.modification_time);
+    oprot.writeFieldEnd();
+    if (this.permission != null) {
+      field.name = "permission";
+      field.type = TType.STRING;
+      field.id = 7;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.permission);
+      oprot.writeFieldEnd();
+    }
+    if (this.owner != null) {
+      field.name = "owner";
+      field.type = TType.STRING;
+      field.id = 8;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.owner);
+      oprot.writeFieldEnd();
+    }
+    if (this.group != null) {
+      field.name = "group";
+      field.type = TType.STRING;
+      field.id = 9;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.group);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  public String toString() {
+    StringBuilder sb = new StringBuilder("FileStatus(");
+    sb.append("path:");
+    sb.append(this.path);
+    sb.append(",length:");
+    sb.append(this.length);
+    sb.append(",isdir:");
+    sb.append(this.isdir);
+    sb.append(",block_replication:");
+    sb.append(this.block_replication);
+    sb.append(",blocksize:");
+    sb.append(this.blocksize);
+    sb.append(",modification_time:");
+    sb.append(this.modification_time);
+    sb.append(",permission:");
+    sb.append(this.permission);
+    sb.append(",owner:");
+    sb.append(this.owner);
+    sb.append(",group:");
+    sb.append(this.group);
+    sb.append(")");
+    return sb.toString();
+  }
+
+}
+

+ 119 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/MalformedInputException.java

@@ -0,0 +1,119 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class MalformedInputException extends Exception implements TBase, java.io.Serializable {
+  public String message;
+
+  public final Isset __isset = new Isset();
+  public static final class Isset implements java.io.Serializable {
+    public boolean message = false;
+  }
+
+  public MalformedInputException() {
+  }
+
+  public MalformedInputException(
+    String message)
+  {
+    this();
+    this.message = message;
+    this.__isset.message = true;
+  }
+
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof MalformedInputException)
+      return this.equals((MalformedInputException)that);
+    return false;
+  }
+
+  public boolean equals(MalformedInputException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_message = true && (this.message != null);
+    boolean that_present_message = true && (that.message != null);
+    if (this_present_message || that_present_message) {
+      if (!(this_present_message && that_present_message))
+        return false;
+      if (!this.message.equals(that.message))
+        return false;
+    }
+
+    return true;
+  }
+
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case -1:
+          if (field.type == TType.STRING) {
+            this.message = iprot.readString();
+            this.__isset.message = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    TStruct struct = new TStruct("MalformedInputException");
+    oprot.writeStructBegin(struct);
+    TField field = new TField();
+    if (this.message != null) {
+      field.name = "message";
+      field.type = TType.STRING;
+      field.id = -1;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.message);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  public String toString() {
+    StringBuilder sb = new StringBuilder("MalformedInputException(");
+    sb.append("message:");
+    sb.append(this.message);
+    sb.append(")");
+    return sb.toString();
+  }
+
+}
+

+ 119 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/Pathname.java

@@ -0,0 +1,119 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class Pathname implements TBase, java.io.Serializable {
+  public String pathname;
+
+  public final Isset __isset = new Isset();
+  public static final class Isset implements java.io.Serializable {
+    public boolean pathname = false;
+  }
+
+  public Pathname() {
+  }
+
+  public Pathname(
+    String pathname)
+  {
+    this();
+    this.pathname = pathname;
+    this.__isset.pathname = true;
+  }
+
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Pathname)
+      return this.equals((Pathname)that);
+    return false;
+  }
+
+  public boolean equals(Pathname that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_pathname = true && (this.pathname != null);
+    boolean that_present_pathname = true && (that.pathname != null);
+    if (this_present_pathname || that_present_pathname) {
+      if (!(this_present_pathname && that_present_pathname))
+        return false;
+      if (!this.pathname.equals(that.pathname))
+        return false;
+    }
+
+    return true;
+  }
+
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case -1:
+          if (field.type == TType.STRING) {
+            this.pathname = iprot.readString();
+            this.__isset.pathname = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    TStruct struct = new TStruct("Pathname");
+    oprot.writeStructBegin(struct);
+    TField field = new TField();
+    if (this.pathname != null) {
+      field.name = "pathname";
+      field.type = TType.STRING;
+      field.id = -1;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.pathname);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Pathname(");
+    sb.append("pathname:");
+    sb.append(this.pathname);
+    sb.append(")");
+    return sb.toString();
+  }
+
+}
+

+ 6038 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/ThriftHadoopFileSystem.java

@@ -0,0 +1,6038 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class ThriftHadoopFileSystem {
+
+  public interface Iface {
+
+    public void setInactivityTimeoutPeriod(long periodInSeconds) throws TException;
+
+    public void shutdown(int status) throws TException;
+
+    public ThriftHandle create(Pathname path) throws ThriftIOException, TException;
+
+    public ThriftHandle createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize) throws ThriftIOException, TException;
+
+    public ThriftHandle open(Pathname path) throws ThriftIOException, TException;
+
+    public ThriftHandle append(Pathname path) throws ThriftIOException, TException;
+
+    public boolean write(ThriftHandle handle, String data) throws ThriftIOException, TException;
+
+    public String read(ThriftHandle handle, long offset, int size) throws ThriftIOException, TException;
+
+    public boolean close(ThriftHandle out) throws ThriftIOException, TException;
+
+    public boolean rm(Pathname path, boolean recursive) throws ThriftIOException, TException;
+
+    public boolean rename(Pathname path, Pathname dest) throws ThriftIOException, TException;
+
+    public boolean mkdirs(Pathname path) throws ThriftIOException, TException;
+
+    public boolean exists(Pathname path) throws ThriftIOException, TException;
+
+    public FileStatus stat(Pathname path) throws ThriftIOException, TException;
+
+    public List<FileStatus> listStatus(Pathname path) throws ThriftIOException, TException;
+
+    public void chmod(Pathname path, short mode) throws ThriftIOException, TException;
+
+    public void chown(Pathname path, String owner, String group) throws ThriftIOException, TException;
+
+    public void setReplication(Pathname path, short replication) throws ThriftIOException, TException;
+
+    public List<BlockLocation> getFileBlockLocations(Pathname path, long start, long length) throws ThriftIOException, TException;
+
+  }
+
+  public static class Client implements Iface {
+    public Client(TProtocol prot)
+    {
+      this(prot, prot);
+    }
+
+    public Client(TProtocol iprot, TProtocol oprot)
+    {
+      iprot_ = iprot;
+      oprot_ = oprot;
+    }
+
+    protected TProtocol iprot_;
+    protected TProtocol oprot_;
+
+    protected int seqid_;
+
+    public TProtocol getInputProtocol()
+    {
+      return this.iprot_;
+    }
+
+    public TProtocol getOutputProtocol()
+    {
+      return this.oprot_;
+    }
+
+    public void setInactivityTimeoutPeriod(long periodInSeconds) throws TException
+    {
+      send_setInactivityTimeoutPeriod(periodInSeconds);
+      recv_setInactivityTimeoutPeriod();
+    }
+
+    public void send_setInactivityTimeoutPeriod(long periodInSeconds) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("setInactivityTimeoutPeriod", TMessageType.CALL, seqid_));
+      setInactivityTimeoutPeriod_args args = new setInactivityTimeoutPeriod_args();
+      args.periodInSeconds = periodInSeconds;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public void recv_setInactivityTimeoutPeriod() throws TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      setInactivityTimeoutPeriod_result result = new setInactivityTimeoutPeriod_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      return;
+    }
+
+    public void shutdown(int status) throws TException
+    {
+      send_shutdown(status);
+      recv_shutdown();
+    }
+
+    public void send_shutdown(int status) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("shutdown", TMessageType.CALL, seqid_));
+      shutdown_args args = new shutdown_args();
+      args.status = status;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public void recv_shutdown() throws TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      shutdown_result result = new shutdown_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      return;
+    }
+
+    public ThriftHandle create(Pathname path) throws ThriftIOException, TException
+    {
+      send_create(path);
+      return recv_create();
+    }
+
+    public void send_create(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("create", TMessageType.CALL, seqid_));
+      create_args args = new create_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public ThriftHandle recv_create() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      create_result result = new create_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "create failed: unknown result");
+    }
+
+    public ThriftHandle createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize) throws ThriftIOException, TException
+    {
+      send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize);
+      return recv_createFile();
+    }
+
+    public void send_createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("createFile", TMessageType.CALL, seqid_));
+      createFile_args args = new createFile_args();
+      args.path = path;
+      args.mode = mode;
+      args.overwrite = overwrite;
+      args.bufferSize = bufferSize;
+      args.block_replication = block_replication;
+      args.blocksize = blocksize;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public ThriftHandle recv_createFile() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      createFile_result result = new createFile_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createFile failed: unknown result");
+    }
+
+    public ThriftHandle open(Pathname path) throws ThriftIOException, TException
+    {
+      send_open(path);
+      return recv_open();
+    }
+
+    public void send_open(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("open", TMessageType.CALL, seqid_));
+      open_args args = new open_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public ThriftHandle recv_open() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      open_result result = new open_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "open failed: unknown result");
+    }
+
+    public ThriftHandle append(Pathname path) throws ThriftIOException, TException
+    {
+      send_append(path);
+      return recv_append();
+    }
+
+    public void send_append(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("append", TMessageType.CALL, seqid_));
+      append_args args = new append_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public ThriftHandle recv_append() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      append_result result = new append_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "append failed: unknown result");
+    }
+
+    public boolean write(ThriftHandle handle, String data) throws ThriftIOException, TException
+    {
+      send_write(handle, data);
+      return recv_write();
+    }
+
+    public void send_write(ThriftHandle handle, String data) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("write", TMessageType.CALL, seqid_));
+      write_args args = new write_args();
+      args.handle = handle;
+      args.data = data;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_write() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      write_result result = new write_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "write failed: unknown result");
+    }
+
+    public String read(ThriftHandle handle, long offset, int size) throws ThriftIOException, TException
+    {
+      send_read(handle, offset, size);
+      return recv_read();
+    }
+
+    public void send_read(ThriftHandle handle, long offset, int size) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("read", TMessageType.CALL, seqid_));
+      read_args args = new read_args();
+      args.handle = handle;
+      args.offset = offset;
+      args.size = size;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public String recv_read() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      read_result result = new read_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "read failed: unknown result");
+    }
+
+    public boolean close(ThriftHandle out) throws ThriftIOException, TException
+    {
+      send_close(out);
+      return recv_close();
+    }
+
+    public void send_close(ThriftHandle out) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("close", TMessageType.CALL, seqid_));
+      close_args args = new close_args();
+      args.out = out;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_close() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      close_result result = new close_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "close failed: unknown result");
+    }
+
+    public boolean rm(Pathname path, boolean recursive) throws ThriftIOException, TException
+    {
+      send_rm(path, recursive);
+      return recv_rm();
+    }
+
+    public void send_rm(Pathname path, boolean recursive) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("rm", TMessageType.CALL, seqid_));
+      rm_args args = new rm_args();
+      args.path = path;
+      args.recursive = recursive;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_rm() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      rm_result result = new rm_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "rm failed: unknown result");
+    }
+
+    public boolean rename(Pathname path, Pathname dest) throws ThriftIOException, TException
+    {
+      send_rename(path, dest);
+      return recv_rename();
+    }
+
+    public void send_rename(Pathname path, Pathname dest) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("rename", TMessageType.CALL, seqid_));
+      rename_args args = new rename_args();
+      args.path = path;
+      args.dest = dest;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_rename() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      rename_result result = new rename_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "rename failed: unknown result");
+    }
+
+    public boolean mkdirs(Pathname path) throws ThriftIOException, TException
+    {
+      send_mkdirs(path);
+      return recv_mkdirs();
+    }
+
+    public void send_mkdirs(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("mkdirs", TMessageType.CALL, seqid_));
+      mkdirs_args args = new mkdirs_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_mkdirs() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      mkdirs_result result = new mkdirs_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "mkdirs failed: unknown result");
+    }
+
+    public boolean exists(Pathname path) throws ThriftIOException, TException
+    {
+      send_exists(path);
+      return recv_exists();
+    }
+
+    public void send_exists(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("exists", TMessageType.CALL, seqid_));
+      exists_args args = new exists_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_exists() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      exists_result result = new exists_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "exists failed: unknown result");
+    }
+
+    public FileStatus stat(Pathname path) throws ThriftIOException, TException
+    {
+      send_stat(path);
+      return recv_stat();
+    }
+
+    public void send_stat(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("stat", TMessageType.CALL, seqid_));
+      stat_args args = new stat_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public FileStatus recv_stat() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      stat_result result = new stat_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "stat failed: unknown result");
+    }
+
+    public List<FileStatus> listStatus(Pathname path) throws ThriftIOException, TException
+    {
+      send_listStatus(path);
+      return recv_listStatus();
+    }
+
+    public void send_listStatus(Pathname path) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("listStatus", TMessageType.CALL, seqid_));
+      listStatus_args args = new listStatus_args();
+      args.path = path;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public List<FileStatus> recv_listStatus() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      listStatus_result result = new listStatus_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listStatus failed: unknown result");
+    }
+
+    public void chmod(Pathname path, short mode) throws ThriftIOException, TException
+    {
+      send_chmod(path, mode);
+      recv_chmod();
+    }
+
+    public void send_chmod(Pathname path, short mode) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("chmod", TMessageType.CALL, seqid_));
+      chmod_args args = new chmod_args();
+      args.path = path;
+      args.mode = mode;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public void recv_chmod() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      chmod_result result = new chmod_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      return;
+    }
+
+    public void chown(Pathname path, String owner, String group) throws ThriftIOException, TException
+    {
+      send_chown(path, owner, group);
+      recv_chown();
+    }
+
+    public void send_chown(Pathname path, String owner, String group) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("chown", TMessageType.CALL, seqid_));
+      chown_args args = new chown_args();
+      args.path = path;
+      args.owner = owner;
+      args.group = group;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public void recv_chown() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      chown_result result = new chown_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      return;
+    }
+
+    public void setReplication(Pathname path, short replication) throws ThriftIOException, TException
+    {
+      send_setReplication(path, replication);
+      recv_setReplication();
+    }
+
+    public void send_setReplication(Pathname path, short replication) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("setReplication", TMessageType.CALL, seqid_));
+      setReplication_args args = new setReplication_args();
+      args.path = path;
+      args.replication = replication;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public void recv_setReplication() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      setReplication_result result = new setReplication_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      return;
+    }
+
+    public List<BlockLocation> getFileBlockLocations(Pathname path, long start, long length) throws ThriftIOException, TException
+    {
+      send_getFileBlockLocations(path, start, length);
+      return recv_getFileBlockLocations();
+    }
+
+    public void send_getFileBlockLocations(Pathname path, long start, long length) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("getFileBlockLocations", TMessageType.CALL, seqid_));
+      getFileBlockLocations_args args = new getFileBlockLocations_args();
+      args.path = path;
+      args.start = start;
+      args.length = length;
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public List<BlockLocation> recv_getFileBlockLocations() throws ThriftIOException, TException
+    {
+      TMessage msg = iprot_.readMessageBegin();
+      if (msg.type == TMessageType.EXCEPTION) {
+        TApplicationException x = TApplicationException.read(iprot_);
+        iprot_.readMessageEnd();
+        throw x;
+      }
+      getFileBlockLocations_result result = new getFileBlockLocations_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.__isset.success) {
+        return result.success;
+      }
+      if (result.__isset.ouch) {
+        throw result.ouch;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getFileBlockLocations failed: unknown result");
+    }
+
+  }
+  public static class Processor implements TProcessor {
+    public Processor(Iface iface)
+    {
+      iface_ = iface;
+      processMap_.put("setInactivityTimeoutPeriod", new setInactivityTimeoutPeriod());
+      processMap_.put("shutdown", new shutdown());
+      processMap_.put("create", new create());
+      processMap_.put("createFile", new createFile());
+      processMap_.put("open", new open());
+      processMap_.put("append", new append());
+      processMap_.put("write", new write());
+      processMap_.put("read", new read());
+      processMap_.put("close", new close());
+      processMap_.put("rm", new rm());
+      processMap_.put("rename", new rename());
+      processMap_.put("mkdirs", new mkdirs());
+      processMap_.put("exists", new exists());
+      processMap_.put("stat", new stat());
+      processMap_.put("listStatus", new listStatus());
+      processMap_.put("chmod", new chmod());
+      processMap_.put("chown", new chown());
+      processMap_.put("setReplication", new setReplication());
+      processMap_.put("getFileBlockLocations", new getFileBlockLocations());
+    }
+
+    protected static interface ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
+    }
+
+    private Iface iface_;
+    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
+
+    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
+    {
+      TMessage msg = iprot.readMessageBegin();
+      ProcessFunction fn = processMap_.get(msg.name);
+      if (fn == null) {
+        TProtocolUtil.skip(iprot, TType.STRUCT);
+        iprot.readMessageEnd();
+        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
+        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
+        x.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+        return true;
+      }
+      fn.process(msg.seqid, iprot, oprot);
+      return true;
+    }
+
+    private class setInactivityTimeoutPeriod implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        setInactivityTimeoutPeriod_args args = new setInactivityTimeoutPeriod_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        setInactivityTimeoutPeriod_result result = new setInactivityTimeoutPeriod_result();
+        iface_.setInactivityTimeoutPeriod(args.periodInSeconds);
+        oprot.writeMessageBegin(new TMessage("setInactivityTimeoutPeriod", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class shutdown implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        shutdown_args args = new shutdown_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        shutdown_result result = new shutdown_result();
+        iface_.shutdown(args.status);
+        oprot.writeMessageBegin(new TMessage("shutdown", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class create implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        create_args args = new create_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        create_result result = new create_result();
+        try {
+          result.success = iface_.create(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("create", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class createFile implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        createFile_args args = new createFile_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        createFile_result result = new createFile_result();
+        try {
+          result.success = iface_.createFile(args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("createFile", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class open implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        open_args args = new open_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        open_result result = new open_result();
+        try {
+          result.success = iface_.open(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("open", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class append implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        append_args args = new append_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        append_result result = new append_result();
+        try {
+          result.success = iface_.append(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("append", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class write implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        write_args args = new write_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        write_result result = new write_result();
+        try {
+          result.success = iface_.write(args.handle, args.data);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("write", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class read implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        read_args args = new read_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        read_result result = new read_result();
+        try {
+          result.success = iface_.read(args.handle, args.offset, args.size);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("read", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class close implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        close_args args = new close_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        close_result result = new close_result();
+        try {
+          result.success = iface_.close(args.out);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("close", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class rm implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        rm_args args = new rm_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        rm_result result = new rm_result();
+        try {
+          result.success = iface_.rm(args.path, args.recursive);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("rm", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class rename implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        rename_args args = new rename_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        rename_result result = new rename_result();
+        try {
+          result.success = iface_.rename(args.path, args.dest);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("rename", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class mkdirs implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        mkdirs_args args = new mkdirs_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        mkdirs_result result = new mkdirs_result();
+        try {
+          result.success = iface_.mkdirs(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("mkdirs", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class exists implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        exists_args args = new exists_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        exists_result result = new exists_result();
+        try {
+          result.success = iface_.exists(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("exists", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class stat implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        stat_args args = new stat_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        stat_result result = new stat_result();
+        try {
+          result.success = iface_.stat(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("stat", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class listStatus implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        listStatus_args args = new listStatus_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        listStatus_result result = new listStatus_result();
+        try {
+          result.success = iface_.listStatus(args.path);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("listStatus", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class chmod implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        chmod_args args = new chmod_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        chmod_result result = new chmod_result();
+        try {
+          iface_.chmod(args.path, args.mode);
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("chmod", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class chown implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        chown_args args = new chown_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        chown_result result = new chown_result();
+        try {
+          iface_.chown(args.path, args.owner, args.group);
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("chown", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class setReplication implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        setReplication_args args = new setReplication_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        setReplication_result result = new setReplication_result();
+        try {
+          iface_.setReplication(args.path, args.replication);
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("setReplication", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class getFileBlockLocations implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        getFileBlockLocations_args args = new getFileBlockLocations_args();
+        args.read(iprot);
+        iprot.readMessageEnd();
+        getFileBlockLocations_result result = new getFileBlockLocations_result();
+        try {
+          result.success = iface_.getFileBlockLocations(args.path, args.start, args.length);
+          result.__isset.success = true;
+        } catch (ThriftIOException ouch) {
+          result.ouch = ouch;
+          result.__isset.ouch = true;
+        }
+        oprot.writeMessageBegin(new TMessage("getFileBlockLocations", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+  }
+
+  public static class setInactivityTimeoutPeriod_args implements TBase, java.io.Serializable   {
+    public long periodInSeconds;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean periodInSeconds = false;
+    }
+
+    public setInactivityTimeoutPeriod_args() {
+    }
+
+    public setInactivityTimeoutPeriod_args(
+      long periodInSeconds)
+    {
+      this();
+      this.periodInSeconds = periodInSeconds;
+      this.__isset.periodInSeconds = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setInactivityTimeoutPeriod_args)
+        return this.equals((setInactivityTimeoutPeriod_args)that);
+      return false;
+    }
+
+    public boolean equals(setInactivityTimeoutPeriod_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_periodInSeconds = true;
+      boolean that_present_periodInSeconds = true;
+      if (this_present_periodInSeconds || that_present_periodInSeconds) {
+        if (!(this_present_periodInSeconds && that_present_periodInSeconds))
+          return false;
+        if (this.periodInSeconds != that.periodInSeconds)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.I64) {
+              this.periodInSeconds = iprot.readI64();
+              this.__isset.periodInSeconds = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("setInactivityTimeoutPeriod_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      field.name = "periodInSeconds";
+      field.type = TType.I64;
+      field.id = 1;
+      oprot.writeFieldBegin(field);
+      oprot.writeI64(this.periodInSeconds);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setInactivityTimeoutPeriod_args(");
+      sb.append("periodInSeconds:");
+      sb.append(this.periodInSeconds);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class setInactivityTimeoutPeriod_result implements TBase, java.io.Serializable   {
+    public setInactivityTimeoutPeriod_result() {
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setInactivityTimeoutPeriod_result)
+        return this.equals((setInactivityTimeoutPeriod_result)that);
+      return false;
+    }
+
+    public boolean equals(setInactivityTimeoutPeriod_result that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("setInactivityTimeoutPeriod_result");
+      oprot.writeStructBegin(struct);
+
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setInactivityTimeoutPeriod_result(");
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class shutdown_args implements TBase, java.io.Serializable   {
+    public int status;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean status = false;
+    }
+
+    public shutdown_args() {
+    }
+
+    public shutdown_args(
+      int status)
+    {
+      this();
+      this.status = status;
+      this.__isset.status = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof shutdown_args)
+        return this.equals((shutdown_args)that);
+      return false;
+    }
+
+    public boolean equals(shutdown_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_status = true;
+      boolean that_present_status = true;
+      if (this_present_status || that_present_status) {
+        if (!(this_present_status && that_present_status))
+          return false;
+        if (this.status != that.status)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.I32) {
+              this.status = iprot.readI32();
+              this.__isset.status = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("shutdown_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      field.name = "status";
+      field.type = TType.I32;
+      field.id = 1;
+      oprot.writeFieldBegin(field);
+      oprot.writeI32(this.status);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("shutdown_args(");
+      sb.append("status:");
+      sb.append(this.status);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class shutdown_result implements TBase, java.io.Serializable   {
+    public shutdown_result() {
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof shutdown_result)
+        return this.equals((shutdown_result)that);
+      return false;
+    }
+
+    public boolean equals(shutdown_result that) {
+      if (that == null)
+        return false;
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("shutdown_result");
+      oprot.writeStructBegin(struct);
+
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("shutdown_result(");
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class create_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public create_args() {
+    }
+
+    public create_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof create_args)
+        return this.equals((create_args)that);
+      return false;
+    }
+
+    public boolean equals(create_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("create_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("create_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class create_result implements TBase, java.io.Serializable   {
+    public ThriftHandle success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public create_result() {
+    }
+
+    public create_result(
+      ThriftHandle success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof create_result)
+        return this.equals((create_result)that);
+      return false;
+    }
+
+    public boolean equals(create_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.STRUCT) {
+              this.success = new ThriftHandle();
+              this.success.read(iprot);
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("create_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.STRUCT;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          this.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("create_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class createFile_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public short mode;
+    public boolean overwrite;
+    public int bufferSize;
+    public short block_replication;
+    public long blocksize;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean mode = false;
+      public boolean overwrite = false;
+      public boolean bufferSize = false;
+      public boolean block_replication = false;
+      public boolean blocksize = false;
+    }
+
+    public createFile_args() {
+    }
+
+    public createFile_args(
+      Pathname path,
+      short mode,
+      boolean overwrite,
+      int bufferSize,
+      short block_replication,
+      long blocksize)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.mode = mode;
+      this.__isset.mode = true;
+      this.overwrite = overwrite;
+      this.__isset.overwrite = true;
+      this.bufferSize = bufferSize;
+      this.__isset.bufferSize = true;
+      this.block_replication = block_replication;
+      this.__isset.block_replication = true;
+      this.blocksize = blocksize;
+      this.__isset.blocksize = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof createFile_args)
+        return this.equals((createFile_args)that);
+      return false;
+    }
+
+    public boolean equals(createFile_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_mode = true;
+      boolean that_present_mode = true;
+      if (this_present_mode || that_present_mode) {
+        if (!(this_present_mode && that_present_mode))
+          return false;
+        if (this.mode != that.mode)
+          return false;
+      }
+
+      boolean this_present_overwrite = true;
+      boolean that_present_overwrite = true;
+      if (this_present_overwrite || that_present_overwrite) {
+        if (!(this_present_overwrite && that_present_overwrite))
+          return false;
+        if (this.overwrite != that.overwrite)
+          return false;
+      }
+
+      boolean this_present_bufferSize = true;
+      boolean that_present_bufferSize = true;
+      if (this_present_bufferSize || that_present_bufferSize) {
+        if (!(this_present_bufferSize && that_present_bufferSize))
+          return false;
+        if (this.bufferSize != that.bufferSize)
+          return false;
+      }
+
+      boolean this_present_block_replication = true;
+      boolean that_present_block_replication = true;
+      if (this_present_block_replication || that_present_block_replication) {
+        if (!(this_present_block_replication && that_present_block_replication))
+          return false;
+        if (this.block_replication != that.block_replication)
+          return false;
+      }
+
+      boolean this_present_blocksize = true;
+      boolean that_present_blocksize = true;
+      if (this_present_blocksize || that_present_blocksize) {
+        if (!(this_present_blocksize && that_present_blocksize))
+          return false;
+        if (this.blocksize != that.blocksize)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.I16) {
+              this.mode = iprot.readI16();
+              this.__isset.mode = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 3:
+            if (field.type == TType.BOOL) {
+              this.overwrite = iprot.readBool();
+              this.__isset.overwrite = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 4:
+            if (field.type == TType.I32) {
+              this.bufferSize = iprot.readI32();
+              this.__isset.bufferSize = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 5:
+            if (field.type == TType.I16) {
+              this.block_replication = iprot.readI16();
+              this.__isset.block_replication = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 6:
+            if (field.type == TType.I64) {
+              this.blocksize = iprot.readI64();
+              this.__isset.blocksize = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("createFile_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      field.name = "mode";
+      field.type = TType.I16;
+      field.id = 2;
+      oprot.writeFieldBegin(field);
+      oprot.writeI16(this.mode);
+      oprot.writeFieldEnd();
+      field.name = "overwrite";
+      field.type = TType.BOOL;
+      field.id = 3;
+      oprot.writeFieldBegin(field);
+      oprot.writeBool(this.overwrite);
+      oprot.writeFieldEnd();
+      field.name = "bufferSize";
+      field.type = TType.I32;
+      field.id = 4;
+      oprot.writeFieldBegin(field);
+      oprot.writeI32(this.bufferSize);
+      oprot.writeFieldEnd();
+      field.name = "block_replication";
+      field.type = TType.I16;
+      field.id = 5;
+      oprot.writeFieldBegin(field);
+      oprot.writeI16(this.block_replication);
+      oprot.writeFieldEnd();
+      field.name = "blocksize";
+      field.type = TType.I64;
+      field.id = 6;
+      oprot.writeFieldBegin(field);
+      oprot.writeI64(this.blocksize);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("createFile_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",mode:");
+      sb.append(this.mode);
+      sb.append(",overwrite:");
+      sb.append(this.overwrite);
+      sb.append(",bufferSize:");
+      sb.append(this.bufferSize);
+      sb.append(",block_replication:");
+      sb.append(this.block_replication);
+      sb.append(",blocksize:");
+      sb.append(this.blocksize);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class createFile_result implements TBase, java.io.Serializable   {
+    public ThriftHandle success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public createFile_result() {
+    }
+
+    public createFile_result(
+      ThriftHandle success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof createFile_result)
+        return this.equals((createFile_result)that);
+      return false;
+    }
+
+    public boolean equals(createFile_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.STRUCT) {
+              this.success = new ThriftHandle();
+              this.success.read(iprot);
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("createFile_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.STRUCT;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          this.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("createFile_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class open_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public open_args() {
+    }
+
+    public open_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof open_args)
+        return this.equals((open_args)that);
+      return false;
+    }
+
+    public boolean equals(open_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("open_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("open_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class open_result implements TBase, java.io.Serializable   {
+    public ThriftHandle success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public open_result() {
+    }
+
+    public open_result(
+      ThriftHandle success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof open_result)
+        return this.equals((open_result)that);
+      return false;
+    }
+
+    public boolean equals(open_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.STRUCT) {
+              this.success = new ThriftHandle();
+              this.success.read(iprot);
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("open_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.STRUCT;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          this.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("open_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class append_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public append_args() {
+    }
+
+    public append_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof append_args)
+        return this.equals((append_args)that);
+      return false;
+    }
+
+    public boolean equals(append_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("append_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("append_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class append_result implements TBase, java.io.Serializable   {
+    public ThriftHandle success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public append_result() {
+    }
+
+    public append_result(
+      ThriftHandle success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof append_result)
+        return this.equals((append_result)that);
+      return false;
+    }
+
+    public boolean equals(append_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.STRUCT) {
+              this.success = new ThriftHandle();
+              this.success.read(iprot);
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("append_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.STRUCT;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          this.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("append_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class write_args implements TBase, java.io.Serializable   {
+    public ThriftHandle handle;
+    public String data;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean handle = false;
+      public boolean data = false;
+    }
+
+    public write_args() {
+    }
+
+    public write_args(
+      ThriftHandle handle,
+      String data)
+    {
+      this();
+      this.handle = handle;
+      this.__isset.handle = true;
+      this.data = data;
+      this.__isset.data = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof write_args)
+        return this.equals((write_args)that);
+      return false;
+    }
+
+    public boolean equals(write_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_handle = true && (this.handle != null);
+      boolean that_present_handle = true && (that.handle != null);
+      if (this_present_handle || that_present_handle) {
+        if (!(this_present_handle && that_present_handle))
+          return false;
+        if (!this.handle.equals(that.handle))
+          return false;
+      }
+
+      boolean this_present_data = true && (this.data != null);
+      boolean that_present_data = true && (that.data != null);
+      if (this_present_data || that_present_data) {
+        if (!(this_present_data && that_present_data))
+          return false;
+        if (!this.data.equals(that.data))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.handle = new ThriftHandle();
+              this.handle.read(iprot);
+              this.__isset.handle = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case -1:
+            if (field.type == TType.STRING) {
+              this.data = iprot.readString();
+              this.__isset.data = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("write_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.handle != null) {
+        field.name = "handle";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.handle.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (this.data != null) {
+        field.name = "data";
+        field.type = TType.STRING;
+        field.id = -1;
+        oprot.writeFieldBegin(field);
+        oprot.writeString(this.data);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("write_args(");
+      sb.append("handle:");
+      sb.append(this.handle);
+      sb.append(",data:");
+      sb.append(this.data);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class write_result implements TBase, java.io.Serializable   {
+    public boolean success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public write_result() {
+    }
+
+    public write_result(
+      boolean success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof write_result)
+        return this.equals((write_result)that);
+      return false;
+    }
+
+    public boolean equals(write_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.BOOL) {
+              this.success = iprot.readBool();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("write_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        field.name = "success";
+        field.type = TType.BOOL;
+        field.id = 0;
+        oprot.writeFieldBegin(field);
+        oprot.writeBool(this.success);
+        oprot.writeFieldEnd();
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("write_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class read_args implements TBase, java.io.Serializable   {
+    public ThriftHandle handle;
+    public long offset;
+    public int size;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean handle = false;
+      public boolean offset = false;
+      public boolean size = false;
+    }
+
+    public read_args() {
+    }
+
+    public read_args(
+      ThriftHandle handle,
+      long offset,
+      int size)
+    {
+      this();
+      this.handle = handle;
+      this.__isset.handle = true;
+      this.offset = offset;
+      this.__isset.offset = true;
+      this.size = size;
+      this.__isset.size = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof read_args)
+        return this.equals((read_args)that);
+      return false;
+    }
+
+    public boolean equals(read_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_handle = true && (this.handle != null);
+      boolean that_present_handle = true && (that.handle != null);
+      if (this_present_handle || that_present_handle) {
+        if (!(this_present_handle && that_present_handle))
+          return false;
+        if (!this.handle.equals(that.handle))
+          return false;
+      }
+
+      boolean this_present_offset = true;
+      boolean that_present_offset = true;
+      if (this_present_offset || that_present_offset) {
+        if (!(this_present_offset && that_present_offset))
+          return false;
+        if (this.offset != that.offset)
+          return false;
+      }
+
+      boolean this_present_size = true;
+      boolean that_present_size = true;
+      if (this_present_size || that_present_size) {
+        if (!(this_present_size && that_present_size))
+          return false;
+        if (this.size != that.size)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.handle = new ThriftHandle();
+              this.handle.read(iprot);
+              this.__isset.handle = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case -1:
+            if (field.type == TType.I64) {
+              this.offset = iprot.readI64();
+              this.__isset.offset = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case -2:
+            if (field.type == TType.I32) {
+              this.size = iprot.readI32();
+              this.__isset.size = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("read_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.handle != null) {
+        field.name = "handle";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.handle.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      field.name = "offset";
+      field.type = TType.I64;
+      field.id = -1;
+      oprot.writeFieldBegin(field);
+      oprot.writeI64(this.offset);
+      oprot.writeFieldEnd();
+      field.name = "size";
+      field.type = TType.I32;
+      field.id = -2;
+      oprot.writeFieldBegin(field);
+      oprot.writeI32(this.size);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("read_args(");
+      sb.append("handle:");
+      sb.append(this.handle);
+      sb.append(",offset:");
+      sb.append(this.offset);
+      sb.append(",size:");
+      sb.append(this.size);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class read_result implements TBase, java.io.Serializable   {
+    public String success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public read_result() {
+    }
+
+    public read_result(
+      String success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof read_result)
+        return this.equals((read_result)that);
+      return false;
+    }
+
+    public boolean equals(read_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.STRING) {
+              this.success = iprot.readString();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("read_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.STRING;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          oprot.writeString(this.success);
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("read_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class close_args implements TBase, java.io.Serializable   {
+    public ThriftHandle out;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean out = false;
+    }
+
+    public close_args() {
+    }
+
+    public close_args(
+      ThriftHandle out)
+    {
+      this();
+      this.out = out;
+      this.__isset.out = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof close_args)
+        return this.equals((close_args)that);
+      return false;
+    }
+
+    public boolean equals(close_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_out = true && (this.out != null);
+      boolean that_present_out = true && (that.out != null);
+      if (this_present_out || that_present_out) {
+        if (!(this_present_out && that_present_out))
+          return false;
+        if (!this.out.equals(that.out))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.out = new ThriftHandle();
+              this.out.read(iprot);
+              this.__isset.out = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("close_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.out != null) {
+        field.name = "out";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.out.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("close_args(");
+      sb.append("out:");
+      sb.append(this.out);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class close_result implements TBase, java.io.Serializable   {
+    public boolean success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public close_result() {
+    }
+
+    public close_result(
+      boolean success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof close_result)
+        return this.equals((close_result)that);
+      return false;
+    }
+
+    public boolean equals(close_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.BOOL) {
+              this.success = iprot.readBool();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("close_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        field.name = "success";
+        field.type = TType.BOOL;
+        field.id = 0;
+        oprot.writeFieldBegin(field);
+        oprot.writeBool(this.success);
+        oprot.writeFieldEnd();
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("close_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class rm_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public boolean recursive;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean recursive = false;
+    }
+
+    public rm_args() {
+    }
+
+    public rm_args(
+      Pathname path,
+      boolean recursive)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.recursive = recursive;
+      this.__isset.recursive = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof rm_args)
+        return this.equals((rm_args)that);
+      return false;
+    }
+
+    public boolean equals(rm_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_recursive = true;
+      boolean that_present_recursive = true;
+      if (this_present_recursive || that_present_recursive) {
+        if (!(this_present_recursive && that_present_recursive))
+          return false;
+        if (this.recursive != that.recursive)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.BOOL) {
+              this.recursive = iprot.readBool();
+              this.__isset.recursive = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("rm_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      field.name = "recursive";
+      field.type = TType.BOOL;
+      field.id = 2;
+      oprot.writeFieldBegin(field);
+      oprot.writeBool(this.recursive);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("rm_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",recursive:");
+      sb.append(this.recursive);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class rm_result implements TBase, java.io.Serializable   {
+    public boolean success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public rm_result() {
+    }
+
+    public rm_result(
+      boolean success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof rm_result)
+        return this.equals((rm_result)that);
+      return false;
+    }
+
+    public boolean equals(rm_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.BOOL) {
+              this.success = iprot.readBool();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("rm_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        field.name = "success";
+        field.type = TType.BOOL;
+        field.id = 0;
+        oprot.writeFieldBegin(field);
+        oprot.writeBool(this.success);
+        oprot.writeFieldEnd();
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("rm_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class rename_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public Pathname dest;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean dest = false;
+    }
+
+    public rename_args() {
+    }
+
+    public rename_args(
+      Pathname path,
+      Pathname dest)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.dest = dest;
+      this.__isset.dest = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof rename_args)
+        return this.equals((rename_args)that);
+      return false;
+    }
+
+    public boolean equals(rename_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_dest = true && (this.dest != null);
+      boolean that_present_dest = true && (that.dest != null);
+      if (this_present_dest || that_present_dest) {
+        if (!(this_present_dest && that_present_dest))
+          return false;
+        if (!this.dest.equals(that.dest))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.STRUCT) {
+              this.dest = new Pathname();
+              this.dest.read(iprot);
+              this.__isset.dest = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("rename_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (this.dest != null) {
+        field.name = "dest";
+        field.type = TType.STRUCT;
+        field.id = 2;
+        oprot.writeFieldBegin(field);
+        this.dest.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("rename_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",dest:");
+      sb.append(this.dest);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class rename_result implements TBase, java.io.Serializable   {
+    public boolean success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public rename_result() {
+    }
+
+    public rename_result(
+      boolean success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof rename_result)
+        return this.equals((rename_result)that);
+      return false;
+    }
+
+    public boolean equals(rename_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.BOOL) {
+              this.success = iprot.readBool();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("rename_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        field.name = "success";
+        field.type = TType.BOOL;
+        field.id = 0;
+        oprot.writeFieldBegin(field);
+        oprot.writeBool(this.success);
+        oprot.writeFieldEnd();
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("rename_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class mkdirs_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public mkdirs_args() {
+    }
+
+    public mkdirs_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof mkdirs_args)
+        return this.equals((mkdirs_args)that);
+      return false;
+    }
+
+    public boolean equals(mkdirs_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("mkdirs_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("mkdirs_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class mkdirs_result implements TBase, java.io.Serializable   {
+    public boolean success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public mkdirs_result() {
+    }
+
+    public mkdirs_result(
+      boolean success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof mkdirs_result)
+        return this.equals((mkdirs_result)that);
+      return false;
+    }
+
+    public boolean equals(mkdirs_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.BOOL) {
+              this.success = iprot.readBool();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("mkdirs_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        field.name = "success";
+        field.type = TType.BOOL;
+        field.id = 0;
+        oprot.writeFieldBegin(field);
+        oprot.writeBool(this.success);
+        oprot.writeFieldEnd();
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("mkdirs_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class exists_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public exists_args() {
+    }
+
+    public exists_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof exists_args)
+        return this.equals((exists_args)that);
+      return false;
+    }
+
+    public boolean equals(exists_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("exists_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("exists_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class exists_result implements TBase, java.io.Serializable   {
+    public boolean success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public exists_result() {
+    }
+
+    public exists_result(
+      boolean success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof exists_result)
+        return this.equals((exists_result)that);
+      return false;
+    }
+
+    public boolean equals(exists_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true;
+      boolean that_present_success = true;
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (this.success != that.success)
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.BOOL) {
+              this.success = iprot.readBool();
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("exists_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        field.name = "success";
+        field.type = TType.BOOL;
+        field.id = 0;
+        oprot.writeFieldBegin(field);
+        oprot.writeBool(this.success);
+        oprot.writeFieldEnd();
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("exists_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class stat_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public stat_args() {
+    }
+
+    public stat_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof stat_args)
+        return this.equals((stat_args)that);
+      return false;
+    }
+
+    public boolean equals(stat_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("stat_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("stat_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class stat_result implements TBase, java.io.Serializable   {
+    public FileStatus success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public stat_result() {
+    }
+
+    public stat_result(
+      FileStatus success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof stat_result)
+        return this.equals((stat_result)that);
+      return false;
+    }
+
+    public boolean equals(stat_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.STRUCT) {
+              this.success = new FileStatus();
+              this.success.read(iprot);
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("stat_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.STRUCT;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          this.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("stat_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class listStatus_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+    }
+
+    public listStatus_args() {
+    }
+
+    public listStatus_args(
+      Pathname path)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof listStatus_args)
+        return this.equals((listStatus_args)that);
+      return false;
+    }
+
+    public boolean equals(listStatus_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("listStatus_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("listStatus_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class listStatus_result implements TBase, java.io.Serializable   {
+    public List<FileStatus> success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public listStatus_result() {
+    }
+
+    public listStatus_result(
+      List<FileStatus> success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof listStatus_result)
+        return this.equals((listStatus_result)that);
+      return false;
+    }
+
+    public boolean equals(listStatus_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.LIST) {
+              {
+                TList _list8 = iprot.readListBegin();
+                this.success = new ArrayList<FileStatus>(_list8.size);
+                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+                {
+                  FileStatus _elem10 = new FileStatus();
+                  _elem10 = new FileStatus();
+                  _elem10.read(iprot);
+                  this.success.add(_elem10);
+                }
+                iprot.readListEnd();
+              }
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("listStatus_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.LIST;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          {
+            oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
+            for (FileStatus _iter11 : this.success)            {
+              _iter11.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("listStatus_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class chmod_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public short mode;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean mode = false;
+    }
+
+    public chmod_args() {
+    }
+
+    public chmod_args(
+      Pathname path,
+      short mode)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.mode = mode;
+      this.__isset.mode = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof chmod_args)
+        return this.equals((chmod_args)that);
+      return false;
+    }
+
+    public boolean equals(chmod_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_mode = true;
+      boolean that_present_mode = true;
+      if (this_present_mode || that_present_mode) {
+        if (!(this_present_mode && that_present_mode))
+          return false;
+        if (this.mode != that.mode)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.I16) {
+              this.mode = iprot.readI16();
+              this.__isset.mode = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("chmod_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      field.name = "mode";
+      field.type = TType.I16;
+      field.id = 2;
+      oprot.writeFieldBegin(field);
+      oprot.writeI16(this.mode);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("chmod_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",mode:");
+      sb.append(this.mode);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class chmod_result implements TBase, java.io.Serializable   {
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean ouch = false;
+    }
+
+    public chmod_result() {
+    }
+
+    public chmod_result(
+      ThriftIOException ouch)
+    {
+      this();
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof chmod_result)
+        return this.equals((chmod_result)that);
+      return false;
+    }
+
+    public boolean equals(chmod_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("chmod_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("chmod_result(");
+      sb.append("ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class chown_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public String owner;
+    public String group;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean owner = false;
+      public boolean group = false;
+    }
+
+    public chown_args() {
+    }
+
+    public chown_args(
+      Pathname path,
+      String owner,
+      String group)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.owner = owner;
+      this.__isset.owner = true;
+      this.group = group;
+      this.__isset.group = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof chown_args)
+        return this.equals((chown_args)that);
+      return false;
+    }
+
+    public boolean equals(chown_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_owner = true && (this.owner != null);
+      boolean that_present_owner = true && (that.owner != null);
+      if (this_present_owner || that_present_owner) {
+        if (!(this_present_owner && that_present_owner))
+          return false;
+        if (!this.owner.equals(that.owner))
+          return false;
+      }
+
+      boolean this_present_group = true && (this.group != null);
+      boolean that_present_group = true && (that.group != null);
+      if (this_present_group || that_present_group) {
+        if (!(this_present_group && that_present_group))
+          return false;
+        if (!this.group.equals(that.group))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.STRING) {
+              this.owner = iprot.readString();
+              this.__isset.owner = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 3:
+            if (field.type == TType.STRING) {
+              this.group = iprot.readString();
+              this.__isset.group = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("chown_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (this.owner != null) {
+        field.name = "owner";
+        field.type = TType.STRING;
+        field.id = 2;
+        oprot.writeFieldBegin(field);
+        oprot.writeString(this.owner);
+        oprot.writeFieldEnd();
+      }
+      if (this.group != null) {
+        field.name = "group";
+        field.type = TType.STRING;
+        field.id = 3;
+        oprot.writeFieldBegin(field);
+        oprot.writeString(this.group);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("chown_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",owner:");
+      sb.append(this.owner);
+      sb.append(",group:");
+      sb.append(this.group);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class chown_result implements TBase, java.io.Serializable   {
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean ouch = false;
+    }
+
+    public chown_result() {
+    }
+
+    public chown_result(
+      ThriftIOException ouch)
+    {
+      this();
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof chown_result)
+        return this.equals((chown_result)that);
+      return false;
+    }
+
+    public boolean equals(chown_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("chown_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("chown_result(");
+      sb.append("ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class setReplication_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public short replication;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean replication = false;
+    }
+
+    public setReplication_args() {
+    }
+
+    public setReplication_args(
+      Pathname path,
+      short replication)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.replication = replication;
+      this.__isset.replication = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setReplication_args)
+        return this.equals((setReplication_args)that);
+      return false;
+    }
+
+    public boolean equals(setReplication_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_replication = true;
+      boolean that_present_replication = true;
+      if (this_present_replication || that_present_replication) {
+        if (!(this_present_replication && that_present_replication))
+          return false;
+        if (this.replication != that.replication)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.I16) {
+              this.replication = iprot.readI16();
+              this.__isset.replication = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("setReplication_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      field.name = "replication";
+      field.type = TType.I16;
+      field.id = 2;
+      oprot.writeFieldBegin(field);
+      oprot.writeI16(this.replication);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setReplication_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",replication:");
+      sb.append(this.replication);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class setReplication_result implements TBase, java.io.Serializable   {
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean ouch = false;
+    }
+
+    public setReplication_result() {
+    }
+
+    public setReplication_result(
+      ThriftIOException ouch)
+    {
+      this();
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setReplication_result)
+        return this.equals((setReplication_result)that);
+      return false;
+    }
+
+    public boolean equals(setReplication_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("setReplication_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setReplication_result(");
+      sb.append("ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class getFileBlockLocations_args implements TBase, java.io.Serializable   {
+    public Pathname path;
+    public long start;
+    public long length;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean path = false;
+      public boolean start = false;
+      public boolean length = false;
+    }
+
+    public getFileBlockLocations_args() {
+    }
+
+    public getFileBlockLocations_args(
+      Pathname path,
+      long start,
+      long length)
+    {
+      this();
+      this.path = path;
+      this.__isset.path = true;
+      this.start = start;
+      this.__isset.start = true;
+      this.length = length;
+      this.__isset.length = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getFileBlockLocations_args)
+        return this.equals((getFileBlockLocations_args)that);
+      return false;
+    }
+
+    public boolean equals(getFileBlockLocations_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_path = true && (this.path != null);
+      boolean that_present_path = true && (that.path != null);
+      if (this_present_path || that_present_path) {
+        if (!(this_present_path && that_present_path))
+          return false;
+        if (!this.path.equals(that.path))
+          return false;
+      }
+
+      boolean this_present_start = true;
+      boolean that_present_start = true;
+      if (this_present_start || that_present_start) {
+        if (!(this_present_start && that_present_start))
+          return false;
+        if (this.start != that.start)
+          return false;
+      }
+
+      boolean this_present_length = true;
+      boolean that_present_length = true;
+      if (this_present_length || that_present_length) {
+        if (!(this_present_length && that_present_length))
+          return false;
+        if (this.length != that.length)
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.path = new Pathname();
+              this.path.read(iprot);
+              this.__isset.path = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2:
+            if (field.type == TType.I64) {
+              this.start = iprot.readI64();
+              this.__isset.start = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 3:
+            if (field.type == TType.I64) {
+              this.length = iprot.readI64();
+              this.__isset.length = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("getFileBlockLocations_args");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+      if (this.path != null) {
+        field.name = "path";
+        field.type = TType.STRUCT;
+        field.id = 1;
+        oprot.writeFieldBegin(field);
+        this.path.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      field.name = "start";
+      field.type = TType.I64;
+      field.id = 2;
+      oprot.writeFieldBegin(field);
+      oprot.writeI64(this.start);
+      oprot.writeFieldEnd();
+      field.name = "length";
+      field.type = TType.I64;
+      field.id = 3;
+      oprot.writeFieldBegin(field);
+      oprot.writeI64(this.length);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getFileBlockLocations_args(");
+      sb.append("path:");
+      sb.append(this.path);
+      sb.append(",start:");
+      sb.append(this.start);
+      sb.append(",length:");
+      sb.append(this.length);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+  public static class getFileBlockLocations_result implements TBase, java.io.Serializable   {
+    public List<BlockLocation> success;
+    public ThriftIOException ouch;
+
+    public final Isset __isset = new Isset();
+    public static final class Isset implements java.io.Serializable {
+      public boolean success = false;
+      public boolean ouch = false;
+    }
+
+    public getFileBlockLocations_result() {
+    }
+
+    public getFileBlockLocations_result(
+      List<BlockLocation> success,
+      ThriftIOException ouch)
+    {
+      this();
+      this.success = success;
+      this.__isset.success = true;
+      this.ouch = ouch;
+      this.__isset.ouch = true;
+    }
+
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getFileBlockLocations_result)
+        return this.equals((getFileBlockLocations_result)that);
+      return false;
+    }
+
+    public boolean equals(getFileBlockLocations_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && (this.success != null);
+      boolean that_present_success = true && (that.success != null);
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_ouch = true && (this.ouch != null);
+      boolean that_present_ouch = true && (that.ouch != null);
+      if (this_present_ouch || that_present_ouch) {
+        if (!(this_present_ouch && that_present_ouch))
+          return false;
+        if (!this.ouch.equals(that.ouch))
+          return false;
+      }
+
+      return true;
+    }
+
+    public int hashCode() {
+      return 0;
+    }
+
+    public void read(TProtocol iprot) throws TException {
+      TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == TType.STOP) { 
+          break;
+        }
+        switch (field.id)
+        {
+          case 0:
+            if (field.type == TType.LIST) {
+              {
+                TList _list12 = iprot.readListBegin();
+                this.success = new ArrayList<BlockLocation>(_list12.size);
+                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
+                {
+                  BlockLocation _elem14 = new BlockLocation();
+                  _elem14 = new BlockLocation();
+                  _elem14.read(iprot);
+                  this.success.add(_elem14);
+                }
+                iprot.readListEnd();
+              }
+              this.__isset.success = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 1:
+            if (field.type == TType.STRUCT) {
+              this.ouch = new ThriftIOException();
+              this.ouch.read(iprot);
+              this.__isset.ouch = true;
+            } else { 
+              TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            TProtocolUtil.skip(iprot, field.type);
+            break;
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+    }
+
+    public void write(TProtocol oprot) throws TException {
+      TStruct struct = new TStruct("getFileBlockLocations_result");
+      oprot.writeStructBegin(struct);
+      TField field = new TField();
+
+      if (this.__isset.success) {
+        if (this.success != null) {
+          field.name = "success";
+          field.type = TType.LIST;
+          field.id = 0;
+          oprot.writeFieldBegin(field);
+          {
+            oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
+            for (BlockLocation _iter15 : this.success)            {
+              _iter15.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      } else if (this.__isset.ouch) {
+        if (this.ouch != null) {
+          field.name = "ouch";
+          field.type = TType.STRUCT;
+          field.id = 1;
+          oprot.writeFieldBegin(field);
+          this.ouch.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getFileBlockLocations_result(");
+      sb.append("success:");
+      sb.append(this.success);
+      sb.append(",ouch:");
+      sb.append(this.ouch);
+      sb.append(")");
+      return sb.toString();
+    }
+
+  }
+
+}

+ 117 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/ThriftHandle.java

@@ -0,0 +1,117 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class ThriftHandle implements TBase, java.io.Serializable {
+  public long id;
+
+  public final Isset __isset = new Isset();
+  public static final class Isset implements java.io.Serializable {
+    public boolean id = false;
+  }
+
+  public ThriftHandle() {
+  }
+
+  public ThriftHandle(
+    long id)
+  {
+    this();
+    this.id = id;
+    this.__isset.id = true;
+  }
+
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ThriftHandle)
+      return this.equals((ThriftHandle)that);
+    return false;
+  }
+
+  public boolean equals(ThriftHandle that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_id = true;
+    boolean that_present_id = true;
+    if (this_present_id || that_present_id) {
+      if (!(this_present_id && that_present_id))
+        return false;
+      if (this.id != that.id)
+        return false;
+    }
+
+    return true;
+  }
+
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case -1:
+          if (field.type == TType.I64) {
+            this.id = iprot.readI64();
+            this.__isset.id = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    TStruct struct = new TStruct("ThriftHandle");
+    oprot.writeStructBegin(struct);
+    TField field = new TField();
+    field.name = "id";
+    field.type = TType.I64;
+    field.id = -1;
+    oprot.writeFieldBegin(field);
+    oprot.writeI64(this.id);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ThriftHandle(");
+    sb.append("id:");
+    sb.append(this.id);
+    sb.append(")");
+    return sb.toString();
+  }
+
+}
+

+ 119 - 0
src/contrib/thriftfs/gen-java/org/apache/hadoop/thriftfs/api/ThriftIOException.java

@@ -0,0 +1,119 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.thriftfs.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import com.facebook.thrift.*;
+
+import com.facebook.thrift.protocol.*;
+import com.facebook.thrift.transport.*;
+
+public class ThriftIOException extends Exception implements TBase, java.io.Serializable {
+  public String message;
+
+  public final Isset __isset = new Isset();
+  public static final class Isset implements java.io.Serializable {
+    public boolean message = false;
+  }
+
+  public ThriftIOException() {
+  }
+
+  public ThriftIOException(
+    String message)
+  {
+    this();
+    this.message = message;
+    this.__isset.message = true;
+  }
+
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ThriftIOException)
+      return this.equals((ThriftIOException)that);
+    return false;
+  }
+
+  public boolean equals(ThriftIOException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_message = true && (this.message != null);
+    boolean that_present_message = true && (that.message != null);
+    if (this_present_message || that_present_message) {
+      if (!(this_present_message && that_present_message))
+        return false;
+      if (!this.message.equals(that.message))
+        return false;
+    }
+
+    return true;
+  }
+
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case -1:
+          if (field.type == TType.STRING) {
+            this.message = iprot.readString();
+            this.__isset.message = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    TStruct struct = new TStruct("ThriftIOException");
+    oprot.writeStructBegin(struct);
+    TField field = new TField();
+    if (this.message != null) {
+      field.name = "message";
+      field.type = TType.STRING;
+      field.id = -1;
+      oprot.writeFieldBegin(field);
+      oprot.writeString(this.message);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ThriftIOException(");
+    sb.append("message:");
+    sb.append(this.message);
+    sb.append(")");
+    return sb.toString();
+  }
+
+}
+

+ 13 - 0
src/contrib/thriftfs/gen-perl/Constants.pm

@@ -0,0 +1,13 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+package Constants;
+require 5.6.0;
+use strict;
+use warnings;
+use Thrift;
+
+
+1;

+ 4538 - 0
src/contrib/thriftfs/gen-perl/ThriftHadoopFileSystem.pm

@@ -0,0 +1,4538 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+require 5.6.0;
+use strict;
+use warnings;
+use Thrift;
+
+use Types;
+
+# HELPER FUNCTIONS AND STRUCTURES
+
+package ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args->mk_accessors( qw( periodInSeconds ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{periodInSeconds} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{periodInSeconds}) {
+      $self->{periodInSeconds} = $vals->{periodInSeconds};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{periodInSeconds});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args');
+  if (defined $self->{periodInSeconds}) {
+    $xfer += $output->writeFieldBegin('periodInSeconds', TType::I64, 1);
+    $xfer += $output->writeI64($self->{periodInSeconds});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result;
+use base('Class::Accessor');
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result');
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_shutdown_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_shutdown_args->mk_accessors( qw( status ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{status} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{status}) {
+      $self->{status} = $vals->{status};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_shutdown_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::I32) {
+        $xfer += $input->readI32(\$self->{status});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_shutdown_args');
+  if (defined $self->{status}) {
+    $xfer += $output->writeFieldBegin('status', TType::I32, 1);
+    $xfer += $output->writeI32($self->{status});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_shutdown_result;
+use base('Class::Accessor');
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_shutdown_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_shutdown_result');
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_create_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_create_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_create_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_create_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_create_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_create_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_create_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{success} = new ThriftHandle();
+        $xfer += $self->{success}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_create_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+    $xfer += $self->{success}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_createFile_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_createFile_args->mk_accessors( qw( path mode overwrite bufferSize block_replication blocksize ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{mode} = undef;
+$self->{overwrite} = undef;
+$self->{bufferSize} = undef;
+$self->{block_replication} = undef;
+$self->{blocksize} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{mode}) {
+      $self->{mode} = $vals->{mode};
+    }
+    if (defined $vals->{overwrite}) {
+      $self->{overwrite} = $vals->{overwrite};
+    }
+    if (defined $vals->{bufferSize}) {
+      $self->{bufferSize} = $vals->{bufferSize};
+    }
+    if (defined $vals->{block_replication}) {
+      $self->{block_replication} = $vals->{block_replication};
+    }
+    if (defined $vals->{blocksize}) {
+      $self->{blocksize} = $vals->{blocksize};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_createFile_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::I16) {
+        $xfer += $input->readI16(\$self->{mode});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{overwrite});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^4$/ && do{      if ($ftype == TType::I32) {
+        $xfer += $input->readI32(\$self->{bufferSize});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^5$/ && do{      if ($ftype == TType::I16) {
+        $xfer += $input->readI16(\$self->{block_replication});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^6$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{blocksize});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_createFile_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{mode}) {
+    $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
+    $xfer += $output->writeI16($self->{mode});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{overwrite}) {
+    $xfer += $output->writeFieldBegin('overwrite', TType::BOOL, 3);
+    $xfer += $output->writeBool($self->{overwrite});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{bufferSize}) {
+    $xfer += $output->writeFieldBegin('bufferSize', TType::I32, 4);
+    $xfer += $output->writeI32($self->{bufferSize});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{block_replication}) {
+    $xfer += $output->writeFieldBegin('block_replication', TType::I16, 5);
+    $xfer += $output->writeI16($self->{block_replication});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{blocksize}) {
+    $xfer += $output->writeFieldBegin('blocksize', TType::I64, 6);
+    $xfer += $output->writeI64($self->{blocksize});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_createFile_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_createFile_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_createFile_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{success} = new ThriftHandle();
+        $xfer += $self->{success}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_createFile_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+    $xfer += $self->{success}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_open_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_open_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_open_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_open_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_open_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_open_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_open_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{success} = new ThriftHandle();
+        $xfer += $self->{success}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_open_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+    $xfer += $self->{success}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_append_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_append_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_append_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_append_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_append_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_append_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_append_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{success} = new ThriftHandle();
+        $xfer += $self->{success}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_append_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+    $xfer += $self->{success}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_write_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_write_args->mk_accessors( qw( handle data ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{handle} = undef;
+$self->{data} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{handle}) {
+      $self->{handle} = $vals->{handle};
+    }
+    if (defined $vals->{data}) {
+      $self->{data} = $vals->{data};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_write_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{handle} = new ThriftHandle();
+        $xfer += $self->{handle}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^-1$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{data});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_write_args');
+  if (defined $self->{handle}) {
+    $xfer += $output->writeFieldBegin('handle', TType::STRUCT, 1);
+    $xfer += $self->{handle}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{data}) {
+    $xfer += $output->writeFieldBegin('data', TType::STRING, -1);
+    $xfer += $output->writeString($self->{data});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_write_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_write_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_write_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_write_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+    $xfer += $output->writeBool($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_read_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_read_args->mk_accessors( qw( handle offset size ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{handle} = undef;
+$self->{offset} = undef;
+$self->{size} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{handle}) {
+      $self->{handle} = $vals->{handle};
+    }
+    if (defined $vals->{offset}) {
+      $self->{offset} = $vals->{offset};
+    }
+    if (defined $vals->{size}) {
+      $self->{size} = $vals->{size};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_read_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{handle} = new ThriftHandle();
+        $xfer += $self->{handle}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^-1$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{offset});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^-2$/ && do{      if ($ftype == TType::I32) {
+        $xfer += $input->readI32(\$self->{size});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_args');
+  if (defined $self->{handle}) {
+    $xfer += $output->writeFieldBegin('handle', TType::STRUCT, 1);
+    $xfer += $self->{handle}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{offset}) {
+    $xfer += $output->writeFieldBegin('offset', TType::I64, -1);
+    $xfer += $output->writeI64($self->{offset});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{size}) {
+    $xfer += $output->writeFieldBegin('size', TType::I32, -2);
+    $xfer += $output->writeI32($self->{size});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_read_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_read_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_read_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+    $xfer += $output->writeString($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_close_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_close_args->mk_accessors( qw( out ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{out} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{out}) {
+      $self->{out} = $vals->{out};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_close_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{out} = new ThriftHandle();
+        $xfer += $self->{out}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_args');
+  if (defined $self->{out}) {
+    $xfer += $output->writeFieldBegin('out', TType::STRUCT, 1);
+    $xfer += $self->{out}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_close_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_close_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_close_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+    $xfer += $output->writeBool($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_rm_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_rm_args->mk_accessors( qw( path recursive ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{recursive} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{recursive}) {
+      $self->{recursive} = $vals->{recursive};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_rm_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{recursive});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{recursive}) {
+    $xfer += $output->writeFieldBegin('recursive', TType::BOOL, 2);
+    $xfer += $output->writeBool($self->{recursive});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_rm_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_rm_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_rm_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+    $xfer += $output->writeBool($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_rename_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_rename_args->mk_accessors( qw( path dest ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{dest} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{dest}) {
+      $self->{dest} = $vals->{dest};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_rename_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{dest} = new Pathname();
+        $xfer += $self->{dest}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{dest}) {
+    $xfer += $output->writeFieldBegin('dest', TType::STRUCT, 2);
+    $xfer += $self->{dest}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_rename_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_rename_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_rename_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+    $xfer += $output->writeBool($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_mkdirs_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_mkdirs_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_mkdirs_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_mkdirs_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_mkdirs_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_mkdirs_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+    $xfer += $output->writeBool($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_exists_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_exists_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_exists_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_exists_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_exists_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_exists_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{success});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+    $xfer += $output->writeBool($self->{success});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_stat_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_stat_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_stat_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_stat_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_stat_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_stat_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{success} = new FileStatus();
+        $xfer += $self->{success}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+    $xfer += $self->{success}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_listStatus_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_listStatus_args->mk_accessors( qw( path ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_listStatus_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_listStatus_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_listStatus_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_listStatus_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::LIST) {
+        {
+          my $_size14 = 0;
+          $self->{success} = [];
+          my $_etype17 = 0;
+          $xfer += $input->readListBegin(\$_etype17, \$_size14);
+          for (my $_i18 = 0; $_i18 < $_size14; ++$_i18)
+          {
+            my $elem19 = undef;
+            $elem19 = new FileStatus();
+            $xfer += $elem19->read($input);
+            push(@{$self->{success}},$elem19);
+          }
+          $xfer += $input->readListEnd();
+        }
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::LIST, 0);
+    {
+      $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}}));
+      {
+        foreach my $iter20 (@{$self->{success}}) 
+        {
+          $xfer += ${iter20}->write($output);
+        }
+      }
+      $output->writeListEnd();
+    }
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_chmod_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_chmod_args->mk_accessors( qw( path mode ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{mode} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{mode}) {
+      $self->{mode} = $vals->{mode};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_chmod_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::I16) {
+        $xfer += $input->readI16(\$self->{mode});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{mode}) {
+    $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
+    $xfer += $output->writeI16($self->{mode});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_chmod_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_chmod_result->mk_accessors( qw( ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_chmod_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_result');
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_chown_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_chown_args->mk_accessors( qw( path owner group ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{owner} = undef;
+$self->{group} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{owner}) {
+      $self->{owner} = $vals->{owner};
+    }
+    if (defined $vals->{group}) {
+      $self->{group} = $vals->{group};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_chown_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{owner});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{group});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{owner}) {
+    $xfer += $output->writeFieldBegin('owner', TType::STRING, 2);
+    $xfer += $output->writeString($self->{owner});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{group}) {
+    $xfer += $output->writeFieldBegin('group', TType::STRING, 3);
+    $xfer += $output->writeString($self->{group});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_chown_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_chown_result->mk_accessors( qw( ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_chown_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_result');
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_setReplication_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_setReplication_args->mk_accessors( qw( path replication ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{replication} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{replication}) {
+      $self->{replication} = $vals->{replication};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_setReplication_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::I16) {
+        $xfer += $input->readI16(\$self->{replication});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{replication}) {
+    $xfer += $output->writeFieldBegin('replication', TType::I16, 2);
+    $xfer += $output->writeI16($self->{replication});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_setReplication_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_setReplication_result->mk_accessors( qw( ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_setReplication_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_result');
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_getFileBlockLocations_args;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_getFileBlockLocations_args->mk_accessors( qw( path start length ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{start} = undef;
+$self->{length} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{start}) {
+      $self->{start} = $vals->{start};
+    }
+    if (defined $vals->{length}) {
+      $self->{length} = $vals->{length};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_getFileBlockLocations_args';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{path} = new Pathname();
+        $xfer += $self->{path}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{start});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{length});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_args');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+    $xfer += $self->{path}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{start}) {
+    $xfer += $output->writeFieldBegin('start', TType::I64, 2);
+    $xfer += $output->writeI64($self->{start});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{length}) {
+    $xfer += $output->writeFieldBegin('length', TType::I64, 3);
+    $xfer += $output->writeI64($self->{length});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystem_getFileBlockLocations_result;
+use base('Class::Accessor');
+ThriftHadoopFileSystem_getFileBlockLocations_result->mk_accessors( qw( success ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{success} = undef;
+$self->{ouch} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{success}) {
+      $self->{success} = $vals->{success};
+    }
+    if (defined $vals->{ouch}) {
+      $self->{ouch} = $vals->{ouch};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHadoopFileSystem_getFileBlockLocations_result';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^0$/ && do{      if ($ftype == TType::LIST) {
+        {
+          my $_size21 = 0;
+          $self->{success} = [];
+          my $_etype24 = 0;
+          $xfer += $input->readListBegin(\$_etype24, \$_size21);
+          for (my $_i25 = 0; $_i25 < $_size21; ++$_i25)
+          {
+            my $elem26 = undef;
+            $elem26 = new BlockLocation();
+            $xfer += $elem26->read($input);
+            push(@{$self->{success}},$elem26);
+          }
+          $xfer += $input->readListEnd();
+        }
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^1$/ && do{      if ($ftype == TType::STRUCT) {
+        $self->{ouch} = new ThriftIOException();
+        $xfer += $self->{ouch}->read($input);
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_result');
+  if (defined $self->{success}) {
+    $xfer += $output->writeFieldBegin('success', TType::LIST, 0);
+    {
+      $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}}));
+      {
+        foreach my $iter27 (@{$self->{success}}) 
+        {
+          $xfer += ${iter27}->write($output);
+        }
+      }
+      $output->writeListEnd();
+    }
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{ouch}) {
+    $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+    $xfer += $self->{ouch}->write($output);
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftHadoopFileSystemIf;
+
+sub setInactivityTimeoutPeriod{
+  my $self = shift;
+  my $periodInSeconds = shift;
+
+  die 'implement interface';
+}
+sub shutdown{
+  my $self = shift;
+  my $status = shift;
+
+  die 'implement interface';
+}
+sub create{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub createFile{
+  my $self = shift;
+  my $path = shift;
+  my $mode = shift;
+  my $overwrite = shift;
+  my $bufferSize = shift;
+  my $block_replication = shift;
+  my $blocksize = shift;
+
+  die 'implement interface';
+}
+sub open{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub append{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub write{
+  my $self = shift;
+  my $handle = shift;
+  my $data = shift;
+
+  die 'implement interface';
+}
+sub read{
+  my $self = shift;
+  my $handle = shift;
+  my $offset = shift;
+  my $size = shift;
+
+  die 'implement interface';
+}
+sub close{
+  my $self = shift;
+  my $out = shift;
+
+  die 'implement interface';
+}
+sub rm{
+  my $self = shift;
+  my $path = shift;
+  my $recursive = shift;
+
+  die 'implement interface';
+}
+sub rename{
+  my $self = shift;
+  my $path = shift;
+  my $dest = shift;
+
+  die 'implement interface';
+}
+sub mkdirs{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub exists{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub stat{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub listStatus{
+  my $self = shift;
+  my $path = shift;
+
+  die 'implement interface';
+}
+sub chmod{
+  my $self = shift;
+  my $path = shift;
+  my $mode = shift;
+
+  die 'implement interface';
+}
+sub chown{
+  my $self = shift;
+  my $path = shift;
+  my $owner = shift;
+  my $group = shift;
+
+  die 'implement interface';
+}
+sub setReplication{
+  my $self = shift;
+  my $path = shift;
+  my $replication = shift;
+
+  die 'implement interface';
+}
+sub getFileBlockLocations{
+  my $self = shift;
+  my $path = shift;
+  my $start = shift;
+  my $length = shift;
+
+  die 'implement interface';
+}
+package ThriftHadoopFileSystemRest;
+
+sub new {
+  my $classname=shift;
+  my $impl     =shift;
+  my $self     ={ impl => $impl };
+
+  return bless($self,$classname);
+}
+
+sub setInactivityTimeoutPeriod{
+  my $self = shift;
+  my $request = shift;
+
+  my $periodInSeconds = ($request->{'periodInSeconds'}) ? $request->{'periodInSeconds'} : undef;
+  return $self->{impl}->setInactivityTimeoutPeriod($periodInSeconds);
+}
+
+sub shutdown{
+  my $self = shift;
+  my $request = shift;
+
+  my $status = ($request->{'status'}) ? $request->{'status'} : undef;
+  return $self->{impl}->shutdown($status);
+}
+
+sub create{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->create($path);
+}
+
+sub createFile{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $mode = ($request->{'mode'}) ? $request->{'mode'} : undef;
+  my $overwrite = ($request->{'overwrite'}) ? $request->{'overwrite'} : undef;
+  my $bufferSize = ($request->{'bufferSize'}) ? $request->{'bufferSize'} : undef;
+  my $block_replication = ($request->{'block_replication'}) ? $request->{'block_replication'} : undef;
+  my $blocksize = ($request->{'blocksize'}) ? $request->{'blocksize'} : undef;
+  return $self->{impl}->createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize);
+}
+
+sub open{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->open($path);
+}
+
+sub append{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->append($path);
+}
+
+sub write{
+  my $self = shift;
+  my $request = shift;
+
+  my $handle = ($request->{'handle'}) ? $request->{'handle'} : undef;
+  my $data = ($request->{'data'}) ? $request->{'data'} : undef;
+  return $self->{impl}->write($handle, $data);
+}
+
+sub read{
+  my $self = shift;
+  my $request = shift;
+
+  my $handle = ($request->{'handle'}) ? $request->{'handle'} : undef;
+  my $offset = ($request->{'offset'}) ? $request->{'offset'} : undef;
+  my $size = ($request->{'size'}) ? $request->{'size'} : undef;
+  return $self->{impl}->read($handle, $offset, $size);
+}
+
+sub close{
+  my $self = shift;
+  my $request = shift;
+
+  my $out = ($request->{'out'}) ? $request->{'out'} : undef;
+  return $self->{impl}->close($out);
+}
+
+sub rm{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $recursive = ($request->{'recursive'}) ? $request->{'recursive'} : undef;
+  return $self->{impl}->rm($path, $recursive);
+}
+
+sub rename{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $dest = ($request->{'dest'}) ? $request->{'dest'} : undef;
+  return $self->{impl}->rename($path, $dest);
+}
+
+sub mkdirs{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->mkdirs($path);
+}
+
+sub exists{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->exists($path);
+}
+
+sub stat{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->stat($path);
+}
+
+sub listStatus{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  return $self->{impl}->listStatus($path);
+}
+
+sub chmod{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $mode = ($request->{'mode'}) ? $request->{'mode'} : undef;
+  return $self->{impl}->chmod($path, $mode);
+}
+
+sub chown{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $owner = ($request->{'owner'}) ? $request->{'owner'} : undef;
+  my $group = ($request->{'group'}) ? $request->{'group'} : undef;
+  return $self->{impl}->chown($path, $owner, $group);
+}
+
+sub setReplication{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $replication = ($request->{'replication'}) ? $request->{'replication'} : undef;
+  return $self->{impl}->setReplication($path, $replication);
+}
+
+sub getFileBlockLocations{
+  my $self = shift;
+  my $request = shift;
+
+  my $path = ($request->{'path'}) ? $request->{'path'} : undef;
+  my $start = ($request->{'start'}) ? $request->{'start'} : undef;
+  my $length = ($request->{'length'}) ? $request->{'length'} : undef;
+  return $self->{impl}->getFileBlockLocations($path, $start, $length);
+}
+
+package ThriftHadoopFileSystemClient;
+
+use base('ThriftHadoopFileSystemIf');
+sub new {
+  my $classname = shift;
+  my $input     = shift;
+  my $output    = shift;
+  my $self      = {};
+    $self->{input}  = $input;
+    $self->{output} = defined $output ? $output : $input;
+    $self->{seqid}  = 0;
+  return bless($self,$classname);
+}
+
+sub setInactivityTimeoutPeriod{
+  my $self = shift;
+  my $periodInSeconds = shift;
+
+    $self->send_setInactivityTimeoutPeriod($periodInSeconds);
+  $self->recv_setInactivityTimeoutPeriod();
+}
+
+sub send_setInactivityTimeoutPeriod{
+  my $self = shift;
+  my $periodInSeconds = shift;
+
+  $self->{output}->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
+  $args->{periodInSeconds} = $periodInSeconds;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_setInactivityTimeoutPeriod{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  return;
+}
+sub shutdown{
+  my $self = shift;
+  my $status = shift;
+
+    $self->send_shutdown($status);
+  $self->recv_shutdown();
+}
+
+sub send_shutdown{
+  my $self = shift;
+  my $status = shift;
+
+  $self->{output}->writeMessageBegin('shutdown', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_shutdown_args();
+  $args->{status} = $status;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_shutdown{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_shutdown_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  return;
+}
+sub create{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_create($path);
+  return $self->recv_create();
+}
+
+sub send_create{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('create', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_create_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_create{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_create_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "create failed: unknown result";
+}
+sub createFile{
+  my $self = shift;
+  my $path = shift;
+  my $mode = shift;
+  my $overwrite = shift;
+  my $bufferSize = shift;
+  my $block_replication = shift;
+  my $blocksize = shift;
+
+    $self->send_createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize);
+  return $self->recv_createFile();
+}
+
+sub send_createFile{
+  my $self = shift;
+  my $path = shift;
+  my $mode = shift;
+  my $overwrite = shift;
+  my $bufferSize = shift;
+  my $block_replication = shift;
+  my $blocksize = shift;
+
+  $self->{output}->writeMessageBegin('createFile', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_createFile_args();
+  $args->{path} = $path;
+  $args->{mode} = $mode;
+  $args->{overwrite} = $overwrite;
+  $args->{bufferSize} = $bufferSize;
+  $args->{block_replication} = $block_replication;
+  $args->{blocksize} = $blocksize;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_createFile{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_createFile_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "createFile failed: unknown result";
+}
+sub open{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_open($path);
+  return $self->recv_open();
+}
+
+sub send_open{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('open', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_open_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_open{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_open_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "open failed: unknown result";
+}
+sub append{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_append($path);
+  return $self->recv_append();
+}
+
+sub send_append{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('append', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_append_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_append{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_append_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "append failed: unknown result";
+}
+sub write{
+  my $self = shift;
+  my $handle = shift;
+  my $data = shift;
+
+    $self->send_write($handle, $data);
+  return $self->recv_write();
+}
+
+sub send_write{
+  my $self = shift;
+  my $handle = shift;
+  my $data = shift;
+
+  $self->{output}->writeMessageBegin('write', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_write_args();
+  $args->{handle} = $handle;
+  $args->{data} = $data;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_write{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_write_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "write failed: unknown result";
+}
+sub read{
+  my $self = shift;
+  my $handle = shift;
+  my $offset = shift;
+  my $size = shift;
+
+    $self->send_read($handle, $offset, $size);
+  return $self->recv_read();
+}
+
+sub send_read{
+  my $self = shift;
+  my $handle = shift;
+  my $offset = shift;
+  my $size = shift;
+
+  $self->{output}->writeMessageBegin('read', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_read_args();
+  $args->{handle} = $handle;
+  $args->{offset} = $offset;
+  $args->{size} = $size;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_read{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_read_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "read failed: unknown result";
+}
+sub close{
+  my $self = shift;
+  my $out = shift;
+
+    $self->send_close($out);
+  return $self->recv_close();
+}
+
+sub send_close{
+  my $self = shift;
+  my $out = shift;
+
+  $self->{output}->writeMessageBegin('close', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_close_args();
+  $args->{out} = $out;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_close{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_close_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "close failed: unknown result";
+}
+sub rm{
+  my $self = shift;
+  my $path = shift;
+  my $recursive = shift;
+
+    $self->send_rm($path, $recursive);
+  return $self->recv_rm();
+}
+
+sub send_rm{
+  my $self = shift;
+  my $path = shift;
+  my $recursive = shift;
+
+  $self->{output}->writeMessageBegin('rm', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_rm_args();
+  $args->{path} = $path;
+  $args->{recursive} = $recursive;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_rm{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_rm_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "rm failed: unknown result";
+}
+sub rename{
+  my $self = shift;
+  my $path = shift;
+  my $dest = shift;
+
+    $self->send_rename($path, $dest);
+  return $self->recv_rename();
+}
+
+sub send_rename{
+  my $self = shift;
+  my $path = shift;
+  my $dest = shift;
+
+  $self->{output}->writeMessageBegin('rename', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_rename_args();
+  $args->{path} = $path;
+  $args->{dest} = $dest;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_rename{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_rename_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "rename failed: unknown result";
+}
+sub mkdirs{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_mkdirs($path);
+  return $self->recv_mkdirs();
+}
+
+sub send_mkdirs{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('mkdirs', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_mkdirs_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_mkdirs{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_mkdirs_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "mkdirs failed: unknown result";
+}
+sub exists{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_exists($path);
+  return $self->recv_exists();
+}
+
+sub send_exists{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('exists', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_exists_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_exists{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_exists_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "exists failed: unknown result";
+}
+sub stat{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_stat($path);
+  return $self->recv_stat();
+}
+
+sub send_stat{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('stat', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_stat_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_stat{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_stat_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "stat failed: unknown result";
+}
+sub listStatus{
+  my $self = shift;
+  my $path = shift;
+
+    $self->send_listStatus($path);
+  return $self->recv_listStatus();
+}
+
+sub send_listStatus{
+  my $self = shift;
+  my $path = shift;
+
+  $self->{output}->writeMessageBegin('listStatus', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_listStatus_args();
+  $args->{path} = $path;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_listStatus{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_listStatus_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "listStatus failed: unknown result";
+}
+sub chmod{
+  my $self = shift;
+  my $path = shift;
+  my $mode = shift;
+
+    $self->send_chmod($path, $mode);
+  $self->recv_chmod();
+}
+
+sub send_chmod{
+  my $self = shift;
+  my $path = shift;
+  my $mode = shift;
+
+  $self->{output}->writeMessageBegin('chmod', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_chmod_args();
+  $args->{path} = $path;
+  $args->{mode} = $mode;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_chmod{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_chmod_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  return;
+}
+sub chown{
+  my $self = shift;
+  my $path = shift;
+  my $owner = shift;
+  my $group = shift;
+
+    $self->send_chown($path, $owner, $group);
+  $self->recv_chown();
+}
+
+sub send_chown{
+  my $self = shift;
+  my $path = shift;
+  my $owner = shift;
+  my $group = shift;
+
+  $self->{output}->writeMessageBegin('chown', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_chown_args();
+  $args->{path} = $path;
+  $args->{owner} = $owner;
+  $args->{group} = $group;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_chown{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_chown_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  return;
+}
+sub setReplication{
+  my $self = shift;
+  my $path = shift;
+  my $replication = shift;
+
+    $self->send_setReplication($path, $replication);
+  $self->recv_setReplication();
+}
+
+sub send_setReplication{
+  my $self = shift;
+  my $path = shift;
+  my $replication = shift;
+
+  $self->{output}->writeMessageBegin('setReplication', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_setReplication_args();
+  $args->{path} = $path;
+  $args->{replication} = $replication;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_setReplication{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_setReplication_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  return;
+}
+sub getFileBlockLocations{
+  my $self = shift;
+  my $path = shift;
+  my $start = shift;
+  my $length = shift;
+
+    $self->send_getFileBlockLocations($path, $start, $length);
+  return $self->recv_getFileBlockLocations();
+}
+
+sub send_getFileBlockLocations{
+  my $self = shift;
+  my $path = shift;
+  my $start = shift;
+  my $length = shift;
+
+  $self->{output}->writeMessageBegin('getFileBlockLocations', TMessageType::CALL, $self->{seqid});
+  my $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
+  $args->{path} = $path;
+  $args->{start} = $start;
+  $args->{length} = $length;
+  $args->write($self->{output});
+  $self->{output}->writeMessageEnd();
+  $self->{output}->getTransport()->flush();
+}
+
+sub recv_getFileBlockLocations{
+  my $self = shift;
+
+  my $rseqid = 0;
+  my $fname;
+  my $mtype = 0;
+
+  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+  if ($mtype == TMessageType::EXCEPTION) {
+    my $x = new TApplicationException();
+    $x->read($self->{input});
+    $self->{input}->readMessageEnd();
+    die $x;
+  }
+  my $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
+  $result->read($self->{input});
+  $self->{input}->readMessageEnd();
+
+  if (defined $result->{success} ) {
+    return $result->{success};
+  }
+  if (defined $result->{ouch}) {
+    die $result->{ouch};
+  }
+  die "getFileBlockLocations failed: unknown result";
+}
+package ThriftHadoopFileSystemProcessor;
+
+sub new {
+    my $classname = shift;
+    my $handler   = shift;
+    my $self      = {};
+    $self->{handler} = $handler;
+    return bless($self,$classname);
+}
+
+sub process {
+    my $self   = shift;
+    my $input  = shift;
+    my $output = shift;
+    my $rseqid = 0;
+    my $fname  = undef;
+    my $mtype  = 0;
+
+    $input->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    my $methodname = 'process_'.$fname;
+    if (!method_exists($self, $methodname)) {
+      $input->skip(TType::STRUCT);
+      $input->readMessageEnd();
+      my $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
+      $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
+      $x->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+      return;
+    }
+    $self->$methodname($rseqid, $input, $output);
+    return 1;
+  }
+
+sub process_setInactivityTimeoutPeriod{
+    my $self = shift;
+    my ($seqid, $input, $output); 
+    my $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    my $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
+    $self->{handler}->setInactivityTimeoutPeriod($args->periodInSeconds);
+      $output->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->getTransport()->flush();
+  }
+sub process_shutdown{
+    my $self = shift;
+    my ($seqid, $input, $output); 
+    my $args = new ThriftHadoopFileSystem_shutdown_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    my $result = new ThriftHadoopFileSystem_shutdown_result();
+    $self->{handler}->shutdown($args->status);
+      $output->writeMessageBegin('shutdown', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->getTransport()->flush();
+  }
+sub process_create{
+    my $self = shift;
+    my ($seqid, $input, $output); 
+    my $args = new ThriftHadoopFileSystem_create_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    my $result = new ThriftHadoopFileSystem_create_result();
+    eval {
+      $result->{success} = $self->{handler}->create($args->path);
+    }; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+      $result->{ouch} = $@;
+    }
+    $output->writeMessageBegin('create', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+}
+sub process_createFile{
+  my $self = shift;
+  my ($seqid, $input, $output); 
+  my $args = new ThriftHadoopFileSystem_createFile_args();
+  $args->read($input);
+  $input->readMessageEnd();
+  my $result = new ThriftHadoopFileSystem_createFile_result();
+  eval {
+    $result->{success} = $self->{handler}->createFile($args->path, $args->mode, $args->overwrite, $args->bufferSize, $args->block_replication, $args->blocksize);
+  }; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+    $result->{ouch} = $@;
+  }
+  $output->writeMessageBegin('createFile', TMessageType::REPLY, $seqid);
+  $result->write($output);
+  $output->getTransport()->flush();
+}
+sub process_open{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_open_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_open_result();
+eval {
+  $result->{success} = $self->{handler}->open($args->path);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+  $result->{ouch} = $@;
+}
+$output->writeMessageBegin('open', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_append{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_append_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_append_result();
+eval {
+$result->{success} = $self->{handler}->append($args->path);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('append', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_write{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_write_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_write_result();
+eval {
+$result->{success} = $self->{handler}->write($args->handle, $args->data);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('write', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_read{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_read_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_read_result();
+eval {
+$result->{success} = $self->{handler}->read($args->handle, $args->offset, $args->size);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('read', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_close{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_close_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_close_result();
+eval {
+$result->{success} = $self->{handler}->close($args->out);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('close', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_rm{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_rm_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_rm_result();
+eval {
+$result->{success} = $self->{handler}->rm($args->path, $args->recursive);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('rm', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_rename{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_rename_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_rename_result();
+eval {
+$result->{success} = $self->{handler}->rename($args->path, $args->dest);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('rename', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_mkdirs{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_mkdirs_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_mkdirs_result();
+eval {
+$result->{success} = $self->{handler}->mkdirs($args->path);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('mkdirs', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_exists{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_exists_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_exists_result();
+eval {
+$result->{success} = $self->{handler}->exists($args->path);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('exists', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_stat{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_stat_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_stat_result();
+eval {
+$result->{success} = $self->{handler}->stat($args->path);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('stat', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_listStatus{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_listStatus_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_listStatus_result();
+eval {
+$result->{success} = $self->{handler}->listStatus($args->path);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('listStatus', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_chmod{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_chmod_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_chmod_result();
+eval {
+$self->{handler}->chmod($args->path, $args->mode);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('chmod', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_chown{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_chown_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_chown_result();
+eval {
+$self->{handler}->chown($args->path, $args->owner, $args->group);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('chown', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_setReplication{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_setReplication_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_setReplication_result();
+eval {
+$self->{handler}->setReplication($args->path, $args->replication);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('setReplication', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+sub process_getFileBlockLocations{
+my $self = shift;
+my ($seqid, $input, $output); 
+my $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
+$args->read($input);
+$input->readMessageEnd();
+my $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
+eval {
+$result->{success} = $self->{handler}->getFileBlockLocations($args->path, $args->start, $args->length);
+}; if( UNIVERSAL::isa($@,'ThriftIOException') ){ 
+$result->{ouch} = $@;
+}
+$output->writeMessageBegin('getFileBlockLocations', TMessageType::REPLY, $seqid);
+$result->write($output);
+$output->getTransport()->flush();
+}
+1;

+ 610 - 0
src/contrib/thriftfs/gen-perl/Types.pm

@@ -0,0 +1,610 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+require 5.6.0;
+use strict;
+use warnings;
+use Thrift;
+
+package ThriftHandle;
+use base('Class::Accessor');
+ThriftHandle->mk_accessors( qw( id ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{id} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{id}) {
+      $self->{id} = $vals->{id};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftHandle';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^-1$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{id});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftHandle');
+  if (defined $self->{id}) {
+    $xfer += $output->writeFieldBegin('id', TType::I64, -1);
+    $xfer += $output->writeI64($self->{id});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package Pathname;
+use base('Class::Accessor');
+Pathname->mk_accessors( qw( pathname ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{pathname} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{pathname}) {
+      $self->{pathname} = $vals->{pathname};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'Pathname';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^-1$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{pathname});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('Pathname');
+  if (defined $self->{pathname}) {
+    $xfer += $output->writeFieldBegin('pathname', TType::STRING, -1);
+    $xfer += $output->writeString($self->{pathname});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package FileStatus;
+use base('Class::Accessor');
+FileStatus->mk_accessors( qw( path length isdir block_replication blocksize modification_time permission owner group ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{path} = undef;
+$self->{length} = undef;
+$self->{isdir} = undef;
+$self->{block_replication} = undef;
+$self->{blocksize} = undef;
+$self->{modification_time} = undef;
+$self->{permission} = undef;
+$self->{owner} = undef;
+$self->{group} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{path}) {
+      $self->{path} = $vals->{path};
+    }
+    if (defined $vals->{length}) {
+      $self->{length} = $vals->{length};
+    }
+    if (defined $vals->{isdir}) {
+      $self->{isdir} = $vals->{isdir};
+    }
+    if (defined $vals->{block_replication}) {
+      $self->{block_replication} = $vals->{block_replication};
+    }
+    if (defined $vals->{blocksize}) {
+      $self->{blocksize} = $vals->{blocksize};
+    }
+    if (defined $vals->{modification_time}) {
+      $self->{modification_time} = $vals->{modification_time};
+    }
+    if (defined $vals->{permission}) {
+      $self->{permission} = $vals->{permission};
+    }
+    if (defined $vals->{owner}) {
+      $self->{owner} = $vals->{owner};
+    }
+    if (defined $vals->{group}) {
+      $self->{group} = $vals->{group};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'FileStatus';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{path});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{length});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::BOOL) {
+        $xfer += $input->readBool(\$self->{isdir});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^4$/ && do{      if ($ftype == TType::I16) {
+        $xfer += $input->readI16(\$self->{block_replication});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^5$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{blocksize});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^6$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{modification_time});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^7$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{permission});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^8$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{owner});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^9$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{group});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('FileStatus');
+  if (defined $self->{path}) {
+    $xfer += $output->writeFieldBegin('path', TType::STRING, 1);
+    $xfer += $output->writeString($self->{path});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{length}) {
+    $xfer += $output->writeFieldBegin('length', TType::I64, 2);
+    $xfer += $output->writeI64($self->{length});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{isdir}) {
+    $xfer += $output->writeFieldBegin('isdir', TType::BOOL, 3);
+    $xfer += $output->writeBool($self->{isdir});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{block_replication}) {
+    $xfer += $output->writeFieldBegin('block_replication', TType::I16, 4);
+    $xfer += $output->writeI16($self->{block_replication});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{blocksize}) {
+    $xfer += $output->writeFieldBegin('blocksize', TType::I64, 5);
+    $xfer += $output->writeI64($self->{blocksize});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{modification_time}) {
+    $xfer += $output->writeFieldBegin('modification_time', TType::I64, 6);
+    $xfer += $output->writeI64($self->{modification_time});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{permission}) {
+    $xfer += $output->writeFieldBegin('permission', TType::STRING, 7);
+    $xfer += $output->writeString($self->{permission});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{owner}) {
+    $xfer += $output->writeFieldBegin('owner', TType::STRING, 8);
+    $xfer += $output->writeString($self->{owner});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{group}) {
+    $xfer += $output->writeFieldBegin('group', TType::STRING, 9);
+    $xfer += $output->writeString($self->{group});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package BlockLocation;
+use base('Class::Accessor');
+BlockLocation->mk_accessors( qw( hosts names offset length ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{hosts} = undef;
+$self->{names} = undef;
+$self->{offset} = undef;
+$self->{length} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{hosts}) {
+      $self->{hosts} = $vals->{hosts};
+    }
+    if (defined $vals->{names}) {
+      $self->{names} = $vals->{names};
+    }
+    if (defined $vals->{offset}) {
+      $self->{offset} = $vals->{offset};
+    }
+    if (defined $vals->{length}) {
+      $self->{length} = $vals->{length};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'BlockLocation';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^1$/ && do{      if ($ftype == TType::LIST) {
+        {
+          my $_size0 = 0;
+          $self->{hosts} = [];
+          my $_etype3 = 0;
+          $xfer += $input->readListBegin(\$_etype3, \$_size0);
+          for (my $_i4 = 0; $_i4 < $_size0; ++$_i4)
+          {
+            my $elem5 = undef;
+            $xfer += $input->readString(\$elem5);
+            push(@{$self->{hosts}},$elem5);
+          }
+          $xfer += $input->readListEnd();
+        }
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^2$/ && do{      if ($ftype == TType::LIST) {
+        {
+          my $_size6 = 0;
+          $self->{names} = [];
+          my $_etype9 = 0;
+          $xfer += $input->readListBegin(\$_etype9, \$_size6);
+          for (my $_i10 = 0; $_i10 < $_size6; ++$_i10)
+          {
+            my $elem11 = undef;
+            $xfer += $input->readString(\$elem11);
+            push(@{$self->{names}},$elem11);
+          }
+          $xfer += $input->readListEnd();
+        }
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{offset});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^4$/ && do{      if ($ftype == TType::I64) {
+        $xfer += $input->readI64(\$self->{length});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('BlockLocation');
+  if (defined $self->{hosts}) {
+    $xfer += $output->writeFieldBegin('hosts', TType::LIST, 1);
+    {
+      $output->writeListBegin(TType::STRING, scalar(@{$self->{hosts}}));
+      {
+        foreach my $iter12 (@{$self->{hosts}}) 
+        {
+          $xfer += $output->writeString($iter12);
+        }
+      }
+      $output->writeListEnd();
+    }
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{names}) {
+    $xfer += $output->writeFieldBegin('names', TType::LIST, 2);
+    {
+      $output->writeListBegin(TType::STRING, scalar(@{$self->{names}}));
+      {
+        foreach my $iter13 (@{$self->{names}}) 
+        {
+          $xfer += $output->writeString($iter13);
+        }
+      }
+      $output->writeListEnd();
+    }
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{offset}) {
+    $xfer += $output->writeFieldBegin('offset', TType::I64, 3);
+    $xfer += $output->writeI64($self->{offset});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{length}) {
+    $xfer += $output->writeFieldBegin('length', TType::I64, 4);
+    $xfer += $output->writeI64($self->{length});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package MalformedInputException;
+use base('Thrift::TException');
+use base('Class::Accessor');
+MalformedInputException->mk_accessors( qw( message ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{message} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{message}) {
+      $self->{message} = $vals->{message};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'MalformedInputException';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^-1$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{message});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('MalformedInputException');
+  if (defined $self->{message}) {
+    $xfer += $output->writeFieldBegin('message', TType::STRING, -1);
+    $xfer += $output->writeString($self->{message});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+package ThriftIOException;
+use base('Thrift::TException');
+use base('Class::Accessor');
+ThriftIOException->mk_accessors( qw( message ) );
+sub new {
+my $classname = shift;
+my $self      = {};
+my $vals      = shift || {};
+$self->{message} = undef;
+  if (UNIVERSAL::isa($vals,'HASH')) {
+    if (defined $vals->{message}) {
+      $self->{message} = $vals->{message};
+    }
+  }
+return bless($self,$classname);
+}
+
+sub getName {
+  return 'ThriftIOException';
+}
+
+sub read {
+  my $self  = shift;
+  my $input = shift;
+  my $xfer  = 0;
+  my $fname;
+  my $ftype = 0;
+  my $fid   = 0;
+  $xfer += $input->readStructBegin(\$fname);
+  while (1) 
+  {
+    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+    if ($ftype == TType::STOP) {
+      last;
+    }
+    SWITCH: for($fid)
+    {
+      /^-1$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{message});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+        $xfer += $input->skip($ftype);
+    }
+    $xfer += $input->readFieldEnd();
+  }
+  $xfer += $input->readStructEnd();
+  return $xfer;
+}
+
+sub write {
+  my $self   = shift;
+  my $output = shift;
+  my $xfer   = 0;
+  $xfer += $output->writeStructBegin('ThriftIOException');
+  if (defined $self->{message}) {
+    $xfer += $output->writeFieldBegin('message', TType::STRING, -1);
+    $xfer += $output->writeString($self->{message});
+    $xfer += $output->writeFieldEnd();
+  }
+  $xfer += $output->writeFieldStop();
+  $xfer += $output->writeStructEnd();
+  return $xfer;
+}
+
+1;

+ 4852 - 0
src/contrib/thriftfs/gen-php/ThriftHadoopFileSystem.php

@@ -0,0 +1,4852 @@
+<?php
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
+
+include_once $GLOBALS['THRIFT_ROOT'].'/packages/hadoopfs/hadoopfs_types.php';
+
+interface ThriftHadoopFileSystemIf {
+  public function setInactivityTimeoutPeriod($periodInSeconds);
+  public function shutdown($status);
+  public function create($path);
+  public function createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize);
+  public function open($path);
+  public function append($path);
+  public function write($handle, $data);
+  public function read($handle, $offset, $size);
+  public function close($out);
+  public function rm($path, $recursive);
+  public function rename($path, $dest);
+  public function mkdirs($path);
+  public function exists($path);
+  public function stat($path);
+  public function listStatus($path);
+  public function chmod($path, $mode);
+  public function chown($path, $owner, $group);
+  public function setReplication($path, $replication);
+  public function getFileBlockLocations($path, $start, $length);
+}
+
+class ThriftHadoopFileSystemClient implements ThriftHadoopFileSystemIf {
+  protected $input_ = null;
+  protected $output_ = null;
+
+  protected $seqid_ = 0;
+
+  public function __construct($input, $output=null) {
+    $this->input_ = $input;
+    $this->output_ = $output ? $output : $input;
+  }
+
+  public function setInactivityTimeoutPeriod($periodInSeconds)
+  {
+    $this->send_setInactivityTimeoutPeriod($periodInSeconds);
+    $this->recv_setInactivityTimeoutPeriod();
+  }
+
+  public function send_setInactivityTimeoutPeriod($periodInSeconds)
+  {
+    $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
+    $args->periodInSeconds = $periodInSeconds;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'setInactivityTimeoutPeriod', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_setInactivityTimeoutPeriod()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    return;
+  }
+
+  public function shutdown($status)
+  {
+    $this->send_shutdown($status);
+    $this->recv_shutdown();
+  }
+
+  public function send_shutdown($status)
+  {
+    $args = new ThriftHadoopFileSystem_shutdown_args();
+    $args->status = $status;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'shutdown', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('shutdown', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_shutdown()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_shutdown_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_shutdown_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    return;
+  }
+
+  public function create($path)
+  {
+    $this->send_create($path);
+    return $this->recv_create();
+  }
+
+  public function send_create($path)
+  {
+    $args = new ThriftHadoopFileSystem_create_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'create', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('create', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_create()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_create_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_create_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("create failed: unknown result");
+  }
+
+  public function createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize)
+  {
+    $this->send_createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize);
+    return $this->recv_createFile();
+  }
+
+  public function send_createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize)
+  {
+    $args = new ThriftHadoopFileSystem_createFile_args();
+    $args->path = $path;
+    $args->mode = $mode;
+    $args->overwrite = $overwrite;
+    $args->bufferSize = $bufferSize;
+    $args->block_replication = $block_replication;
+    $args->blocksize = $blocksize;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'createFile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('createFile', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_createFile()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_createFile_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_createFile_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("createFile failed: unknown result");
+  }
+
+  public function open($path)
+  {
+    $this->send_open($path);
+    return $this->recv_open();
+  }
+
+  public function send_open($path)
+  {
+    $args = new ThriftHadoopFileSystem_open_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'open', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('open', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_open()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_open_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_open_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("open failed: unknown result");
+  }
+
+  public function append($path)
+  {
+    $this->send_append($path);
+    return $this->recv_append();
+  }
+
+  public function send_append($path)
+  {
+    $args = new ThriftHadoopFileSystem_append_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'append', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('append', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_append()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_append_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_append_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("append failed: unknown result");
+  }
+
+  public function write($handle, $data)
+  {
+    $this->send_write($handle, $data);
+    return $this->recv_write();
+  }
+
+  public function send_write($handle, $data)
+  {
+    $args = new ThriftHadoopFileSystem_write_args();
+    $args->handle = $handle;
+    $args->data = $data;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'write', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('write', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_write()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_write_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_write_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("write failed: unknown result");
+  }
+
+  public function read($handle, $offset, $size)
+  {
+    $this->send_read($handle, $offset, $size);
+    return $this->recv_read();
+  }
+
+  public function send_read($handle, $offset, $size)
+  {
+    $args = new ThriftHadoopFileSystem_read_args();
+    $args->handle = $handle;
+    $args->offset = $offset;
+    $args->size = $size;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'read', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('read', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_read()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_read_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_read_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("read failed: unknown result");
+  }
+
+  public function close($out)
+  {
+    $this->send_close($out);
+    return $this->recv_close();
+  }
+
+  public function send_close($out)
+  {
+    $args = new ThriftHadoopFileSystem_close_args();
+    $args->out = $out;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'close', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('close', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_close()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_close_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_close_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("close failed: unknown result");
+  }
+
+  public function rm($path, $recursive)
+  {
+    $this->send_rm($path, $recursive);
+    return $this->recv_rm();
+  }
+
+  public function send_rm($path, $recursive)
+  {
+    $args = new ThriftHadoopFileSystem_rm_args();
+    $args->path = $path;
+    $args->recursive = $recursive;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'rm', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('rm', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_rm()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_rm_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_rm_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("rm failed: unknown result");
+  }
+
+  public function rename($path, $dest)
+  {
+    $this->send_rename($path, $dest);
+    return $this->recv_rename();
+  }
+
+  public function send_rename($path, $dest)
+  {
+    $args = new ThriftHadoopFileSystem_rename_args();
+    $args->path = $path;
+    $args->dest = $dest;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'rename', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('rename', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_rename()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_rename_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_rename_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("rename failed: unknown result");
+  }
+
+  public function mkdirs($path)
+  {
+    $this->send_mkdirs($path);
+    return $this->recv_mkdirs();
+  }
+
+  public function send_mkdirs($path)
+  {
+    $args = new ThriftHadoopFileSystem_mkdirs_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'mkdirs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('mkdirs', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_mkdirs()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_mkdirs_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_mkdirs_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("mkdirs failed: unknown result");
+  }
+
+  public function exists($path)
+  {
+    $this->send_exists($path);
+    return $this->recv_exists();
+  }
+
+  public function send_exists($path)
+  {
+    $args = new ThriftHadoopFileSystem_exists_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'exists', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('exists', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_exists()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_exists_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_exists_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("exists failed: unknown result");
+  }
+
+  public function stat($path)
+  {
+    $this->send_stat($path);
+    return $this->recv_stat();
+  }
+
+  public function send_stat($path)
+  {
+    $args = new ThriftHadoopFileSystem_stat_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'stat', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('stat', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_stat()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_stat_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_stat_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("stat failed: unknown result");
+  }
+
+  public function listStatus($path)
+  {
+    $this->send_listStatus($path);
+    return $this->recv_listStatus();
+  }
+
+  public function send_listStatus($path)
+  {
+    $args = new ThriftHadoopFileSystem_listStatus_args();
+    $args->path = $path;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'listStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('listStatus', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_listStatus()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_listStatus_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_listStatus_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("listStatus failed: unknown result");
+  }
+
+  public function chmod($path, $mode)
+  {
+    $this->send_chmod($path, $mode);
+    $this->recv_chmod();
+  }
+
+  public function send_chmod($path, $mode)
+  {
+    $args = new ThriftHadoopFileSystem_chmod_args();
+    $args->path = $path;
+    $args->mode = $mode;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'chmod', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('chmod', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_chmod()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_chmod_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_chmod_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    return;
+  }
+
+  public function chown($path, $owner, $group)
+  {
+    $this->send_chown($path, $owner, $group);
+    $this->recv_chown();
+  }
+
+  public function send_chown($path, $owner, $group)
+  {
+    $args = new ThriftHadoopFileSystem_chown_args();
+    $args->path = $path;
+    $args->owner = $owner;
+    $args->group = $group;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'chown', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('chown', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_chown()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_chown_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_chown_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    return;
+  }
+
+  public function setReplication($path, $replication)
+  {
+    $this->send_setReplication($path, $replication);
+    $this->recv_setReplication();
+  }
+
+  public function send_setReplication($path, $replication)
+  {
+    $args = new ThriftHadoopFileSystem_setReplication_args();
+    $args->path = $path;
+    $args->replication = $replication;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'setReplication', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('setReplication', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_setReplication()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_setReplication_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_setReplication_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    return;
+  }
+
+  public function getFileBlockLocations($path, $start, $length)
+  {
+    $this->send_getFileBlockLocations($path, $start, $length);
+    return $this->recv_getFileBlockLocations();
+  }
+
+  public function send_getFileBlockLocations($path, $start, $length)
+  {
+    $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
+    $args->path = $path;
+    $args->start = $start;
+    $args->length = $length;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getFileBlockLocations', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getFileBlockLocations', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getFileBlockLocations()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_getFileBlockLocations_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ouch !== null) {
+      throw $result->ouch;
+    }
+    throw new Exception("getFileBlockLocations failed: unknown result");
+  }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args {
+  static $_TSPEC;
+
+  public $periodInSeconds = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'periodInSeconds',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['periodInSeconds'])) {
+        $this->periodInSeconds = $vals['periodInSeconds'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->periodInSeconds);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args');
+    if ($this->periodInSeconds !== null) {
+      $xfer += $output->writeFieldBegin('periodInSeconds', TType::I64, 1);
+      $xfer += $output->writeI64($this->periodInSeconds);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result {
+  static $_TSPEC;
+
+
+  public function __construct() {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        );
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result');
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_shutdown_args {
+  static $_TSPEC;
+
+  public $status = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'status',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['status'])) {
+        $this->status = $vals['status'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_shutdown_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->status);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_shutdown_args');
+    if ($this->status !== null) {
+      $xfer += $output->writeFieldBegin('status', TType::I32, 1);
+      $xfer += $output->writeI32($this->status);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_shutdown_result {
+  static $_TSPEC;
+
+
+  public function __construct() {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        );
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_shutdown_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_shutdown_result');
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_create_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_create_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_create_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_create_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_create_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new ThriftHandle();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_create_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_createFile_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $mode = null;
+  public $overwrite = null;
+  public $bufferSize = null;
+  public $block_replication = null;
+  public $blocksize = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'mode',
+          'type' => TType::I16,
+          ),
+        3 => array(
+          'var' => 'overwrite',
+          'type' => TType::BOOL,
+          ),
+        4 => array(
+          'var' => 'bufferSize',
+          'type' => TType::I32,
+          ),
+        5 => array(
+          'var' => 'block_replication',
+          'type' => TType::I16,
+          ),
+        6 => array(
+          'var' => 'blocksize',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['mode'])) {
+        $this->mode = $vals['mode'];
+      }
+      if (isset($vals['overwrite'])) {
+        $this->overwrite = $vals['overwrite'];
+      }
+      if (isset($vals['bufferSize'])) {
+        $this->bufferSize = $vals['bufferSize'];
+      }
+      if (isset($vals['block_replication'])) {
+        $this->block_replication = $vals['block_replication'];
+      }
+      if (isset($vals['blocksize'])) {
+        $this->blocksize = $vals['blocksize'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_createFile_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I16) {
+            $xfer += $input->readI16($this->mode);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->overwrite);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->bufferSize);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I16) {
+            $xfer += $input->readI16($this->block_replication);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->blocksize);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_createFile_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->mode !== null) {
+      $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
+      $xfer += $output->writeI16($this->mode);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->overwrite !== null) {
+      $xfer += $output->writeFieldBegin('overwrite', TType::BOOL, 3);
+      $xfer += $output->writeBool($this->overwrite);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->bufferSize !== null) {
+      $xfer += $output->writeFieldBegin('bufferSize', TType::I32, 4);
+      $xfer += $output->writeI32($this->bufferSize);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->block_replication !== null) {
+      $xfer += $output->writeFieldBegin('block_replication', TType::I16, 5);
+      $xfer += $output->writeI16($this->block_replication);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->blocksize !== null) {
+      $xfer += $output->writeFieldBegin('blocksize', TType::I64, 6);
+      $xfer += $output->writeI64($this->blocksize);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_createFile_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_createFile_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new ThriftHandle();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_createFile_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_open_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_open_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_open_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_open_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_open_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new ThriftHandle();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_open_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_append_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_append_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_append_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_append_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_append_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new ThriftHandle();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_append_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_write_args {
+  static $_TSPEC;
+
+  public $handle = null;
+  public $data = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'handle',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        -1 => array(
+          'var' => 'data',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['handle'])) {
+        $this->handle = $vals['handle'];
+      }
+      if (isset($vals['data'])) {
+        $this->data = $vals['data'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_write_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->handle = new ThriftHandle();
+            $xfer += $this->handle->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case -1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->data);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_write_args');
+    if ($this->handle !== null) {
+      if (!is_object($this->handle)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('handle', TType::STRUCT, 1);
+      $xfer += $this->handle->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->data !== null) {
+      $xfer += $output->writeFieldBegin('data', TType::STRING, -1);
+      $xfer += $output->writeString($this->data);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_write_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_write_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_write_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_read_args {
+  static $_TSPEC;
+
+  public $handle = null;
+  public $offset = null;
+  public $size = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'handle',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        -1 => array(
+          'var' => 'offset',
+          'type' => TType::I64,
+          ),
+        -2 => array(
+          'var' => 'size',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['handle'])) {
+        $this->handle = $vals['handle'];
+      }
+      if (isset($vals['offset'])) {
+        $this->offset = $vals['offset'];
+      }
+      if (isset($vals['size'])) {
+        $this->size = $vals['size'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_read_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->handle = new ThriftHandle();
+            $xfer += $this->handle->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case -1:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->offset);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case -2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->size);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_args');
+    if ($this->handle !== null) {
+      if (!is_object($this->handle)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('handle', TType::STRUCT, 1);
+      $xfer += $this->handle->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->offset !== null) {
+      $xfer += $output->writeFieldBegin('offset', TType::I64, -1);
+      $xfer += $output->writeI64($this->offset);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->size !== null) {
+      $xfer += $output->writeFieldBegin('size', TType::I32, -2);
+      $xfer += $output->writeI32($this->size);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_read_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_read_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_close_args {
+  static $_TSPEC;
+
+  public $out = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'out',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftHandle',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['out'])) {
+        $this->out = $vals['out'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_close_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->out = new ThriftHandle();
+            $xfer += $this->out->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_args');
+    if ($this->out !== null) {
+      if (!is_object($this->out)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('out', TType::STRUCT, 1);
+      $xfer += $this->out->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_close_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_close_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_rm_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $recursive = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'recursive',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['recursive'])) {
+        $this->recursive = $vals['recursive'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_rm_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->recursive);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->recursive !== null) {
+      $xfer += $output->writeFieldBegin('recursive', TType::BOOL, 2);
+      $xfer += $output->writeBool($this->recursive);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_rm_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_rm_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_rename_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $dest = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'dest',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['dest'])) {
+        $this->dest = $vals['dest'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_rename_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->dest = new Pathname();
+            $xfer += $this->dest->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->dest !== null) {
+      if (!is_object($this->dest)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('dest', TType::STRUCT, 2);
+      $xfer += $this->dest->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_rename_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_rename_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_mkdirs_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_mkdirs_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_mkdirs_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_mkdirs_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_exists_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_exists_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_exists_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_exists_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_stat_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_stat_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_stat_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'FileStatus',
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_stat_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new FileStatus();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_listStatus_args {
+  static $_TSPEC;
+
+  public $path = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_listStatus_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_listStatus_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => 'FileStatus',
+            ),
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_listStatus_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size14 = 0;
+            $_etype17 = 0;
+            $xfer += $input->readListBegin($_etype17, $_size14);
+            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
+            {
+              $elem19 = null;
+              $elem19 = new FileStatus();
+              $xfer += $elem19->read($input);
+              $this->success []= $elem19;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_chmod_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $mode = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'mode',
+          'type' => TType::I16,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['mode'])) {
+        $this->mode = $vals['mode'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_chmod_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I16) {
+            $xfer += $input->readI16($this->mode);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->mode !== null) {
+      $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
+      $xfer += $output->writeI16($this->mode);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_chmod_result {
+  static $_TSPEC;
+
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_chmod_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_result');
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_chown_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $owner = null;
+  public $group = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'owner',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'group',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['owner'])) {
+        $this->owner = $vals['owner'];
+      }
+      if (isset($vals['group'])) {
+        $this->group = $vals['group'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_chown_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->owner);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->group);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->owner !== null) {
+      $xfer += $output->writeFieldBegin('owner', TType::STRING, 2);
+      $xfer += $output->writeString($this->owner);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->group !== null) {
+      $xfer += $output->writeFieldBegin('group', TType::STRING, 3);
+      $xfer += $output->writeString($this->group);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_chown_result {
+  static $_TSPEC;
+
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_chown_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_result');
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_setReplication_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $replication = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'replication',
+          'type' => TType::I16,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['replication'])) {
+        $this->replication = $vals['replication'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_setReplication_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I16) {
+            $xfer += $input->readI16($this->replication);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replication !== null) {
+      $xfer += $output->writeFieldBegin('replication', TType::I16, 2);
+      $xfer += $output->writeI16($this->replication);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_setReplication_result {
+  static $_TSPEC;
+
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_setReplication_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_result');
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_getFileBlockLocations_args {
+  static $_TSPEC;
+
+  public $path = null;
+  public $start = null;
+  public $length = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRUCT,
+          'class' => 'Pathname',
+          ),
+        2 => array(
+          'var' => 'start',
+          'type' => TType::I64,
+          ),
+        3 => array(
+          'var' => 'length',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['start'])) {
+        $this->start = $vals['start'];
+      }
+      if (isset($vals['length'])) {
+        $this->length = $vals['length'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_getFileBlockLocations_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->path = new Pathname();
+            $xfer += $this->path->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->start);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->length);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_args');
+    if ($this->path !== null) {
+      if (!is_object($this->path)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
+      $xfer += $this->path->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->start !== null) {
+      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
+      $xfer += $output->writeI64($this->start);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->length !== null) {
+      $xfer += $output->writeFieldBegin('length', TType::I64, 3);
+      $xfer += $output->writeI64($this->length);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystem_getFileBlockLocations_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ouch = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => 'BlockLocation',
+            ),
+          ),
+        1 => array(
+          'var' => 'ouch',
+          'type' => TType::STRUCT,
+          'class' => 'ThriftIOException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ouch'])) {
+        $this->ouch = $vals['ouch'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHadoopFileSystem_getFileBlockLocations_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size21 = 0;
+            $_etype24 = 0;
+            $xfer += $input->readListBegin($_etype24, $_size21);
+            for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
+            {
+              $elem26 = null;
+              $elem26 = new BlockLocation();
+              $xfer += $elem26->read($input);
+              $this->success []= $elem26;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ouch = new ThriftIOException();
+            $xfer += $this->ouch->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter27)
+          {
+            $xfer += $iter27->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ouch !== null) {
+      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
+      $xfer += $this->ouch->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHadoopFileSystemProcessor {
+  protected $handler_ = null;
+  public function __construct($handler) {
+    $this->handler_ = $handler;
+  }
+
+  public function process($input, $output) {
+    $rseqid = 0;
+    $fname = null;
+    $mtype = 0;
+
+    $input->readMessageBegin($fname, $mtype, $rseqid);
+    $methodname = 'process_'.$fname;
+    if (!method_exists($this, $methodname)) {
+      $input->skip(TType::STRUCT);
+      $input->readMessageEnd();
+      $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
+      $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
+      $x->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+      return;
+    }
+    $this->$methodname($rseqid, $input, $output);
+    return true;
+  }
+
+  protected function process_setInactivityTimeoutPeriod($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
+    $this->handler_->setInactivityTimeoutPeriod($args->periodInSeconds);
+    $output->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_shutdown($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_shutdown_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_shutdown_result();
+    $this->handler_->shutdown($args->status);
+    $output->writeMessageBegin('shutdown', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_create($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_create_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_create_result();
+    try {
+      $result->success = $this->handler_->create($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('create', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_createFile($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_createFile_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_createFile_result();
+    try {
+      $result->success = $this->handler_->createFile($args->path, $args->mode, $args->overwrite, $args->bufferSize, $args->block_replication, $args->blocksize);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('createFile', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_open($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_open_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_open_result();
+    try {
+      $result->success = $this->handler_->open($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('open', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_append($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_append_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_append_result();
+    try {
+      $result->success = $this->handler_->append($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('append', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_write($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_write_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_write_result();
+    try {
+      $result->success = $this->handler_->write($args->handle, $args->data);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('write', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_read($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_read_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_read_result();
+    try {
+      $result->success = $this->handler_->read($args->handle, $args->offset, $args->size);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('read', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_close($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_close_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_close_result();
+    try {
+      $result->success = $this->handler_->close($args->out);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('close', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_rm($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_rm_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_rm_result();
+    try {
+      $result->success = $this->handler_->rm($args->path, $args->recursive);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('rm', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_rename($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_rename_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_rename_result();
+    try {
+      $result->success = $this->handler_->rename($args->path, $args->dest);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('rename', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_mkdirs($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_mkdirs_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_mkdirs_result();
+    try {
+      $result->success = $this->handler_->mkdirs($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('mkdirs', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_exists($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_exists_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_exists_result();
+    try {
+      $result->success = $this->handler_->exists($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('exists', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_stat($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_stat_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_stat_result();
+    try {
+      $result->success = $this->handler_->stat($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('stat', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_listStatus($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_listStatus_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_listStatus_result();
+    try {
+      $result->success = $this->handler_->listStatus($args->path);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('listStatus', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_chmod($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_chmod_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_chmod_result();
+    try {
+      $this->handler_->chmod($args->path, $args->mode);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('chmod', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_chown($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_chown_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_chown_result();
+    try {
+      $this->handler_->chown($args->path, $args->owner, $args->group);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('chown', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_setReplication($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_setReplication_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_setReplication_result();
+    try {
+      $this->handler_->setReplication($args->path, $args->replication);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('setReplication', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+  protected function process_getFileBlockLocations($seqid, $input, $output) {
+    $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
+    $args->read($input);
+    $input->readMessageEnd();
+    $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
+    try {
+      $result->success = $this->handler_->getFileBlockLocations($args->path, $args->start, $args->length);
+    } catch (ThriftIOException $ouch) {
+      $result->ouch = $ouch;
+    }
+    $output->writeMessageBegin('getFileBlockLocations', TMessageType::REPLY, $seqid);
+    $result->write($output);
+    $output->getTransport()->flush();
+  }
+}
+?>

+ 714 - 0
src/contrib/thriftfs/gen-php/hadoopfs_types.php

@@ -0,0 +1,714 @@
+<?php
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
+
+
+class ThriftHandle {
+  static $_TSPEC;
+
+  public $id = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        -1 => array(
+          'var' => 'id',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['id'])) {
+        $this->id = $vals['id'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHandle';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case -1:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->id);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHandle');
+    if ($this->id !== null) {
+      $xfer += $output->writeFieldBegin('id', TType::I64, -1);
+      $xfer += $output->writeI64($this->id);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Pathname {
+  static $_TSPEC;
+
+  public $pathname = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        -1 => array(
+          'var' => 'pathname',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['pathname'])) {
+        $this->pathname = $vals['pathname'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Pathname';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case -1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->pathname);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Pathname');
+    if ($this->pathname !== null) {
+      $xfer += $output->writeFieldBegin('pathname', TType::STRING, -1);
+      $xfer += $output->writeString($this->pathname);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class FileStatus {
+  static $_TSPEC;
+
+  public $path = null;
+  public $length = null;
+  public $isdir = null;
+  public $block_replication = null;
+  public $blocksize = null;
+  public $modification_time = null;
+  public $permission = null;
+  public $owner = null;
+  public $group = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'path',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'length',
+          'type' => TType::I64,
+          ),
+        3 => array(
+          'var' => 'isdir',
+          'type' => TType::BOOL,
+          ),
+        4 => array(
+          'var' => 'block_replication',
+          'type' => TType::I16,
+          ),
+        5 => array(
+          'var' => 'blocksize',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'modification_time',
+          'type' => TType::I64,
+          ),
+        7 => array(
+          'var' => 'permission',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'owner',
+          'type' => TType::STRING,
+          ),
+        9 => array(
+          'var' => 'group',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['path'])) {
+        $this->path = $vals['path'];
+      }
+      if (isset($vals['length'])) {
+        $this->length = $vals['length'];
+      }
+      if (isset($vals['isdir'])) {
+        $this->isdir = $vals['isdir'];
+      }
+      if (isset($vals['block_replication'])) {
+        $this->block_replication = $vals['block_replication'];
+      }
+      if (isset($vals['blocksize'])) {
+        $this->blocksize = $vals['blocksize'];
+      }
+      if (isset($vals['modification_time'])) {
+        $this->modification_time = $vals['modification_time'];
+      }
+      if (isset($vals['permission'])) {
+        $this->permission = $vals['permission'];
+      }
+      if (isset($vals['owner'])) {
+        $this->owner = $vals['owner'];
+      }
+      if (isset($vals['group'])) {
+        $this->group = $vals['group'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'FileStatus';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->path);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->length);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isdir);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I16) {
+            $xfer += $input->readI16($this->block_replication);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->blocksize);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->modification_time);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->permission);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->owner);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->group);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('FileStatus');
+    if ($this->path !== null) {
+      $xfer += $output->writeFieldBegin('path', TType::STRING, 1);
+      $xfer += $output->writeString($this->path);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->length !== null) {
+      $xfer += $output->writeFieldBegin('length', TType::I64, 2);
+      $xfer += $output->writeI64($this->length);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->isdir !== null) {
+      $xfer += $output->writeFieldBegin('isdir', TType::BOOL, 3);
+      $xfer += $output->writeBool($this->isdir);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->block_replication !== null) {
+      $xfer += $output->writeFieldBegin('block_replication', TType::I16, 4);
+      $xfer += $output->writeI16($this->block_replication);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->blocksize !== null) {
+      $xfer += $output->writeFieldBegin('blocksize', TType::I64, 5);
+      $xfer += $output->writeI64($this->blocksize);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->modification_time !== null) {
+      $xfer += $output->writeFieldBegin('modification_time', TType::I64, 6);
+      $xfer += $output->writeI64($this->modification_time);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->permission !== null) {
+      $xfer += $output->writeFieldBegin('permission', TType::STRING, 7);
+      $xfer += $output->writeString($this->permission);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->owner !== null) {
+      $xfer += $output->writeFieldBegin('owner', TType::STRING, 8);
+      $xfer += $output->writeString($this->owner);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->group !== null) {
+      $xfer += $output->writeFieldBegin('group', TType::STRING, 9);
+      $xfer += $output->writeString($this->group);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class BlockLocation {
+  static $_TSPEC;
+
+  public $hosts = null;
+  public $names = null;
+  public $offset = null;
+  public $length = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'hosts',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        2 => array(
+          'var' => 'names',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        3 => array(
+          'var' => 'offset',
+          'type' => TType::I64,
+          ),
+        4 => array(
+          'var' => 'length',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['hosts'])) {
+        $this->hosts = $vals['hosts'];
+      }
+      if (isset($vals['names'])) {
+        $this->names = $vals['names'];
+      }
+      if (isset($vals['offset'])) {
+        $this->offset = $vals['offset'];
+      }
+      if (isset($vals['length'])) {
+        $this->length = $vals['length'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'BlockLocation';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::LST) {
+            $this->hosts = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $xfer += $input->readString($elem5);
+              $this->hosts []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::LST) {
+            $this->names = array();
+            $_size6 = 0;
+            $_etype9 = 0;
+            $xfer += $input->readListBegin($_etype9, $_size6);
+            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            {
+              $elem11 = null;
+              $xfer += $input->readString($elem11);
+              $this->names []= $elem11;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->offset);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->length);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('BlockLocation');
+    if ($this->hosts !== null) {
+      if (!is_array($this->hosts)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('hosts', TType::LST, 1);
+      {
+        $output->writeListBegin(TType::STRING, count($this->hosts));
+        {
+          foreach ($this->hosts as $iter12)
+          {
+            $xfer += $output->writeString($iter12);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->names !== null) {
+      if (!is_array($this->names)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('names', TType::LST, 2);
+      {
+        $output->writeListBegin(TType::STRING, count($this->names));
+        {
+          foreach ($this->names as $iter13)
+          {
+            $xfer += $output->writeString($iter13);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->offset !== null) {
+      $xfer += $output->writeFieldBegin('offset', TType::I64, 3);
+      $xfer += $output->writeI64($this->offset);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->length !== null) {
+      $xfer += $output->writeFieldBegin('length', TType::I64, 4);
+      $xfer += $output->writeI64($this->length);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class MalformedInputException extends TException {
+  static $_TSPEC;
+
+  public $message = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        -1 => array(
+          'var' => 'message',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['message'])) {
+        $this->message = $vals['message'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'MalformedInputException';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case -1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->message);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('MalformedInputException');
+    if ($this->message !== null) {
+      $xfer += $output->writeFieldBegin('message', TType::STRING, -1);
+      $xfer += $output->writeString($this->message);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftIOException extends TException {
+  static $_TSPEC;
+
+  public $message = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        -1 => array(
+          'var' => 'message',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['message'])) {
+        $this->message = $vals['message'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftIOException';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case -1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->message);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftIOException');
+    if ($this->message !== null) {
+      $xfer += $output->writeFieldBegin('message', TType::STRING, -1);
+      $xfer += $output->writeString($this->message);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+?>

+ 0 - 0
src/contrib/thriftfs/gen-py/__init__.py


+ 205 - 0
src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem-remote

@@ -0,0 +1,205 @@
+#!/usr/bin/env python
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+import sys
+import pprint
+from urlparse import urlparse
+from thrift.transport import TTransport
+from thrift.transport import TSocket
+from thrift.transport import THttpClient
+from thrift.protocol import TBinaryProtocol
+
+import ThriftHadoopFileSystem
+from ttypes import *
+
+if len(sys.argv) <= 1 or sys.argv[1] == '--help':
+  print ''
+  print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
+  print ''
+  print 'Functions:'
+  print '  void setInactivityTimeoutPeriod(i64 periodInSeconds)'
+  print '  void shutdown(i32 status)'
+  print '  ThriftHandle create(Pathname path)'
+  print '  ThriftHandle createFile(Pathname path, i16 mode, bool overwrite, i32 bufferSize, i16 block_replication, i64 blocksize)'
+  print '  ThriftHandle open(Pathname path)'
+  print '  ThriftHandle append(Pathname path)'
+  print '  bool write(ThriftHandle handle, string data)'
+  print '  string read(ThriftHandle handle, i64 offset, i32 size)'
+  print '  bool close(ThriftHandle out)'
+  print '  bool rm(Pathname path, bool recursive)'
+  print '  bool rename(Pathname path, Pathname dest)'
+  print '  bool mkdirs(Pathname path)'
+  print '  bool exists(Pathname path)'
+  print '  FileStatus stat(Pathname path)'
+  print '   listStatus(Pathname path)'
+  print '  void chmod(Pathname path, i16 mode)'
+  print '  void chown(Pathname path, string owner, string group)'
+  print '  void setReplication(Pathname path, i16 replication)'
+  print '   getFileBlockLocations(Pathname path, i64 start, i64 length)'
+  print ''
+  sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent = 2)
+host = 'localhost'
+port = 9090
+uri = ''
+framed = False
+http = False
+argi = 1
+
+if sys.argv[argi] == '-h':
+  parts = sys.argv[argi+1].split(':') 
+  host = parts[0]
+  port = int(parts[1])
+  argi += 2
+
+if sys.argv[argi] == '-u':
+  url = urlparse(sys.argv[argi+1])
+  parts = url[1].split(':') 
+  host = parts[0]
+  if len(parts) > 1:
+    port = int(parts[1])
+  else:
+    port = 80
+  uri = url[2]
+  http = True
+  argi += 2
+
+if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
+  framed = True
+  argi += 1
+
+cmd = sys.argv[argi]
+args = sys.argv[argi+1:]
+
+if http:
+  transport = THttpClient.THttpClient(host, port, uri)
+else:
+  socket = TSocket.TSocket(host, port)
+  if framed:
+    transport = TTransport.TFramedTransport(socket)
+  else:
+    transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol.TBinaryProtocol(transport)
+client = ThriftHadoopFileSystem.Client(protocol)
+transport.open()
+
+if cmd == 'setInactivityTimeoutPeriod':
+  if len(args) != 1:
+    print 'setInactivityTimeoutPeriod requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.setInactivityTimeoutPeriod(eval(args[0]),))
+
+elif cmd == 'shutdown':
+  if len(args) != 1:
+    print 'shutdown requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.shutdown(eval(args[0]),))
+
+elif cmd == 'create':
+  if len(args) != 1:
+    print 'create requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.create(eval(args[0]),))
+
+elif cmd == 'createFile':
+  if len(args) != 6:
+    print 'createFile requires 6 args'
+    sys.exit(1)
+  pp.pprint(client.createFile(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),))
+
+elif cmd == 'open':
+  if len(args) != 1:
+    print 'open requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.open(eval(args[0]),))
+
+elif cmd == 'append':
+  if len(args) != 1:
+    print 'append requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.append(eval(args[0]),))
+
+elif cmd == 'write':
+  if len(args) != 2:
+    print 'write requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.write(eval(args[0]),args[1],))
+
+elif cmd == 'read':
+  if len(args) != 3:
+    print 'read requires 3 args'
+    sys.exit(1)
+  pp.pprint(client.read(eval(args[0]),eval(args[1]),eval(args[2]),))
+
+elif cmd == 'close':
+  if len(args) != 1:
+    print 'close requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.close(eval(args[0]),))
+
+elif cmd == 'rm':
+  if len(args) != 2:
+    print 'rm requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.rm(eval(args[0]),eval(args[1]),))
+
+elif cmd == 'rename':
+  if len(args) != 2:
+    print 'rename requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.rename(eval(args[0]),eval(args[1]),))
+
+elif cmd == 'mkdirs':
+  if len(args) != 1:
+    print 'mkdirs requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.mkdirs(eval(args[0]),))
+
+elif cmd == 'exists':
+  if len(args) != 1:
+    print 'exists requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.exists(eval(args[0]),))
+
+elif cmd == 'stat':
+  if len(args) != 1:
+    print 'stat requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.stat(eval(args[0]),))
+
+elif cmd == 'listStatus':
+  if len(args) != 1:
+    print 'listStatus requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.listStatus(eval(args[0]),))
+
+elif cmd == 'chmod':
+  if len(args) != 2:
+    print 'chmod requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.chmod(eval(args[0]),eval(args[1]),))
+
+elif cmd == 'chown':
+  if len(args) != 3:
+    print 'chown requires 3 args'
+    sys.exit(1)
+  pp.pprint(client.chown(eval(args[0]),args[1],args[2],))
+
+elif cmd == 'setReplication':
+  if len(args) != 2:
+    print 'setReplication requires 2 args'
+    sys.exit(1)
+  pp.pprint(client.setReplication(eval(args[0]),eval(args[1]),))
+
+elif cmd == 'getFileBlockLocations':
+  if len(args) != 3:
+    print 'getFileBlockLocations requires 3 args'
+    sys.exit(1)
+  pp.pprint(client.getFileBlockLocations(eval(args[0]),eval(args[1]),eval(args[2]),))
+
+transport.close()

+ 3444 - 0
src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.py

@@ -0,0 +1,3444 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+from ttypes import *
+from thrift.Thrift import TProcessor
+from thrift.transport import TTransport
+from thrift.protocol import TBinaryProtocol
+try:
+  from thrift.protocol import fastbinary
+except:
+  fastbinary = None
+
+
+class Iface:
+  def setInactivityTimeoutPeriod(self, periodInSeconds):
+    pass
+
+  def shutdown(self, status):
+    pass
+
+  def create(self, path):
+    pass
+
+  def createFile(self, path, mode, overwrite, bufferSize, block_replication, blocksize):
+    pass
+
+  def open(self, path):
+    pass
+
+  def append(self, path):
+    pass
+
+  def write(self, handle, data):
+    pass
+
+  def read(self, handle, offset, size):
+    pass
+
+  def close(self, out):
+    pass
+
+  def rm(self, path, recursive):
+    pass
+
+  def rename(self, path, dest):
+    pass
+
+  def mkdirs(self, path):
+    pass
+
+  def exists(self, path):
+    pass
+
+  def stat(self, path):
+    pass
+
+  def listStatus(self, path):
+    pass
+
+  def chmod(self, path, mode):
+    pass
+
+  def chown(self, path, owner, group):
+    pass
+
+  def setReplication(self, path, replication):
+    pass
+
+  def getFileBlockLocations(self, path, start, length):
+    pass
+
+
+class Client(Iface):
+  def __init__(self, iprot, oprot=None):
+    self._iprot = self._oprot = iprot
+    if oprot != None:
+      self._oprot = oprot
+    self._seqid = 0
+
+  def setInactivityTimeoutPeriod(self, periodInSeconds):
+    self.send_setInactivityTimeoutPeriod(periodInSeconds)
+    self.recv_setInactivityTimeoutPeriod()
+
+  def send_setInactivityTimeoutPeriod(self, periodInSeconds):
+    self._oprot.writeMessageBegin('setInactivityTimeoutPeriod', TMessageType.CALL, self._seqid)
+    args = setInactivityTimeoutPeriod_args()
+    args.periodInSeconds = periodInSeconds
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_setInactivityTimeoutPeriod(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = setInactivityTimeoutPeriod_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    return
+
+  def shutdown(self, status):
+    self.send_shutdown(status)
+    self.recv_shutdown()
+
+  def send_shutdown(self, status):
+    self._oprot.writeMessageBegin('shutdown', TMessageType.CALL, self._seqid)
+    args = shutdown_args()
+    args.status = status
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_shutdown(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = shutdown_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    return
+
+  def create(self, path):
+    self.send_create(path)
+    return self.recv_create()
+
+  def send_create(self, path):
+    self._oprot.writeMessageBegin('create', TMessageType.CALL, self._seqid)
+    args = create_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_create(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = create_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "create failed: unknown result");
+
+  def createFile(self, path, mode, overwrite, bufferSize, block_replication, blocksize):
+    self.send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
+    return self.recv_createFile()
+
+  def send_createFile(self, path, mode, overwrite, bufferSize, block_replication, blocksize):
+    self._oprot.writeMessageBegin('createFile', TMessageType.CALL, self._seqid)
+    args = createFile_args()
+    args.path = path
+    args.mode = mode
+    args.overwrite = overwrite
+    args.bufferSize = bufferSize
+    args.block_replication = block_replication
+    args.blocksize = blocksize
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_createFile(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = createFile_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "createFile failed: unknown result");
+
+  def open(self, path):
+    self.send_open(path)
+    return self.recv_open()
+
+  def send_open(self, path):
+    self._oprot.writeMessageBegin('open', TMessageType.CALL, self._seqid)
+    args = open_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_open(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = open_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "open failed: unknown result");
+
+  def append(self, path):
+    self.send_append(path)
+    return self.recv_append()
+
+  def send_append(self, path):
+    self._oprot.writeMessageBegin('append', TMessageType.CALL, self._seqid)
+    args = append_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_append(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = append_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "append failed: unknown result");
+
+  def write(self, handle, data):
+    self.send_write(handle, data)
+    return self.recv_write()
+
+  def send_write(self, handle, data):
+    self._oprot.writeMessageBegin('write', TMessageType.CALL, self._seqid)
+    args = write_args()
+    args.handle = handle
+    args.data = data
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_write(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = write_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "write failed: unknown result");
+
+  def read(self, handle, offset, size):
+    self.send_read(handle, offset, size)
+    return self.recv_read()
+
+  def send_read(self, handle, offset, size):
+    self._oprot.writeMessageBegin('read', TMessageType.CALL, self._seqid)
+    args = read_args()
+    args.handle = handle
+    args.offset = offset
+    args.size = size
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_read(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = read_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "read failed: unknown result");
+
+  def close(self, out):
+    self.send_close(out)
+    return self.recv_close()
+
+  def send_close(self, out):
+    self._oprot.writeMessageBegin('close', TMessageType.CALL, self._seqid)
+    args = close_args()
+    args.out = out
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_close(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = close_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "close failed: unknown result");
+
+  def rm(self, path, recursive):
+    self.send_rm(path, recursive)
+    return self.recv_rm()
+
+  def send_rm(self, path, recursive):
+    self._oprot.writeMessageBegin('rm', TMessageType.CALL, self._seqid)
+    args = rm_args()
+    args.path = path
+    args.recursive = recursive
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_rm(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = rm_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "rm failed: unknown result");
+
+  def rename(self, path, dest):
+    self.send_rename(path, dest)
+    return self.recv_rename()
+
+  def send_rename(self, path, dest):
+    self._oprot.writeMessageBegin('rename', TMessageType.CALL, self._seqid)
+    args = rename_args()
+    args.path = path
+    args.dest = dest
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_rename(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = rename_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "rename failed: unknown result");
+
+  def mkdirs(self, path):
+    self.send_mkdirs(path)
+    return self.recv_mkdirs()
+
+  def send_mkdirs(self, path):
+    self._oprot.writeMessageBegin('mkdirs', TMessageType.CALL, self._seqid)
+    args = mkdirs_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_mkdirs(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = mkdirs_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "mkdirs failed: unknown result");
+
+  def exists(self, path):
+    self.send_exists(path)
+    return self.recv_exists()
+
+  def send_exists(self, path):
+    self._oprot.writeMessageBegin('exists', TMessageType.CALL, self._seqid)
+    args = exists_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_exists(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = exists_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "exists failed: unknown result");
+
+  def stat(self, path):
+    self.send_stat(path)
+    return self.recv_stat()
+
+  def send_stat(self, path):
+    self._oprot.writeMessageBegin('stat', TMessageType.CALL, self._seqid)
+    args = stat_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_stat(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = stat_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "stat failed: unknown result");
+
+  def listStatus(self, path):
+    self.send_listStatus(path)
+    return self.recv_listStatus()
+
+  def send_listStatus(self, path):
+    self._oprot.writeMessageBegin('listStatus', TMessageType.CALL, self._seqid)
+    args = listStatus_args()
+    args.path = path
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_listStatus(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = listStatus_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "listStatus failed: unknown result");
+
+  def chmod(self, path, mode):
+    self.send_chmod(path, mode)
+    self.recv_chmod()
+
+  def send_chmod(self, path, mode):
+    self._oprot.writeMessageBegin('chmod', TMessageType.CALL, self._seqid)
+    args = chmod_args()
+    args.path = path
+    args.mode = mode
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_chmod(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = chmod_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.ouch != None:
+      raise result.ouch
+    return
+
+  def chown(self, path, owner, group):
+    self.send_chown(path, owner, group)
+    self.recv_chown()
+
+  def send_chown(self, path, owner, group):
+    self._oprot.writeMessageBegin('chown', TMessageType.CALL, self._seqid)
+    args = chown_args()
+    args.path = path
+    args.owner = owner
+    args.group = group
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_chown(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = chown_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.ouch != None:
+      raise result.ouch
+    return
+
+  def setReplication(self, path, replication):
+    self.send_setReplication(path, replication)
+    self.recv_setReplication()
+
+  def send_setReplication(self, path, replication):
+    self._oprot.writeMessageBegin('setReplication', TMessageType.CALL, self._seqid)
+    args = setReplication_args()
+    args.path = path
+    args.replication = replication
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_setReplication(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = setReplication_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.ouch != None:
+      raise result.ouch
+    return
+
+  def getFileBlockLocations(self, path, start, length):
+    self.send_getFileBlockLocations(path, start, length)
+    return self.recv_getFileBlockLocations()
+
+  def send_getFileBlockLocations(self, path, start, length):
+    self._oprot.writeMessageBegin('getFileBlockLocations', TMessageType.CALL, self._seqid)
+    args = getFileBlockLocations_args()
+    args.path = path
+    args.start = start
+    args.length = length
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_getFileBlockLocations(self, ):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = getFileBlockLocations_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success != None:
+      return result.success
+    if result.ouch != None:
+      raise result.ouch
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileBlockLocations failed: unknown result");
+
+
+class Processor(Iface, TProcessor):
+  def __init__(self, handler):
+    self._handler = handler
+    self._processMap = {}
+    self._processMap["setInactivityTimeoutPeriod"] = Processor.process_setInactivityTimeoutPeriod
+    self._processMap["shutdown"] = Processor.process_shutdown
+    self._processMap["create"] = Processor.process_create
+    self._processMap["createFile"] = Processor.process_createFile
+    self._processMap["open"] = Processor.process_open
+    self._processMap["append"] = Processor.process_append
+    self._processMap["write"] = Processor.process_write
+    self._processMap["read"] = Processor.process_read
+    self._processMap["close"] = Processor.process_close
+    self._processMap["rm"] = Processor.process_rm
+    self._processMap["rename"] = Processor.process_rename
+    self._processMap["mkdirs"] = Processor.process_mkdirs
+    self._processMap["exists"] = Processor.process_exists
+    self._processMap["stat"] = Processor.process_stat
+    self._processMap["listStatus"] = Processor.process_listStatus
+    self._processMap["chmod"] = Processor.process_chmod
+    self._processMap["chown"] = Processor.process_chown
+    self._processMap["setReplication"] = Processor.process_setReplication
+    self._processMap["getFileBlockLocations"] = Processor.process_getFileBlockLocations
+
+  def process(self, iprot, oprot):
+    (name, type, seqid) = iprot.readMessageBegin()
+    if name not in self._processMap:
+      iprot.skip(TType.STRUCT)
+      iprot.readMessageEnd()
+      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
+      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
+      x.write(oprot)
+      oprot.writeMessageEnd()
+      oprot.trans.flush()
+      return
+    else:
+      self._processMap[name](self, seqid, iprot, oprot)
+    return True
+
+  def process_setInactivityTimeoutPeriod(self, seqid, iprot, oprot):
+    args = setInactivityTimeoutPeriod_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = setInactivityTimeoutPeriod_result()
+    self._handler.setInactivityTimeoutPeriod(args.periodInSeconds)
+    oprot.writeMessageBegin("setInactivityTimeoutPeriod", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_shutdown(self, seqid, iprot, oprot):
+    args = shutdown_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = shutdown_result()
+    self._handler.shutdown(args.status)
+    oprot.writeMessageBegin("shutdown", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_create(self, seqid, iprot, oprot):
+    args = create_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = create_result()
+    try:
+      result.success = self._handler.create(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("create", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_createFile(self, seqid, iprot, oprot):
+    args = createFile_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = createFile_result()
+    try:
+      result.success = self._handler.createFile(args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("createFile", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_open(self, seqid, iprot, oprot):
+    args = open_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = open_result()
+    try:
+      result.success = self._handler.open(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("open", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_append(self, seqid, iprot, oprot):
+    args = append_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = append_result()
+    try:
+      result.success = self._handler.append(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("append", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_write(self, seqid, iprot, oprot):
+    args = write_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = write_result()
+    try:
+      result.success = self._handler.write(args.handle, args.data)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("write", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_read(self, seqid, iprot, oprot):
+    args = read_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = read_result()
+    try:
+      result.success = self._handler.read(args.handle, args.offset, args.size)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("read", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_close(self, seqid, iprot, oprot):
+    args = close_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = close_result()
+    try:
+      result.success = self._handler.close(args.out)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("close", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_rm(self, seqid, iprot, oprot):
+    args = rm_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = rm_result()
+    try:
+      result.success = self._handler.rm(args.path, args.recursive)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("rm", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_rename(self, seqid, iprot, oprot):
+    args = rename_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = rename_result()
+    try:
+      result.success = self._handler.rename(args.path, args.dest)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("rename", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_mkdirs(self, seqid, iprot, oprot):
+    args = mkdirs_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = mkdirs_result()
+    try:
+      result.success = self._handler.mkdirs(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("mkdirs", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_exists(self, seqid, iprot, oprot):
+    args = exists_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = exists_result()
+    try:
+      result.success = self._handler.exists(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("exists", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_stat(self, seqid, iprot, oprot):
+    args = stat_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = stat_result()
+    try:
+      result.success = self._handler.stat(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("stat", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_listStatus(self, seqid, iprot, oprot):
+    args = listStatus_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = listStatus_result()
+    try:
+      result.success = self._handler.listStatus(args.path)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("listStatus", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_chmod(self, seqid, iprot, oprot):
+    args = chmod_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = chmod_result()
+    try:
+      self._handler.chmod(args.path, args.mode)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("chmod", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_chown(self, seqid, iprot, oprot):
+    args = chown_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = chown_result()
+    try:
+      self._handler.chown(args.path, args.owner, args.group)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("chown", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_setReplication(self, seqid, iprot, oprot):
+    args = setReplication_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = setReplication_result()
+    try:
+      self._handler.setReplication(args.path, args.replication)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("setReplication", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_getFileBlockLocations(self, seqid, iprot, oprot):
+    args = getFileBlockLocations_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = getFileBlockLocations_result()
+    try:
+      result.success = self._handler.getFileBlockLocations(args.path, args.start, args.length)
+    except ThriftIOException, ouch:
+      result.ouch = ouch
+    oprot.writeMessageBegin("getFileBlockLocations", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+
+# HELPER FUNCTIONS AND STRUCTURES
+
+class setInactivityTimeoutPeriod_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.I64, 'periodInSeconds', None, None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.periodInSeconds = None
+    if isinstance(d, dict):
+      if 'periodInSeconds' in d:
+        self.periodInSeconds = d['periodInSeconds']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.I64:
+          self.periodInSeconds = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('setInactivityTimeoutPeriod_args')
+    if self.periodInSeconds != None:
+      oprot.writeFieldBegin('periodInSeconds', TType.I64, 1)
+      oprot.writeI64(self.periodInSeconds)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class setInactivityTimeoutPeriod_result:
+
+  thrift_spec = (
+  )
+
+  def __init__(self, d=None):
+    pass
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('setInactivityTimeoutPeriod_result')
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class shutdown_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.I32, 'status', None, None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.status = None
+    if isinstance(d, dict):
+      if 'status' in d:
+        self.status = d['status']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.I32:
+          self.status = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('shutdown_args')
+    if self.status != None:
+      oprot.writeFieldBegin('status', TType.I32, 1)
+      oprot.writeI32(self.status)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class shutdown_result:
+
+  thrift_spec = (
+  )
+
+  def __init__(self, d=None):
+    pass
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('shutdown_result')
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class create_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('create_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class create_result:
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (ThriftHandle, ThriftHandle.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = ThriftHandle()
+          self.success.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('create_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class createFile_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.I16, 'mode', None, None, ), # 2
+    (3, TType.BOOL, 'overwrite', None, None, ), # 3
+    (4, TType.I32, 'bufferSize', None, None, ), # 4
+    (5, TType.I16, 'block_replication', None, None, ), # 5
+    (6, TType.I64, 'blocksize', None, None, ), # 6
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.mode = None
+    self.overwrite = None
+    self.bufferSize = None
+    self.block_replication = None
+    self.blocksize = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'mode' in d:
+        self.mode = d['mode']
+      if 'overwrite' in d:
+        self.overwrite = d['overwrite']
+      if 'bufferSize' in d:
+        self.bufferSize = d['bufferSize']
+      if 'block_replication' in d:
+        self.block_replication = d['block_replication']
+      if 'blocksize' in d:
+        self.blocksize = d['blocksize']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I16:
+          self.mode = iprot.readI16();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.BOOL:
+          self.overwrite = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.I32:
+          self.bufferSize = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.I16:
+          self.block_replication = iprot.readI16();
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
+        if ftype == TType.I64:
+          self.blocksize = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('createFile_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.mode != None:
+      oprot.writeFieldBegin('mode', TType.I16, 2)
+      oprot.writeI16(self.mode)
+      oprot.writeFieldEnd()
+    if self.overwrite != None:
+      oprot.writeFieldBegin('overwrite', TType.BOOL, 3)
+      oprot.writeBool(self.overwrite)
+      oprot.writeFieldEnd()
+    if self.bufferSize != None:
+      oprot.writeFieldBegin('bufferSize', TType.I32, 4)
+      oprot.writeI32(self.bufferSize)
+      oprot.writeFieldEnd()
+    if self.block_replication != None:
+      oprot.writeFieldBegin('block_replication', TType.I16, 5)
+      oprot.writeI16(self.block_replication)
+      oprot.writeFieldEnd()
+    if self.blocksize != None:
+      oprot.writeFieldBegin('blocksize', TType.I64, 6)
+      oprot.writeI64(self.blocksize)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class createFile_result:
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (ThriftHandle, ThriftHandle.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = ThriftHandle()
+          self.success.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('createFile_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class open_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('open_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class open_result:
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (ThriftHandle, ThriftHandle.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = ThriftHandle()
+          self.success.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('open_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class append_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('append_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class append_result:
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (ThriftHandle, ThriftHandle.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = ThriftHandle()
+          self.success.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('append_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class write_args:
+
+  thrift_spec = None
+  def __init__(self, d=None):
+    self.handle = None
+    self.data = None
+    if isinstance(d, dict):
+      if 'handle' in d:
+        self.handle = d['handle']
+      if 'data' in d:
+        self.data = d['data']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.handle = ThriftHandle()
+          self.handle.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == -1:
+        if ftype == TType.STRING:
+          self.data = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('write_args')
+    if self.handle != None:
+      oprot.writeFieldBegin('handle', TType.STRUCT, 1)
+      self.handle.write(oprot)
+      oprot.writeFieldEnd()
+    if self.data != None:
+      oprot.writeFieldBegin('data', TType.STRING, -1)
+      oprot.writeString(self.data)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class write_result:
+
+  thrift_spec = (
+    (0, TType.BOOL, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.BOOL:
+          self.success = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('write_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.BOOL, 0)
+      oprot.writeBool(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class read_args:
+
+  thrift_spec = None
+  def __init__(self, d=None):
+    self.handle = None
+    self.offset = None
+    self.size = None
+    if isinstance(d, dict):
+      if 'handle' in d:
+        self.handle = d['handle']
+      if 'offset' in d:
+        self.offset = d['offset']
+      if 'size' in d:
+        self.size = d['size']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.handle = ThriftHandle()
+          self.handle.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == -1:
+        if ftype == TType.I64:
+          self.offset = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == -2:
+        if ftype == TType.I32:
+          self.size = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('read_args')
+    if self.handle != None:
+      oprot.writeFieldBegin('handle', TType.STRUCT, 1)
+      self.handle.write(oprot)
+      oprot.writeFieldEnd()
+    if self.offset != None:
+      oprot.writeFieldBegin('offset', TType.I64, -1)
+      oprot.writeI64(self.offset)
+      oprot.writeFieldEnd()
+    if self.size != None:
+      oprot.writeFieldBegin('size', TType.I32, -2)
+      oprot.writeI32(self.size)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class read_result:
+
+  thrift_spec = (
+    (0, TType.STRING, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRING:
+          self.success = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('read_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.STRING, 0)
+      oprot.writeString(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class close_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'out', (ThriftHandle, ThriftHandle.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.out = None
+    if isinstance(d, dict):
+      if 'out' in d:
+        self.out = d['out']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.out = ThriftHandle()
+          self.out.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('close_args')
+    if self.out != None:
+      oprot.writeFieldBegin('out', TType.STRUCT, 1)
+      self.out.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class close_result:
+
+  thrift_spec = (
+    (0, TType.BOOL, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.BOOL:
+          self.success = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('close_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.BOOL, 0)
+      oprot.writeBool(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class rm_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.BOOL, 'recursive', None, None, ), # 2
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.recursive = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'recursive' in d:
+        self.recursive = d['recursive']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.BOOL:
+          self.recursive = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('rm_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.recursive != None:
+      oprot.writeFieldBegin('recursive', TType.BOOL, 2)
+      oprot.writeBool(self.recursive)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class rm_result:
+
+  thrift_spec = (
+    (0, TType.BOOL, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.BOOL:
+          self.success = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('rm_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.BOOL, 0)
+      oprot.writeBool(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class rename_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.STRUCT, 'dest', (Pathname, Pathname.thrift_spec), None, ), # 2
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.dest = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'dest' in d:
+        self.dest = d['dest']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRUCT:
+          self.dest = Pathname()
+          self.dest.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('rename_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.dest != None:
+      oprot.writeFieldBegin('dest', TType.STRUCT, 2)
+      self.dest.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class rename_result:
+
+  thrift_spec = (
+    (0, TType.BOOL, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.BOOL:
+          self.success = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('rename_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.BOOL, 0)
+      oprot.writeBool(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class mkdirs_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('mkdirs_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class mkdirs_result:
+
+  thrift_spec = (
+    (0, TType.BOOL, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.BOOL:
+          self.success = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('mkdirs_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.BOOL, 0)
+      oprot.writeBool(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class exists_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('exists_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class exists_result:
+
+  thrift_spec = (
+    (0, TType.BOOL, 'success', None, None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.BOOL:
+          self.success = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('exists_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.BOOL, 0)
+      oprot.writeBool(self.success)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class stat_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('stat_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class stat_result:
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (FileStatus, FileStatus.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = FileStatus()
+          self.success.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('stat_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class listStatus_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('listStatus_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class listStatus_result:
+
+  thrift_spec = (
+    (0, TType.LIST, 'success', (TType.STRUCT,(FileStatus, FileStatus.thrift_spec)), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.LIST:
+          self.success = []
+          (_etype17, _size14) = iprot.readListBegin()
+          for _i18 in xrange(_size14):
+            _elem19 = FileStatus()
+            _elem19.read(iprot)
+            self.success.append(_elem19)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('listStatus_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.LIST, 0)
+      oprot.writeListBegin(TType.STRUCT, len(self.success))
+      for iter20 in self.success:
+        iter20.write(oprot)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class chmod_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.I16, 'mode', None, None, ), # 2
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.mode = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'mode' in d:
+        self.mode = d['mode']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I16:
+          self.mode = iprot.readI16();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('chmod_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.mode != None:
+      oprot.writeFieldBegin('mode', TType.I16, 2)
+      oprot.writeI16(self.mode)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class chmod_result:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('chmod_result')
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class chown_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.STRING, 'owner', None, None, ), # 2
+    (3, TType.STRING, 'group', None, None, ), # 3
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.owner = None
+    self.group = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'owner' in d:
+        self.owner = d['owner']
+      if 'group' in d:
+        self.group = d['group']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.owner = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.STRING:
+          self.group = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('chown_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.owner != None:
+      oprot.writeFieldBegin('owner', TType.STRING, 2)
+      oprot.writeString(self.owner)
+      oprot.writeFieldEnd()
+    if self.group != None:
+      oprot.writeFieldBegin('group', TType.STRING, 3)
+      oprot.writeString(self.group)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class chown_result:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('chown_result')
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class setReplication_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.I16, 'replication', None, None, ), # 2
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.replication = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'replication' in d:
+        self.replication = d['replication']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I16:
+          self.replication = iprot.readI16();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('setReplication_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.replication != None:
+      oprot.writeFieldBegin('replication', TType.I16, 2)
+      oprot.writeI16(self.replication)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class setReplication_result:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('setReplication_result')
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class getFileBlockLocations_args:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'path', (Pathname, Pathname.thrift_spec), None, ), # 1
+    (2, TType.I64, 'start', None, None, ), # 2
+    (3, TType.I64, 'length', None, None, ), # 3
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.start = None
+    self.length = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'start' in d:
+        self.start = d['start']
+      if 'length' in d:
+        self.length = d['length']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.path = Pathname()
+          self.path.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I64:
+          self.start = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.I64:
+          self.length = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('getFileBlockLocations_args')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRUCT, 1)
+      self.path.write(oprot)
+      oprot.writeFieldEnd()
+    if self.start != None:
+      oprot.writeFieldBegin('start', TType.I64, 2)
+      oprot.writeI64(self.start)
+      oprot.writeFieldEnd()
+    if self.length != None:
+      oprot.writeFieldBegin('length', TType.I64, 3)
+      oprot.writeI64(self.length)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class getFileBlockLocations_result:
+
+  thrift_spec = (
+    (0, TType.LIST, 'success', (TType.STRUCT,(BlockLocation, BlockLocation.thrift_spec)), None, ), # 0
+    (1, TType.STRUCT, 'ouch', (ThriftIOException, ThriftIOException.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, d=None):
+    self.success = None
+    self.ouch = None
+    if isinstance(d, dict):
+      if 'success' in d:
+        self.success = d['success']
+      if 'ouch' in d:
+        self.ouch = d['ouch']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.LIST:
+          self.success = []
+          (_etype24, _size21) = iprot.readListBegin()
+          for _i25 in xrange(_size21):
+            _elem26 = BlockLocation()
+            _elem26.read(iprot)
+            self.success.append(_elem26)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ouch = ThriftIOException()
+          self.ouch.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('getFileBlockLocations_result')
+    if self.success != None:
+      oprot.writeFieldBegin('success', TType.LIST, 0)
+      oprot.writeListBegin(TType.STRUCT, len(self.success))
+      for iter27 in self.success:
+        iter27.write(oprot)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.ouch != None:
+      oprot.writeFieldBegin('ouch', TType.STRUCT, 1)
+      self.ouch.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+

BIN
src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.pyc


+ 1 - 0
src/contrib/thriftfs/gen-py/hadoopfs/__init__.py

@@ -0,0 +1 @@
+__all__ = ['ttypes', 'constants', 'ThriftHadoopFileSystem']

BIN
src/contrib/thriftfs/gen-py/hadoopfs/__init__.pyc


+ 9 - 0
src/contrib/thriftfs/gen-py/hadoopfs/constants.py

@@ -0,0 +1,9 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+from ttypes import *
+

+ 495 - 0
src/contrib/thriftfs/gen-py/hadoopfs/ttypes.py

@@ -0,0 +1,495 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+
+from thrift.transport import TTransport
+from thrift.protocol import TBinaryProtocol
+try:
+  from thrift.protocol import fastbinary
+except:
+  fastbinary = None
+
+
+class ThriftHandle:
+
+  thrift_spec = None
+  def __init__(self, d=None):
+    self.id = None
+    if isinstance(d, dict):
+      if 'id' in d:
+        self.id = d['id']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == -1:
+        if ftype == TType.I64:
+          self.id = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('ThriftHandle')
+    if self.id != None:
+      oprot.writeFieldBegin('id', TType.I64, -1)
+      oprot.writeI64(self.id)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class Pathname:
+
+  thrift_spec = None
+  def __init__(self, d=None):
+    self.pathname = None
+    if isinstance(d, dict):
+      if 'pathname' in d:
+        self.pathname = d['pathname']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == -1:
+        if ftype == TType.STRING:
+          self.pathname = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('Pathname')
+    if self.pathname != None:
+      oprot.writeFieldBegin('pathname', TType.STRING, -1)
+      oprot.writeString(self.pathname)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class FileStatus:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'path', None, None, ), # 1
+    (2, TType.I64, 'length', None, None, ), # 2
+    (3, TType.BOOL, 'isdir', None, None, ), # 3
+    (4, TType.I16, 'block_replication', None, None, ), # 4
+    (5, TType.I64, 'blocksize', None, None, ), # 5
+    (6, TType.I64, 'modification_time', None, None, ), # 6
+    (7, TType.STRING, 'permission', None, None, ), # 7
+    (8, TType.STRING, 'owner', None, None, ), # 8
+    (9, TType.STRING, 'group', None, None, ), # 9
+  )
+
+  def __init__(self, d=None):
+    self.path = None
+    self.length = None
+    self.isdir = None
+    self.block_replication = None
+    self.blocksize = None
+    self.modification_time = None
+    self.permission = None
+    self.owner = None
+    self.group = None
+    if isinstance(d, dict):
+      if 'path' in d:
+        self.path = d['path']
+      if 'length' in d:
+        self.length = d['length']
+      if 'isdir' in d:
+        self.isdir = d['isdir']
+      if 'block_replication' in d:
+        self.block_replication = d['block_replication']
+      if 'blocksize' in d:
+        self.blocksize = d['blocksize']
+      if 'modification_time' in d:
+        self.modification_time = d['modification_time']
+      if 'permission' in d:
+        self.permission = d['permission']
+      if 'owner' in d:
+        self.owner = d['owner']
+      if 'group' in d:
+        self.group = d['group']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.path = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.I64:
+          self.length = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.BOOL:
+          self.isdir = iprot.readBool();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.I16:
+          self.block_replication = iprot.readI16();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.I64:
+          self.blocksize = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
+        if ftype == TType.I64:
+          self.modification_time = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 7:
+        if ftype == TType.STRING:
+          self.permission = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 8:
+        if ftype == TType.STRING:
+          self.owner = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 9:
+        if ftype == TType.STRING:
+          self.group = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('FileStatus')
+    if self.path != None:
+      oprot.writeFieldBegin('path', TType.STRING, 1)
+      oprot.writeString(self.path)
+      oprot.writeFieldEnd()
+    if self.length != None:
+      oprot.writeFieldBegin('length', TType.I64, 2)
+      oprot.writeI64(self.length)
+      oprot.writeFieldEnd()
+    if self.isdir != None:
+      oprot.writeFieldBegin('isdir', TType.BOOL, 3)
+      oprot.writeBool(self.isdir)
+      oprot.writeFieldEnd()
+    if self.block_replication != None:
+      oprot.writeFieldBegin('block_replication', TType.I16, 4)
+      oprot.writeI16(self.block_replication)
+      oprot.writeFieldEnd()
+    if self.blocksize != None:
+      oprot.writeFieldBegin('blocksize', TType.I64, 5)
+      oprot.writeI64(self.blocksize)
+      oprot.writeFieldEnd()
+    if self.modification_time != None:
+      oprot.writeFieldBegin('modification_time', TType.I64, 6)
+      oprot.writeI64(self.modification_time)
+      oprot.writeFieldEnd()
+    if self.permission != None:
+      oprot.writeFieldBegin('permission', TType.STRING, 7)
+      oprot.writeString(self.permission)
+      oprot.writeFieldEnd()
+    if self.owner != None:
+      oprot.writeFieldBegin('owner', TType.STRING, 8)
+      oprot.writeString(self.owner)
+      oprot.writeFieldEnd()
+    if self.group != None:
+      oprot.writeFieldBegin('group', TType.STRING, 9)
+      oprot.writeString(self.group)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class BlockLocation:
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.LIST, 'hosts', (TType.STRING,None), None, ), # 1
+    (2, TType.LIST, 'names', (TType.STRING,None), None, ), # 2
+    (3, TType.I64, 'offset', None, None, ), # 3
+    (4, TType.I64, 'length', None, None, ), # 4
+  )
+
+  def __init__(self, d=None):
+    self.hosts = None
+    self.names = None
+    self.offset = None
+    self.length = None
+    if isinstance(d, dict):
+      if 'hosts' in d:
+        self.hosts = d['hosts']
+      if 'names' in d:
+        self.names = d['names']
+      if 'offset' in d:
+        self.offset = d['offset']
+      if 'length' in d:
+        self.length = d['length']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.LIST:
+          self.hosts = []
+          (_etype3, _size0) = iprot.readListBegin()
+          for _i4 in xrange(_size0):
+            _elem5 = iprot.readString();
+            self.hosts.append(_elem5)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.LIST:
+          self.names = []
+          (_etype9, _size6) = iprot.readListBegin()
+          for _i10 in xrange(_size6):
+            _elem11 = iprot.readString();
+            self.names.append(_elem11)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.I64:
+          self.offset = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.I64:
+          self.length = iprot.readI64();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('BlockLocation')
+    if self.hosts != None:
+      oprot.writeFieldBegin('hosts', TType.LIST, 1)
+      oprot.writeListBegin(TType.STRING, len(self.hosts))
+      for iter12 in self.hosts:
+        oprot.writeString(iter12)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.names != None:
+      oprot.writeFieldBegin('names', TType.LIST, 2)
+      oprot.writeListBegin(TType.STRING, len(self.names))
+      for iter13 in self.names:
+        oprot.writeString(iter13)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.offset != None:
+      oprot.writeFieldBegin('offset', TType.I64, 3)
+      oprot.writeI64(self.offset)
+      oprot.writeFieldEnd()
+    if self.length != None:
+      oprot.writeFieldBegin('length', TType.I64, 4)
+      oprot.writeI64(self.length)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class MalformedInputException(Exception):
+
+  thrift_spec = None
+  def __init__(self, d=None):
+    self.message = None
+    if isinstance(d, dict):
+      if 'message' in d:
+        self.message = d['message']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == -1:
+        if ftype == TType.STRING:
+          self.message = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('MalformedInputException')
+    if self.message != None:
+      oprot.writeFieldBegin('message', TType.STRING, -1)
+      oprot.writeString(self.message)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class ThriftIOException(Exception):
+
+  thrift_spec = None
+  def __init__(self, d=None):
+    self.message = None
+    if isinstance(d, dict):
+      if 'message' in d:
+        self.message = d['message']
+
+  def read(self, iprot):
+    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == -1:
+        if ftype == TType.STRING:
+          self.message = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('ThriftIOException')
+    if self.message != None:
+      oprot.writeFieldBegin('message', TType.STRING, -1)
+      oprot.writeString(self.message)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def __str__(self):
+    return str(self.__dict__)
+
+  def __repr__(self):
+    return repr(self.__dict__)
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+

BIN
src/contrib/thriftfs/gen-py/hadoopfs/ttypes.pyc


+ 855 - 0
src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb

@@ -0,0 +1,855 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'thrift/protocol'
+require 'thrift'
+require 'hadoopfs_types'
+
+module ThriftHadoopFileSystem
+  class Client
+    include Thrift::Client
+
+    def setInactivityTimeoutPeriod(periodInSeconds)
+      send_setInactivityTimeoutPeriod(periodInSeconds)
+      recv_setInactivityTimeoutPeriod()
+    end
+
+    def send_setInactivityTimeoutPeriod(periodInSeconds)
+      send_message('setInactivityTimeoutPeriod', SetInactivityTimeoutPeriod_args, :periodInSeconds => periodInSeconds)
+    end
+
+    def recv_setInactivityTimeoutPeriod()
+      result = receive_message(SetInactivityTimeoutPeriod_result)
+      return
+    end
+
+    def shutdown(status)
+      send_shutdown(status)
+      recv_shutdown()
+    end
+
+    def send_shutdown(status)
+      send_message('shutdown', Shutdown_args, :status => status)
+    end
+
+    def recv_shutdown()
+      result = receive_message(Shutdown_result)
+      return
+    end
+
+    def create(path)
+      send_create(path)
+      return recv_create()
+    end
+
+    def send_create(path)
+      send_message('create', Create_args, :path => path)
+    end
+
+    def recv_create()
+      result = receive_message(Create_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'create failed: unknown result')
+    end
+
+    def createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
+      send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
+      return recv_createFile()
+    end
+
+    def send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
+      send_message('createFile', CreateFile_args, :path => path, :mode => mode, :overwrite => overwrite, :bufferSize => bufferSize, :block_replication => block_replication, :blocksize => blocksize)
+    end
+
+    def recv_createFile()
+      result = receive_message(CreateFile_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'createFile failed: unknown result')
+    end
+
+    def open(path)
+      send_open(path)
+      return recv_open()
+    end
+
+    def send_open(path)
+      send_message('open', Open_args, :path => path)
+    end
+
+    def recv_open()
+      result = receive_message(Open_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'open failed: unknown result')
+    end
+
+    def append(path)
+      send_append(path)
+      return recv_append()
+    end
+
+    def send_append(path)
+      send_message('append', Append_args, :path => path)
+    end
+
+    def recv_append()
+      result = receive_message(Append_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'append failed: unknown result')
+    end
+
+    def write(handle, data)
+      send_write(handle, data)
+      return recv_write()
+    end
+
+    def send_write(handle, data)
+      send_message('write', Write_args, :handle => handle, :data => data)
+    end
+
+    def recv_write()
+      result = receive_message(Write_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'write failed: unknown result')
+    end
+
+    def read(handle, offset, size)
+      send_read(handle, offset, size)
+      return recv_read()
+    end
+
+    def send_read(handle, offset, size)
+      send_message('read', Read_args, :handle => handle, :offset => offset, :size => size)
+    end
+
+    def recv_read()
+      result = receive_message(Read_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'read failed: unknown result')
+    end
+
+    def close(out)
+      send_close(out)
+      return recv_close()
+    end
+
+    def send_close(out)
+      send_message('close', Close_args, :out => out)
+    end
+
+    def recv_close()
+      result = receive_message(Close_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'close failed: unknown result')
+    end
+
+    def rm(path, recursive)
+      send_rm(path, recursive)
+      return recv_rm()
+    end
+
+    def send_rm(path, recursive)
+      send_message('rm', Rm_args, :path => path, :recursive => recursive)
+    end
+
+    def recv_rm()
+      result = receive_message(Rm_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'rm failed: unknown result')
+    end
+
+    def rename(path, dest)
+      send_rename(path, dest)
+      return recv_rename()
+    end
+
+    def send_rename(path, dest)
+      send_message('rename', Rename_args, :path => path, :dest => dest)
+    end
+
+    def recv_rename()
+      result = receive_message(Rename_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'rename failed: unknown result')
+    end
+
+    def mkdirs(path)
+      send_mkdirs(path)
+      return recv_mkdirs()
+    end
+
+    def send_mkdirs(path)
+      send_message('mkdirs', Mkdirs_args, :path => path)
+    end
+
+    def recv_mkdirs()
+      result = receive_message(Mkdirs_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'mkdirs failed: unknown result')
+    end
+
+    def exists(path)
+      send_exists(path)
+      return recv_exists()
+    end
+
+    def send_exists(path)
+      send_message('exists', Exists_args, :path => path)
+    end
+
+    def recv_exists()
+      result = receive_message(Exists_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'exists failed: unknown result')
+    end
+
+    def stat(path)
+      send_stat(path)
+      return recv_stat()
+    end
+
+    def send_stat(path)
+      send_message('stat', Stat_args, :path => path)
+    end
+
+    def recv_stat()
+      result = receive_message(Stat_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'stat failed: unknown result')
+    end
+
+    def listStatus(path)
+      send_listStatus(path)
+      return recv_listStatus()
+    end
+
+    def send_listStatus(path)
+      send_message('listStatus', ListStatus_args, :path => path)
+    end
+
+    def recv_listStatus()
+      result = receive_message(ListStatus_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'listStatus failed: unknown result')
+    end
+
+    def chmod(path, mode)
+      send_chmod(path, mode)
+      recv_chmod()
+    end
+
+    def send_chmod(path, mode)
+      send_message('chmod', Chmod_args, :path => path, :mode => mode)
+    end
+
+    def recv_chmod()
+      result = receive_message(Chmod_result)
+      raise result.ouch unless result.ouch.nil?
+      return
+    end
+
+    def chown(path, owner, group)
+      send_chown(path, owner, group)
+      recv_chown()
+    end
+
+    def send_chown(path, owner, group)
+      send_message('chown', Chown_args, :path => path, :owner => owner, :group => group)
+    end
+
+    def recv_chown()
+      result = receive_message(Chown_result)
+      raise result.ouch unless result.ouch.nil?
+      return
+    end
+
+    def setReplication(path, replication)
+      send_setReplication(path, replication)
+      recv_setReplication()
+    end
+
+    def send_setReplication(path, replication)
+      send_message('setReplication', SetReplication_args, :path => path, :replication => replication)
+    end
+
+    def recv_setReplication()
+      result = receive_message(SetReplication_result)
+      raise result.ouch unless result.ouch.nil?
+      return
+    end
+
+    def getFileBlockLocations(path, start, length)
+      send_getFileBlockLocations(path, start, length)
+      return recv_getFileBlockLocations()
+    end
+
+    def send_getFileBlockLocations(path, start, length)
+      send_message('getFileBlockLocations', GetFileBlockLocations_args, :path => path, :start => start, :length => length)
+    end
+
+    def recv_getFileBlockLocations()
+      result = receive_message(GetFileBlockLocations_result)
+      return result.success unless result.success.nil?
+      raise result.ouch unless result.ouch.nil?
+      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getFileBlockLocations failed: unknown result')
+    end
+
+  end
+
+  class Processor
+    include Thrift::Processor
+
+    def process_setInactivityTimeoutPeriod(seqid, iprot, oprot)
+      args = read_args(iprot, SetInactivityTimeoutPeriod_args)
+      result = SetInactivityTimeoutPeriod_result.new()
+      @handler.setInactivityTimeoutPeriod(args.periodInSeconds)
+      write_result(result, oprot, 'setInactivityTimeoutPeriod', seqid)
+    end
+
+    def process_shutdown(seqid, iprot, oprot)
+      args = read_args(iprot, Shutdown_args)
+      result = Shutdown_result.new()
+      @handler.shutdown(args.status)
+      write_result(result, oprot, 'shutdown', seqid)
+    end
+
+    def process_create(seqid, iprot, oprot)
+      args = read_args(iprot, Create_args)
+      result = Create_result.new()
+      begin
+        result.success = @handler.create(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'create', seqid)
+    end
+
+    def process_createFile(seqid, iprot, oprot)
+      args = read_args(iprot, CreateFile_args)
+      result = CreateFile_result.new()
+      begin
+        result.success = @handler.createFile(args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'createFile', seqid)
+    end
+
+    def process_open(seqid, iprot, oprot)
+      args = read_args(iprot, Open_args)
+      result = Open_result.new()
+      begin
+        result.success = @handler.open(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'open', seqid)
+    end
+
+    def process_append(seqid, iprot, oprot)
+      args = read_args(iprot, Append_args)
+      result = Append_result.new()
+      begin
+        result.success = @handler.append(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'append', seqid)
+    end
+
+    def process_write(seqid, iprot, oprot)
+      args = read_args(iprot, Write_args)
+      result = Write_result.new()
+      begin
+        result.success = @handler.write(args.handle, args.data)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'write', seqid)
+    end
+
+    def process_read(seqid, iprot, oprot)
+      args = read_args(iprot, Read_args)
+      result = Read_result.new()
+      begin
+        result.success = @handler.read(args.handle, args.offset, args.size)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'read', seqid)
+    end
+
+    def process_close(seqid, iprot, oprot)
+      args = read_args(iprot, Close_args)
+      result = Close_result.new()
+      begin
+        result.success = @handler.close(args.out)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'close', seqid)
+    end
+
+    def process_rm(seqid, iprot, oprot)
+      args = read_args(iprot, Rm_args)
+      result = Rm_result.new()
+      begin
+        result.success = @handler.rm(args.path, args.recursive)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'rm', seqid)
+    end
+
+    def process_rename(seqid, iprot, oprot)
+      args = read_args(iprot, Rename_args)
+      result = Rename_result.new()
+      begin
+        result.success = @handler.rename(args.path, args.dest)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'rename', seqid)
+    end
+
+    def process_mkdirs(seqid, iprot, oprot)
+      args = read_args(iprot, Mkdirs_args)
+      result = Mkdirs_result.new()
+      begin
+        result.success = @handler.mkdirs(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'mkdirs', seqid)
+    end
+
+    def process_exists(seqid, iprot, oprot)
+      args = read_args(iprot, Exists_args)
+      result = Exists_result.new()
+      begin
+        result.success = @handler.exists(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'exists', seqid)
+    end
+
+    def process_stat(seqid, iprot, oprot)
+      args = read_args(iprot, Stat_args)
+      result = Stat_result.new()
+      begin
+        result.success = @handler.stat(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'stat', seqid)
+    end
+
+    def process_listStatus(seqid, iprot, oprot)
+      args = read_args(iprot, ListStatus_args)
+      result = ListStatus_result.new()
+      begin
+        result.success = @handler.listStatus(args.path)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'listStatus', seqid)
+    end
+
+    def process_chmod(seqid, iprot, oprot)
+      args = read_args(iprot, Chmod_args)
+      result = Chmod_result.new()
+      begin
+        @handler.chmod(args.path, args.mode)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'chmod', seqid)
+    end
+
+    def process_chown(seqid, iprot, oprot)
+      args = read_args(iprot, Chown_args)
+      result = Chown_result.new()
+      begin
+        @handler.chown(args.path, args.owner, args.group)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'chown', seqid)
+    end
+
+    def process_setReplication(seqid, iprot, oprot)
+      args = read_args(iprot, SetReplication_args)
+      result = SetReplication_result.new()
+      begin
+        @handler.setReplication(args.path, args.replication)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'setReplication', seqid)
+    end
+
+    def process_getFileBlockLocations(seqid, iprot, oprot)
+      args = read_args(iprot, GetFileBlockLocations_args)
+      result = GetFileBlockLocations_result.new()
+      begin
+        result.success = @handler.getFileBlockLocations(args.path, args.start, args.length)
+      rescue ThriftIOException => ouch
+        result.ouch = ouch
+      end
+      write_result(result, oprot, 'getFileBlockLocations', seqid)
+    end
+
+  end
+
+  # HELPER FUNCTIONS AND STRUCTURES
+
+  class SetInactivityTimeoutPeriod_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :periodInSeconds
+    FIELDS = {
+      1 => {:type => Thrift::Types::I64, :name => 'periodInSeconds'}
+    }
+  end
+
+  class SetInactivityTimeoutPeriod_result
+    include Thrift::Struct
+    FIELDS = {
+
+    }
+  end
+
+  class Shutdown_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :status
+    FIELDS = {
+      1 => {:type => Thrift::Types::I32, :name => 'status'}
+    }
+  end
+
+  class Shutdown_result
+    include Thrift::Struct
+    FIELDS = {
+
+    }
+  end
+
+  class Create_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class Create_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class CreateFile_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :mode, :overwrite, :bufferSize, :block_replication, :blocksize
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::I16, :name => 'mode'},
+      3 => {:type => Thrift::Types::BOOL, :name => 'overwrite'},
+      4 => {:type => Thrift::Types::I32, :name => 'bufferSize'},
+      5 => {:type => Thrift::Types::I16, :name => 'block_replication'},
+      6 => {:type => Thrift::Types::I64, :name => 'blocksize'}
+    }
+  end
+
+  class CreateFile_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Open_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class Open_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Append_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class Append_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Write_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :handle, :data
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'handle', :class => ThriftHandle},
+      -1 => {:type => Thrift::Types::STRING, :name => 'data'}
+    }
+  end
+
+  class Write_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Read_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :handle, :offset, :size
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'handle', :class => ThriftHandle},
+      -1 => {:type => Thrift::Types::I64, :name => 'offset'},
+      -2 => {:type => Thrift::Types::I32, :name => 'size'}
+    }
+  end
+
+  class Read_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::STRING, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Close_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :out
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'out', :class => ThriftHandle}
+    }
+  end
+
+  class Close_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Rm_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :recursive
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::BOOL, :name => 'recursive'}
+    }
+  end
+
+  class Rm_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Rename_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :dest
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::STRUCT, :name => 'dest', :class => Pathname}
+    }
+  end
+
+  class Rename_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Mkdirs_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class Mkdirs_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Exists_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class Exists_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Stat_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class Stat_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => FileStatus},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class ListStatus_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
+    }
+  end
+
+  class ListStatus_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::LIST, :name => 'success', :element => {:type => Thrift::Types::STRUCT, :class => FileStatus}},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Chmod_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :mode
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::I16, :name => 'mode'}
+    }
+  end
+
+  class Chmod_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :ouch
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class Chown_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :owner, :group
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::STRING, :name => 'owner'},
+      3 => {:type => Thrift::Types::STRING, :name => 'group'}
+    }
+  end
+
+  class Chown_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :ouch
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class SetReplication_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :replication
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::I16, :name => 'replication'}
+    }
+  end
+
+  class SetReplication_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :ouch
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+  class GetFileBlockLocations_args
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :path, :start, :length
+    FIELDS = {
+      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
+      2 => {:type => Thrift::Types::I64, :name => 'start'},
+      3 => {:type => Thrift::Types::I64, :name => 'length'}
+    }
+  end
+
+  class GetFileBlockLocations_result
+    include Thrift::Struct
+    Thrift::Struct.field_accessor self, :success, :ouch
+    FIELDS = {
+      0 => {:type => Thrift::Types::LIST, :name => 'success', :element => {:type => Thrift::Types::STRUCT, :class => BlockLocation}},
+      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
+    }
+  end
+
+end
+

+ 9 - 0
src/contrib/thriftfs/gen-rb/hadoopfs_constants.rb

@@ -0,0 +1,9 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'thrift/protocol'
+require 'hadoopfs_types'
+

+ 77 - 0
src/contrib/thriftfs/gen-rb/hadoopfs_types.rb

@@ -0,0 +1,77 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'thrift/protocol'
+
+class ThriftHandle
+  include Thrift::Struct
+  Thrift::Struct.field_accessor self, :id
+  FIELDS = {
+    -1 => {:type => Thrift::Types::I64, :name => 'id'}
+  }
+end
+
+class Pathname
+  include Thrift::Struct
+  Thrift::Struct.field_accessor self, :pathname
+  FIELDS = {
+    -1 => {:type => Thrift::Types::STRING, :name => 'pathname'}
+  }
+end
+
+class FileStatus
+  include Thrift::Struct
+  Thrift::Struct.field_accessor self, :path, :length, :isdir, :block_replication, :blocksize, :modification_time, :permission, :owner, :group
+  FIELDS = {
+    1 => {:type => Thrift::Types::STRING, :name => 'path'},
+    2 => {:type => Thrift::Types::I64, :name => 'length'},
+    3 => {:type => Thrift::Types::BOOL, :name => 'isdir'},
+    4 => {:type => Thrift::Types::I16, :name => 'block_replication'},
+    5 => {:type => Thrift::Types::I64, :name => 'blocksize'},
+    6 => {:type => Thrift::Types::I64, :name => 'modification_time'},
+    7 => {:type => Thrift::Types::STRING, :name => 'permission'},
+    8 => {:type => Thrift::Types::STRING, :name => 'owner'},
+    9 => {:type => Thrift::Types::STRING, :name => 'group'}
+  }
+end
+
+class BlockLocation
+  include Thrift::Struct
+  Thrift::Struct.field_accessor self, :hosts, :names, :offset, :length
+  FIELDS = {
+    1 => {:type => Thrift::Types::LIST, :name => 'hosts', :element => {:type => Thrift::Types::STRING}},
+    2 => {:type => Thrift::Types::LIST, :name => 'names', :element => {:type => Thrift::Types::STRING}},
+    3 => {:type => Thrift::Types::I64, :name => 'offset'},
+    4 => {:type => Thrift::Types::I64, :name => 'length'}
+  }
+end
+
+class MalformedInputException < StandardError
+  include Thrift::Struct
+  def initialize(message=nil)
+    super()
+    self.message = message
+  end
+
+  Thrift::Struct.field_accessor self, :message
+  FIELDS = {
+    -1 => {:type => Thrift::Types::STRING, :name => 'message'}
+  }
+end
+
+class ThriftIOException < StandardError
+  include Thrift::Struct
+  def initialize(message=nil)
+    super()
+    self.message = message
+  end
+
+  Thrift::Struct.field_accessor self, :message
+  FIELDS = {
+    -1 => {:type => Thrift::Types::STRING, :name => 'message'}
+  }
+end
+

+ 1486 - 0
src/contrib/thriftfs/gen-st/hadoopfs.st

@@ -0,0 +1,1486 @@
+'Autogenerated by Thrift
+
+DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+'!
+
+Object subclass: #Hadoopfs
+  instanceVariableNames: ''
+  classVariableNames: ''
+  poolDictionaries: ''
+  category: 'Generated-Hadoopfs'!
+
+Hadoopfs class
+	instanceVariableNames: 'constants enums'!
+
+!Hadoopfs class methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+enums: anObject
+    enums := anObject! !
+
+!Hadoopfs class methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+enums
+    ^ enums! !
+
+!Hadoopfs class methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+constants: anObject
+    constants := anObject! !
+
+!Hadoopfs class methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+constants
+    ^ constants! !
+
+Hadoopfs enums: Dictionary new!
+Hadoopfs constants: Dictionary new!
+
+Object subclass: #ThriftHandle
+	instanceVariableNames: 'id'
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!ThriftHandle methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+id: anI64
+    id := anI64! !
+
+!ThriftHandle methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+id
+    ^ id! !
+
+
+Object subclass: #Pathname
+	instanceVariableNames: 'pathname'
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!Pathname methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+pathname: aString
+    pathname := aString! !
+
+!Pathname methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+pathname
+    ^ pathname! !
+
+
+Object subclass: #FileStatus
+	instanceVariableNames: 'path length isdir blockReplication blocksize modificationTime permission owner group'
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+path: aString
+    path := aString! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+path
+    ^ path! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+length: anI64
+    length := anI64! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+length
+    ^ length! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+isdir: aBool
+    isdir := aBool! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+isdir
+    ^ isdir! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+blockReplication: anI16
+    blockReplication := anI16! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+blockReplication
+    ^ blockReplication! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+blocksize: anI64
+    blocksize := anI64! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+blocksize
+    ^ blocksize! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+modificationTime: anI64
+    modificationTime := anI64! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+modificationTime
+    ^ modificationTime! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+permission: aString
+    permission := aString! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+permission
+    ^ permission! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+owner: aString
+    owner := aString! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+owner
+    ^ owner! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+group: aString
+    group := aString! !
+
+!FileStatus methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+group
+    ^ group! !
+
+
+Object subclass: #BlockLocation
+	instanceVariableNames: 'hosts names offset length'
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+hosts: a
+    hosts := a! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+hosts
+    ^ hosts! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+names: a
+    names := a! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+names
+    ^ names! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+offset: anI64
+    offset := anI64! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+offset
+    ^ offset! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+length: anI64
+    length := anI64! !
+
+!BlockLocation methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+length
+    ^ length! !
+
+
+Error subclass: #MalformedInputException
+	instanceVariableNames: 'message'
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!MalformedInputException methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+message: aString
+    message := aString! !
+
+!MalformedInputException methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+message
+    ^ message! !
+
+
+Error subclass: #ThriftIOException
+	instanceVariableNames: 'message'
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!ThriftIOException methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+message: aString
+    message := aString! !
+
+!ThriftIOException methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+message
+    ^ message! !
+
+
+TClient subclass: #ThriftHadoopFileSystemClient
+	instanceVariableNames: ''
+	classVariableNames: ''
+	poolDictionaries: ''
+	category: 'Generated-Hadoopfs'!
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+setInactivityTimeoutPeriodPeriodInSeconds: periodInSeconds
+    "periodInSeconds: i64"
+    self sendSetInactivityTimeoutPeriodPeriodInSeconds: periodInSeconds.
+    ^ self recvSetInactivityTimeoutPeriod success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendSetInactivityTimeoutPeriodPeriodInSeconds: periodInSeconds
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'setInactivityTimeoutPeriod'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'SetInactivityTimeoutPeriod_args').
+    oprot writeFieldBegin: (TField new name: 'periodInSeconds'; type: TType i64; id: 1).
+    iprot writeI64: periodInSeconds asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvSetInactivityTimeoutPeriod
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp1 temp0|
+      temp0 := TResult new.
+      iprot readStructBegin.
+      [temp1 := iprot readFieldBegin.
+      temp1 type = TType stop] whileFalse: [|temp2|
+        temp1 id = 0 ifTrue: [
+          temp2 := true.
+          temp0 success: iprot readVoid].
+        temp2 ifNil: [iprot skip: temp1 type]].
+      oprot readStructEnd.
+      temp0] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+shutdownStatus: status
+    "status: i32"
+    self sendShutdownStatus: status.
+    ^ self recvShutdown success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendShutdownStatus: status
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'shutdown'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Shutdown_args').
+    oprot writeFieldBegin: (TField new name: 'status'; type: TType i32; id: 1).
+    iprot writeI32: status asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvShutdown
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp4 temp3|
+      temp3 := TResult new.
+      iprot readStructBegin.
+      [temp4 := iprot readFieldBegin.
+      temp4 type = TType stop] whileFalse: [|temp5|
+        temp4 id = 0 ifTrue: [
+          temp5 := true.
+          temp3 success: iprot readVoid].
+        temp5 ifNil: [iprot skip: temp4 type]].
+      oprot readStructEnd.
+      temp3] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+createPath: path
+    "path: Pathname"
+    self sendCreatePath: path.
+    ^ self recvCreate success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendCreatePath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'create'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Create_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvCreate
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp7 temp6|
+      temp6 := TResult new.
+      iprot readStructBegin.
+      [temp7 := iprot readFieldBegin.
+      temp7 type = TType stop] whileFalse: [|temp8|
+        temp7 id = 0 ifTrue: [
+          temp8 := true.
+          temp6 success: [|temp10 temp9|
+            temp9 := ThriftHandle new.
+            iprot readStructBegin.
+            [temp10 := iprot readFieldBegin.
+            temp10 type = TType stop] whileFalse: [|temp11|
+              temp10 id = -1 ifTrue: [
+                temp11 := true.
+                temp9 id: iprot readI64].
+              temp11 ifNil: [iprot skip: temp10 type]].
+            oprot readStructEnd.
+            temp9] value].
+        temp7 id = 1 ifTrue: [
+          temp8 := true.
+          temp6 exception: [|temp13 temp12|
+            temp12 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp13 := iprot readFieldBegin.
+            temp13 type = TType stop] whileFalse: [|temp14|
+              temp13 id = -1 ifTrue: [
+                temp14 := true.
+                temp12 message: iprot readString].
+              temp14 ifNil: [iprot skip: temp13 type]].
+            oprot readStructEnd.
+            temp12] value].
+        temp8 ifNil: [iprot skip: temp7 type]].
+      oprot readStructEnd.
+      temp6] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+createFilePath: path mode: mode overwrite: overwrite bufferSize: bufferSize block_replication: block_replication blocksize: blocksize
+    "path: Pathname, mode: i16, overwrite: bool, bufferSize: i32, block_replication: i16, blocksize: i64"
+    self sendCreateFilePath: path mode: mode overwrite: overwrite bufferSize: bufferSize block_replication: block_replication blocksize: blocksize.
+    ^ self recvCreateFile success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendCreateFilePath: path mode: mode overwrite: overwrite bufferSize: bufferSize block_replication: block_replication blocksize: blocksize
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'createFile'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'CreateFile_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'mode'; type: TType i16; id: 2).
+    iprot writeI16: mode asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'overwrite'; type: TType bool; id: 3).
+    iprot writeBool: overwrite.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'bufferSize'; type: TType i32; id: 4).
+    iprot writeI32: bufferSize asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'block_replication'; type: TType i16; id: 5).
+    iprot writeI16: block_replication asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'blocksize'; type: TType i64; id: 6).
+    iprot writeI64: blocksize asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvCreateFile
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp16 temp15|
+      temp15 := TResult new.
+      iprot readStructBegin.
+      [temp16 := iprot readFieldBegin.
+      temp16 type = TType stop] whileFalse: [|temp17|
+        temp16 id = 0 ifTrue: [
+          temp17 := true.
+          temp15 success: [|temp19 temp18|
+            temp18 := ThriftHandle new.
+            iprot readStructBegin.
+            [temp19 := iprot readFieldBegin.
+            temp19 type = TType stop] whileFalse: [|temp20|
+              temp19 id = -1 ifTrue: [
+                temp20 := true.
+                temp18 id: iprot readI64].
+              temp20 ifNil: [iprot skip: temp19 type]].
+            oprot readStructEnd.
+            temp18] value].
+        temp16 id = 1 ifTrue: [
+          temp17 := true.
+          temp15 exception: [|temp22 temp21|
+            temp21 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp22 := iprot readFieldBegin.
+            temp22 type = TType stop] whileFalse: [|temp23|
+              temp22 id = -1 ifTrue: [
+                temp23 := true.
+                temp21 message: iprot readString].
+              temp23 ifNil: [iprot skip: temp22 type]].
+            oprot readStructEnd.
+            temp21] value].
+        temp17 ifNil: [iprot skip: temp16 type]].
+      oprot readStructEnd.
+      temp15] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+openPath: path
+    "path: Pathname"
+    self sendOpenPath: path.
+    ^ self recvOpen success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendOpenPath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'open'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Open_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvOpen
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp25 temp24|
+      temp24 := TResult new.
+      iprot readStructBegin.
+      [temp25 := iprot readFieldBegin.
+      temp25 type = TType stop] whileFalse: [|temp26|
+        temp25 id = 0 ifTrue: [
+          temp26 := true.
+          temp24 success: [|temp28 temp27|
+            temp27 := ThriftHandle new.
+            iprot readStructBegin.
+            [temp28 := iprot readFieldBegin.
+            temp28 type = TType stop] whileFalse: [|temp29|
+              temp28 id = -1 ifTrue: [
+                temp29 := true.
+                temp27 id: iprot readI64].
+              temp29 ifNil: [iprot skip: temp28 type]].
+            oprot readStructEnd.
+            temp27] value].
+        temp25 id = 1 ifTrue: [
+          temp26 := true.
+          temp24 exception: [|temp31 temp30|
+            temp30 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp31 := iprot readFieldBegin.
+            temp31 type = TType stop] whileFalse: [|temp32|
+              temp31 id = -1 ifTrue: [
+                temp32 := true.
+                temp30 message: iprot readString].
+              temp32 ifNil: [iprot skip: temp31 type]].
+            oprot readStructEnd.
+            temp30] value].
+        temp26 ifNil: [iprot skip: temp25 type]].
+      oprot readStructEnd.
+      temp24] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+appendPath: path
+    "path: Pathname"
+    self sendAppendPath: path.
+    ^ self recvAppend success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendAppendPath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'append'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Append_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvAppend
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp34 temp33|
+      temp33 := TResult new.
+      iprot readStructBegin.
+      [temp34 := iprot readFieldBegin.
+      temp34 type = TType stop] whileFalse: [|temp35|
+        temp34 id = 0 ifTrue: [
+          temp35 := true.
+          temp33 success: [|temp37 temp36|
+            temp36 := ThriftHandle new.
+            iprot readStructBegin.
+            [temp37 := iprot readFieldBegin.
+            temp37 type = TType stop] whileFalse: [|temp38|
+              temp37 id = -1 ifTrue: [
+                temp38 := true.
+                temp36 id: iprot readI64].
+              temp38 ifNil: [iprot skip: temp37 type]].
+            oprot readStructEnd.
+            temp36] value].
+        temp34 id = 1 ifTrue: [
+          temp35 := true.
+          temp33 exception: [|temp40 temp39|
+            temp39 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp40 := iprot readFieldBegin.
+            temp40 type = TType stop] whileFalse: [|temp41|
+              temp40 id = -1 ifTrue: [
+                temp41 := true.
+                temp39 message: iprot readString].
+              temp41 ifNil: [iprot skip: temp40 type]].
+            oprot readStructEnd.
+            temp39] value].
+        temp35 ifNil: [iprot skip: temp34 type]].
+      oprot readStructEnd.
+      temp33] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+writeHandle: handle data: data
+    "handle: ThriftHandle, data: string"
+    self sendWriteHandle: handle data: data.
+    ^ self recvWrite success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendWriteHandle: handle data: data
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'write'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Write_args').
+    oprot writeFieldBegin: (TField new name: 'handle'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'ThriftHandle').
+      oprot writeFieldBegin: (TField new name: 'id'; type: TType i64; id: -1).
+      iprot writeI64: handle id asInteger.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'data'; type: TType string; id: -1).
+    iprot writeString: data.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvWrite
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp43 temp42|
+      temp42 := TResult new.
+      iprot readStructBegin.
+      [temp43 := iprot readFieldBegin.
+      temp43 type = TType stop] whileFalse: [|temp44|
+        temp43 id = 0 ifTrue: [
+          temp44 := true.
+          temp42 success: iprot readBool].
+        temp43 id = 1 ifTrue: [
+          temp44 := true.
+          temp42 exception: [|temp46 temp45|
+            temp45 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp46 := iprot readFieldBegin.
+            temp46 type = TType stop] whileFalse: [|temp47|
+              temp46 id = -1 ifTrue: [
+                temp47 := true.
+                temp45 message: iprot readString].
+              temp47 ifNil: [iprot skip: temp46 type]].
+            oprot readStructEnd.
+            temp45] value].
+        temp44 ifNil: [iprot skip: temp43 type]].
+      oprot readStructEnd.
+      temp42] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+readHandle: handle offset: offset size: size
+    "handle: ThriftHandle, offset: i64, size: i32"
+    self sendReadHandle: handle offset: offset size: size.
+    ^ self recvRead success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendReadHandle: handle offset: offset size: size
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'read'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Read_args').
+    oprot writeFieldBegin: (TField new name: 'handle'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'ThriftHandle').
+      oprot writeFieldBegin: (TField new name: 'id'; type: TType i64; id: -1).
+      iprot writeI64: handle id asInteger.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'offset'; type: TType i64; id: -1).
+    iprot writeI64: offset asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'size'; type: TType i32; id: -2).
+    iprot writeI32: size asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvRead
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp49 temp48|
+      temp48 := TResult new.
+      iprot readStructBegin.
+      [temp49 := iprot readFieldBegin.
+      temp49 type = TType stop] whileFalse: [|temp50|
+        temp49 id = 0 ifTrue: [
+          temp50 := true.
+          temp48 success: iprot readString].
+        temp49 id = 1 ifTrue: [
+          temp50 := true.
+          temp48 exception: [|temp52 temp51|
+            temp51 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp52 := iprot readFieldBegin.
+            temp52 type = TType stop] whileFalse: [|temp53|
+              temp52 id = -1 ifTrue: [
+                temp53 := true.
+                temp51 message: iprot readString].
+              temp53 ifNil: [iprot skip: temp52 type]].
+            oprot readStructEnd.
+            temp51] value].
+        temp50 ifNil: [iprot skip: temp49 type]].
+      oprot readStructEnd.
+      temp48] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+closeOut: out
+    "out: ThriftHandle"
+    self sendCloseOut: out.
+    ^ self recvClose success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendCloseOut: out
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'close'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Close_args').
+    oprot writeFieldBegin: (TField new name: 'out'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'ThriftHandle').
+      oprot writeFieldBegin: (TField new name: 'id'; type: TType i64; id: -1).
+      iprot writeI64: out id asInteger.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvClose
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp55 temp54|
+      temp54 := TResult new.
+      iprot readStructBegin.
+      [temp55 := iprot readFieldBegin.
+      temp55 type = TType stop] whileFalse: [|temp56|
+        temp55 id = 0 ifTrue: [
+          temp56 := true.
+          temp54 success: iprot readBool].
+        temp55 id = 1 ifTrue: [
+          temp56 := true.
+          temp54 exception: [|temp58 temp57|
+            temp57 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp58 := iprot readFieldBegin.
+            temp58 type = TType stop] whileFalse: [|temp59|
+              temp58 id = -1 ifTrue: [
+                temp59 := true.
+                temp57 message: iprot readString].
+              temp59 ifNil: [iprot skip: temp58 type]].
+            oprot readStructEnd.
+            temp57] value].
+        temp56 ifNil: [iprot skip: temp55 type]].
+      oprot readStructEnd.
+      temp54] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+rmPath: path recursive: recursive
+    "path: Pathname, recursive: bool"
+    self sendRmPath: path recursive: recursive.
+    ^ self recvRm success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendRmPath: path recursive: recursive
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'rm'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Rm_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'recursive'; type: TType bool; id: 2).
+    iprot writeBool: recursive.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvRm
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp61 temp60|
+      temp60 := TResult new.
+      iprot readStructBegin.
+      [temp61 := iprot readFieldBegin.
+      temp61 type = TType stop] whileFalse: [|temp62|
+        temp61 id = 0 ifTrue: [
+          temp62 := true.
+          temp60 success: iprot readBool].
+        temp61 id = 1 ifTrue: [
+          temp62 := true.
+          temp60 exception: [|temp64 temp63|
+            temp63 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp64 := iprot readFieldBegin.
+            temp64 type = TType stop] whileFalse: [|temp65|
+              temp64 id = -1 ifTrue: [
+                temp65 := true.
+                temp63 message: iprot readString].
+              temp65 ifNil: [iprot skip: temp64 type]].
+            oprot readStructEnd.
+            temp63] value].
+        temp62 ifNil: [iprot skip: temp61 type]].
+      oprot readStructEnd.
+      temp60] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+renamePath: path dest: dest
+    "path: Pathname, dest: Pathname"
+    self sendRenamePath: path dest: dest.
+    ^ self recvRename success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendRenamePath: path dest: dest
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'rename'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Rename_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'dest'; type: TType struct; id: 2).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: dest pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvRename
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp67 temp66|
+      temp66 := TResult new.
+      iprot readStructBegin.
+      [temp67 := iprot readFieldBegin.
+      temp67 type = TType stop] whileFalse: [|temp68|
+        temp67 id = 0 ifTrue: [
+          temp68 := true.
+          temp66 success: iprot readBool].
+        temp67 id = 1 ifTrue: [
+          temp68 := true.
+          temp66 exception: [|temp70 temp69|
+            temp69 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp70 := iprot readFieldBegin.
+            temp70 type = TType stop] whileFalse: [|temp71|
+              temp70 id = -1 ifTrue: [
+                temp71 := true.
+                temp69 message: iprot readString].
+              temp71 ifNil: [iprot skip: temp70 type]].
+            oprot readStructEnd.
+            temp69] value].
+        temp68 ifNil: [iprot skip: temp67 type]].
+      oprot readStructEnd.
+      temp66] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+mkdirsPath: path
+    "path: Pathname"
+    self sendMkdirsPath: path.
+    ^ self recvMkdirs success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendMkdirsPath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'mkdirs'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Mkdirs_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvMkdirs
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp73 temp72|
+      temp72 := TResult new.
+      iprot readStructBegin.
+      [temp73 := iprot readFieldBegin.
+      temp73 type = TType stop] whileFalse: [|temp74|
+        temp73 id = 0 ifTrue: [
+          temp74 := true.
+          temp72 success: iprot readBool].
+        temp73 id = 1 ifTrue: [
+          temp74 := true.
+          temp72 exception: [|temp76 temp75|
+            temp75 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp76 := iprot readFieldBegin.
+            temp76 type = TType stop] whileFalse: [|temp77|
+              temp76 id = -1 ifTrue: [
+                temp77 := true.
+                temp75 message: iprot readString].
+              temp77 ifNil: [iprot skip: temp76 type]].
+            oprot readStructEnd.
+            temp75] value].
+        temp74 ifNil: [iprot skip: temp73 type]].
+      oprot readStructEnd.
+      temp72] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+existsPath: path
+    "path: Pathname"
+    self sendExistsPath: path.
+    ^ self recvExists success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendExistsPath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'exists'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Exists_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvExists
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp79 temp78|
+      temp78 := TResult new.
+      iprot readStructBegin.
+      [temp79 := iprot readFieldBegin.
+      temp79 type = TType stop] whileFalse: [|temp80|
+        temp79 id = 0 ifTrue: [
+          temp80 := true.
+          temp78 success: iprot readBool].
+        temp79 id = 1 ifTrue: [
+          temp80 := true.
+          temp78 exception: [|temp82 temp81|
+            temp81 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp82 := iprot readFieldBegin.
+            temp82 type = TType stop] whileFalse: [|temp83|
+              temp82 id = -1 ifTrue: [
+                temp83 := true.
+                temp81 message: iprot readString].
+              temp83 ifNil: [iprot skip: temp82 type]].
+            oprot readStructEnd.
+            temp81] value].
+        temp80 ifNil: [iprot skip: temp79 type]].
+      oprot readStructEnd.
+      temp78] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+statPath: path
+    "path: Pathname"
+    self sendStatPath: path.
+    ^ self recvStat success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendStatPath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'stat'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Stat_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvStat
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp85 temp84|
+      temp84 := TResult new.
+      iprot readStructBegin.
+      [temp85 := iprot readFieldBegin.
+      temp85 type = TType stop] whileFalse: [|temp86|
+        temp85 id = 0 ifTrue: [
+          temp86 := true.
+          temp84 success: [|temp88 temp87|
+            temp87 := FileStatus new.
+            iprot readStructBegin.
+            [temp88 := iprot readFieldBegin.
+            temp88 type = TType stop] whileFalse: [|temp89|
+              temp88 id = 1 ifTrue: [
+                temp89 := true.
+                temp87 path: iprot readString].
+              temp88 id = 2 ifTrue: [
+                temp89 := true.
+                temp87 length: iprot readI64].
+              temp88 id = 3 ifTrue: [
+                temp89 := true.
+                temp87 isdir: iprot readBool].
+              temp88 id = 4 ifTrue: [
+                temp89 := true.
+                temp87 blockReplication: iprot readI16].
+              temp88 id = 5 ifTrue: [
+                temp89 := true.
+                temp87 blocksize: iprot readI64].
+              temp88 id = 6 ifTrue: [
+                temp89 := true.
+                temp87 modificationTime: iprot readI64].
+              temp88 id = 7 ifTrue: [
+                temp89 := true.
+                temp87 permission: iprot readString].
+              temp88 id = 8 ifTrue: [
+                temp89 := true.
+                temp87 owner: iprot readString].
+              temp88 id = 9 ifTrue: [
+                temp89 := true.
+                temp87 group: iprot readString].
+              temp89 ifNil: [iprot skip: temp88 type]].
+            oprot readStructEnd.
+            temp87] value].
+        temp85 id = 1 ifTrue: [
+          temp86 := true.
+          temp84 exception: [|temp91 temp90|
+            temp90 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp91 := iprot readFieldBegin.
+            temp91 type = TType stop] whileFalse: [|temp92|
+              temp91 id = -1 ifTrue: [
+                temp92 := true.
+                temp90 message: iprot readString].
+              temp92 ifNil: [iprot skip: temp91 type]].
+            oprot readStructEnd.
+            temp90] value].
+        temp86 ifNil: [iprot skip: temp85 type]].
+      oprot readStructEnd.
+      temp84] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+listStatusPath: path
+    "path: Pathname"
+    self sendListStatusPath: path.
+    ^ self recvListStatus success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendListStatusPath: path
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'listStatus'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'ListStatus_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvListStatus
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp94 temp93|
+      temp93 := TResult new.
+      iprot readStructBegin.
+      [temp94 := iprot readFieldBegin.
+      temp94 type = TType stop] whileFalse: [|temp95|
+        temp94 id = 0 ifTrue: [
+          temp95 := true.
+          temp93 success: [|temp96 temp97| temp96 := iprot readListBegin.
+            temp97 := OrderedCollection new.
+            temp96 size timesRepeat: [
+              temp97 add: [|temp99 temp98|
+                temp98 := FileStatus new.
+                iprot readStructBegin.
+                [temp99 := iprot readFieldBegin.
+                temp99 type = TType stop] whileFalse: [|temp100|
+                  temp99 id = 1 ifTrue: [
+                    temp100 := true.
+                    temp98 path: iprot readString].
+                  temp99 id = 2 ifTrue: [
+                    temp100 := true.
+                    temp98 length: iprot readI64].
+                  temp99 id = 3 ifTrue: [
+                    temp100 := true.
+                    temp98 isdir: iprot readBool].
+                  temp99 id = 4 ifTrue: [
+                    temp100 := true.
+                    temp98 blockReplication: iprot readI16].
+                  temp99 id = 5 ifTrue: [
+                    temp100 := true.
+                    temp98 blocksize: iprot readI64].
+                  temp99 id = 6 ifTrue: [
+                    temp100 := true.
+                    temp98 modificationTime: iprot readI64].
+                  temp99 id = 7 ifTrue: [
+                    temp100 := true.
+                    temp98 permission: iprot readString].
+                  temp99 id = 8 ifTrue: [
+                    temp100 := true.
+                    temp98 owner: iprot readString].
+                  temp99 id = 9 ifTrue: [
+                    temp100 := true.
+                    temp98 group: iprot readString].
+                  temp100 ifNil: [iprot skip: temp99 type]].
+                oprot readStructEnd.
+                temp98] value].
+            iprot readListEnd.
+            temp97] value].
+        temp94 id = 1 ifTrue: [
+          temp95 := true.
+          temp93 exception: [|temp102 temp101|
+            temp101 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp102 := iprot readFieldBegin.
+            temp102 type = TType stop] whileFalse: [|temp103|
+              temp102 id = -1 ifTrue: [
+                temp103 := true.
+                temp101 message: iprot readString].
+              temp103 ifNil: [iprot skip: temp102 type]].
+            oprot readStructEnd.
+            temp101] value].
+        temp95 ifNil: [iprot skip: temp94 type]].
+      oprot readStructEnd.
+      temp93] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+chmodPath: path mode: mode
+    "path: Pathname, mode: i16"
+    self sendChmodPath: path mode: mode.
+    ^ self recvChmod success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendChmodPath: path mode: mode
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'chmod'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Chmod_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'mode'; type: TType i16; id: 2).
+    iprot writeI16: mode asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvChmod
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp105 temp104|
+      temp104 := TResult new.
+      iprot readStructBegin.
+      [temp105 := iprot readFieldBegin.
+      temp105 type = TType stop] whileFalse: [|temp106|
+        temp105 id = 0 ifTrue: [
+          temp106 := true.
+          temp104 success: iprot readVoid].
+        temp105 id = 1 ifTrue: [
+          temp106 := true.
+          temp104 exception: [|temp108 temp107|
+            temp107 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp108 := iprot readFieldBegin.
+            temp108 type = TType stop] whileFalse: [|temp109|
+              temp108 id = -1 ifTrue: [
+                temp109 := true.
+                temp107 message: iprot readString].
+              temp109 ifNil: [iprot skip: temp108 type]].
+            oprot readStructEnd.
+            temp107] value].
+        temp106 ifNil: [iprot skip: temp105 type]].
+      oprot readStructEnd.
+      temp104] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+chownPath: path owner: owner group: group
+    "path: Pathname, owner: string, group: string"
+    self sendChownPath: path owner: owner group: group.
+    ^ self recvChown success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendChownPath: path owner: owner group: group
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'chown'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'Chown_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'owner'; type: TType string; id: 2).
+    iprot writeString: owner.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'group'; type: TType string; id: 3).
+    iprot writeString: group.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvChown
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp111 temp110|
+      temp110 := TResult new.
+      iprot readStructBegin.
+      [temp111 := iprot readFieldBegin.
+      temp111 type = TType stop] whileFalse: [|temp112|
+        temp111 id = 0 ifTrue: [
+          temp112 := true.
+          temp110 success: iprot readVoid].
+        temp111 id = 1 ifTrue: [
+          temp112 := true.
+          temp110 exception: [|temp114 temp113|
+            temp113 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp114 := iprot readFieldBegin.
+            temp114 type = TType stop] whileFalse: [|temp115|
+              temp114 id = -1 ifTrue: [
+                temp115 := true.
+                temp113 message: iprot readString].
+              temp115 ifNil: [iprot skip: temp114 type]].
+            oprot readStructEnd.
+            temp113] value].
+        temp112 ifNil: [iprot skip: temp111 type]].
+      oprot readStructEnd.
+      temp110] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+setReplicationPath: path replication: replication
+    "path: Pathname, replication: i16"
+    self sendSetReplicationPath: path replication: replication.
+    ^ self recvSetReplication success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendSetReplicationPath: path replication: replication
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'setReplication'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'SetReplication_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'replication'; type: TType i16; id: 2).
+    iprot writeI16: replication asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvSetReplication
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp117 temp116|
+      temp116 := TResult new.
+      iprot readStructBegin.
+      [temp117 := iprot readFieldBegin.
+      temp117 type = TType stop] whileFalse: [|temp118|
+        temp117 id = 0 ifTrue: [
+          temp118 := true.
+          temp116 success: iprot readVoid].
+        temp117 id = 1 ifTrue: [
+          temp118 := true.
+          temp116 exception: [|temp120 temp119|
+            temp119 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp120 := iprot readFieldBegin.
+            temp120 type = TType stop] whileFalse: [|temp121|
+              temp120 id = -1 ifTrue: [
+                temp121 := true.
+                temp119 message: iprot readString].
+              temp121 ifNil: [iprot skip: temp120 type]].
+            oprot readStructEnd.
+            temp119] value].
+        temp118 ifNil: [iprot skip: temp117 type]].
+      oprot readStructEnd.
+      temp116] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+getFileBlockLocationsPath: path start: start length: length
+    "path: Pathname, start: i64, length: i64"
+    self sendGetFileBlockLocationsPath: path start: start length: length.
+    ^ self recvGetFileBlockLocations success 
+! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+sendGetFileBlockLocationsPath: path start: start length: length
+    oprot writeMessageBegin:
+      (TCallMessage new
+        name: 'getFileBlockLocations'; 
+        seqid: self nextSeqid).
+    oprot writeStructBegin: (TStruct new name: 'GetFileBlockLocations_args').
+    oprot writeFieldBegin: (TField new name: 'path'; type: TType struct; id: 1).
+    [oprot writeStructBegin: (TStruct new name: 'Pathname').
+      oprot writeFieldBegin: (TField new name: 'pathname'; type: TType string; id: -1).
+      iprot writeString: path pathname.
+      oprot writeFieldEnd.
+      oprot writeFieldStop; writeStructEnd] value.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'start'; type: TType i64; id: 2).
+    iprot writeI64: start asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldBegin: (TField new name: 'length'; type: TType i64; id: 3).
+    iprot writeI64: length asInteger.
+    oprot writeFieldEnd.
+    oprot writeFieldStop; writeStructEnd; writeMessageEnd.
+    oprot transport flush! !
+
+!ThriftHadoopFileSystemClient methodsFor: 'as yet uncategorized' stamp: 'thrift 08/27/2008 14:54'!
+recvGetFileBlockLocations
+    | f msg res | 
+    msg := oprot readMessageBegin.
+    self validateRemoteMessage: msg.
+    res := [|temp123 temp122|
+      temp122 := TResult new.
+      iprot readStructBegin.
+      [temp123 := iprot readFieldBegin.
+      temp123 type = TType stop] whileFalse: [|temp124|
+        temp123 id = 0 ifTrue: [
+          temp124 := true.
+          temp122 success: [|temp125 temp126| temp125 := iprot readListBegin.
+            temp126 := OrderedCollection new.
+            temp125 size timesRepeat: [
+              temp126 add: [|temp128 temp127|
+                temp127 := BlockLocation new.
+                iprot readStructBegin.
+                [temp128 := iprot readFieldBegin.
+                temp128 type = TType stop] whileFalse: [|temp129|
+                  temp128 id = 1 ifTrue: [
+                    temp129 := true.
+                    temp127 hosts: [|temp130 temp131| temp130 := iprot readListBegin.
+                      temp131 := OrderedCollection new.
+                      temp130 size timesRepeat: [
+                        temp131 add: iprot readString].
+                      iprot readListEnd.
+                      temp131] value].
+                  temp128 id = 2 ifTrue: [
+                    temp129 := true.
+                    temp127 names: [|temp132 temp133| temp132 := iprot readListBegin.
+                      temp133 := OrderedCollection new.
+                      temp132 size timesRepeat: [
+                        temp133 add: iprot readString].
+                      iprot readListEnd.
+                      temp133] value].
+                  temp128 id = 3 ifTrue: [
+                    temp129 := true.
+                    temp127 offset: iprot readI64].
+                  temp128 id = 4 ifTrue: [
+                    temp129 := true.
+                    temp127 length: iprot readI64].
+                  temp129 ifNil: [iprot skip: temp128 type]].
+                oprot readStructEnd.
+                temp127] value].
+            iprot readListEnd.
+            temp126] value].
+        temp123 id = 1 ifTrue: [
+          temp124 := true.
+          temp122 exception: [|temp135 temp134|
+            temp134 := ThriftIOException new.
+            iprot readStructBegin.
+            [temp135 := iprot readFieldBegin.
+            temp135 type = TType stop] whileFalse: [|temp136|
+              temp135 id = -1 ifTrue: [
+                temp136 := true.
+                temp134 message: iprot readString].
+              temp136 ifNil: [iprot skip: temp135 type]].
+            oprot readStructEnd.
+            temp134] value].
+        temp124 ifNil: [iprot skip: temp123 type]].
+      oprot readStructEnd.
+      temp122] value.
+    oprot readMessageEnd.
+    oprot transport flush.
+    res exception ifNotNil: [res exception signal].
+    ^ res! !
+
+Hadoopfs enums keysAndValuesDo: [:k :v | Hadoopfs enums at: k put: v value].!
+Hadoopfs constants keysAndValuesDo: [:k :v | Hadoopfs constants at: k put: v value].!

+ 126 - 0
src/contrib/thriftfs/if/hadoopfs.thrift

@@ -0,0 +1,126 @@
+
+#!/usr/local/bin/thrift -java
+#
+# Thrift Service exported by Hadoop File System
+# Dhruba Borthakur (dhruba@gmail.com)
+#
+
+/**
+ * The available types in Thrift:
+ *
+ *  bool        Boolean, one byte
+ *  byte        Signed byte
+ *  i16         Signed 16-bit integer
+ *  i32         Signed 32-bit integer
+ *  i64         Signed 64-bit integer
+ *  double      64-bit floating point value
+ *  string      String
+ *  map<t1,t2>  Map from one type to another
+ *  list<t1>    Ordered list of one type
+ *  set<t1>     Set of unique elements of one type
+ *
+ */
+
+namespace java org.apache.hadoop.thriftfs.api
+namespace php hadoopfs
+
+struct ThriftHandle {
+  i64 id
+}
+
+struct Pathname {
+  string pathname
+}
+
+struct FileStatus {
+  1: string path,
+  2: i64 length,
+  3: bool isdir,
+  4: i16 block_replication,
+  5: i64 blocksize,
+  6: i64 modification_time,
+  7: string permission,
+  8: string owner,
+  9: string group
+}
+
+struct BlockLocation {
+  1: list<string> hosts,         /* hostnames of datanodes */
+  2: list<string> names,         /* hostname:portNumber of datanodes */
+  3: i64 offset,                 /* offset of the block in the file */
+  4: i64 length                  /* length of data */
+}
+
+exception MalformedInputException {
+  string message
+}
+
+exception ThriftIOException {
+   string message
+}
+
+service ThriftHadoopFileSystem
+{
+
+  // set inactivity timeout period. The period is specified in seconds.
+  // if there are no RPC calls to the HadoopThrift server for this much
+  // time, then the server kills itself.
+  void setInactivityTimeoutPeriod(1:i64 periodInSeconds),
+
+  // close session
+  void shutdown(1:i32 status),
+
+  // create a file and open it for writing
+  ThriftHandle create(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // create a file and open it for writing
+  ThriftHandle createFile(1:Pathname path, 2:i16 mode, 
+                          3:bool overwrite, 4:i32 bufferSize, 
+                          5:i16 block_replication, 6:i64 blocksize) 
+                          throws (1:ThriftIOException ouch),
+
+  // returns a handle to an existing file  for reading
+  ThriftHandle open(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // returns a handle to an existing file for appending to it.
+  ThriftHandle append(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // write a string to the open handle for the file
+  bool write(1:ThriftHandle handle, string data) throws (1:ThriftIOException ouch),
+
+  // read some bytes from the open handle for the file
+  string read(1:ThriftHandle handle, i64 offset, i32 size) throws (1:ThriftIOException ouch),
+
+  // close file
+  bool close(1:ThriftHandle out) throws (1:ThriftIOException ouch),
+
+  // delete file(s) or directory(s)
+  bool rm(1:Pathname path, 2:bool recursive) throws (1:ThriftIOException ouch),
+
+  // rename file(s) or directory(s)
+  bool rename(1:Pathname path, 2:Pathname dest) throws (1:ThriftIOException ouch),
+
+  // create directory
+  bool mkdirs(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // Does this pathname exist?
+  bool exists(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // Returns status about the path
+  FileStatus stat(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // If the path is a directory, then returns the list of pathnames in that directory
+  list<FileStatus> listStatus(1:Pathname path) throws (1:ThriftIOException ouch),
+
+  // Set permission for this file
+  void chmod(1:Pathname path, 2:i16 mode) throws (1:ThriftIOException ouch),
+
+  // set the owner and group of the file.
+  void chown(1:Pathname path, 2:string owner, 3:string group) throws (1:ThriftIOException ouch),
+
+  // set the replication factor for all blocks of the specified file
+  void setReplication(1:Pathname path, 2:i16 replication) throws (1:ThriftIOException ouch),
+
+  // get the locations of the blocks of this file
+  list<BlockLocation> getFileBlockLocations(1:Pathname path, 2:i64 start, 3:i64 length) throws (1:ThriftIOException ouch),
+}

+ 1 - 0
src/contrib/thriftfs/lib/README

@@ -0,0 +1 @@
+Thrift is from http://developers.facebook.com/thrift/.

+ 24 - 0
src/contrib/thriftfs/lib/Thrift.LICENSE

@@ -0,0 +1,24 @@
+Thrift Software License
+Copyright (c) 2006- Facebook, Inc.
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

BIN
src/contrib/thriftfs/lib/hadoopthriftapi.jar


BIN
src/contrib/thriftfs/lib/libthrift.jar


+ 555 - 0
src/contrib/thriftfs/scripts/hdfs.py

@@ -0,0 +1,555 @@
+#!/usr/bin/env python
+
+"""
+  hdfs.py is a python client for the thrift interface to HDFS.
+  
+  Licensed under the Apache License, Version 2.0 (the "License"); 
+  you may not use this file except in compliance with the License. 
+  You may obtain a copy of the License at 
+  
+  http://www.apache.org/licenses/LICENSE-2.0 
+  
+  Unless required by applicable law or agreed to in writing, software 
+  distributed under the License is distributed on an "AS IS" BASIS, 
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
+  implied. See the License for the specific language governing permissions 
+  and limitations under the License. 
+
+"""
+import sys
+sys.path.append('../gen-py')
+
+from optparse import OptionParser
+from thrift import Thrift
+from thrift.transport import TSocket
+from thrift.transport import TTransport
+from thrift.protocol import TBinaryProtocol
+from hadoopfs import ThriftHadoopFileSystem
+from hadoopfs.ttypes import *
+from readline import *
+from cmd import *
+import os
+import re
+import readline
+import subprocess
+
+#
+# The address of the FileSystemClientProxy. If the host and port are
+# not specified, then a proxy server is automatically spawned. 
+#
+host = 'localhost'
+port = 4677                       # use any port
+proxyStartScript = './start_thrift_server.sh'
+startServer = True                # shall we start a proxy server?
+
+#
+# The hdfs interactive shell. The Cmd class is a builtin that uses readline + implements
+# a whole bunch of utility stuff like help and custom tab completions.
+# It makes everything real easy.
+#
+class hadoopthrift_cli(Cmd):
+
+  # my custom prompt looks better than the default
+  prompt = 'hdfs>> '
+
+  #############################
+  # Class constructor
+  #############################
+  def __init__(self, server_name, server_port):
+    Cmd.__init__(self)
+    self.server_name = server_name
+    self.server_port = server_port
+
+  #############################
+  # Start the ClientProxy Server if we can find it.
+  # Read in its stdout to determine what port it is running on
+  #############################
+  def startProxyServer(self):
+    try:
+      p = subprocess.Popen(proxyStartScript, self.server_port, stdout=subprocess.PIPE)
+      content = p.stdout.readline()
+      p.stdout.close()
+      val = re.split( '\[|\]', content)
+      print val[1]
+      self.server_port = val[1]
+      return True
+
+    except Exception, ex:
+      print "ERROR in starting proxy  server " + proxyStartScript
+      print '%s' % (ex.message)
+      return False
+
+  #############################
+  # Connect to clientproxy
+  #############################
+  def connect(self):
+    try:
+      # connect to hdfs thrift server
+      self.transport = TSocket.TSocket(self.server_name, self.server_port)
+      self.transport = TTransport.TBufferedTransport(self.transport)
+      self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
+
+      # Create a client to use the protocol encoder
+      self.client = ThriftHadoopFileSystem.Client(self.protocol)
+      self.transport.open()
+
+      # tell the HadoopThrift server to die after 60 minutes of inactivity
+      self.client.setInactivityTimeoutPeriod(60*60)
+      return True
+
+    except Thrift.TException, tx:
+      print "ERROR in connecting to ", self.server_name, ":", self.server_port
+      print '%s' % (tx.message)
+      return False
+
+
+  #
+  # Disconnect from client proxy
+  #
+  def shutdown(self):
+    try :
+      self.transport.close()
+    except Exception, tx:
+      return False
+
+  #############################
+  # Create the specified file. Returns a handle to write data.
+  #############################
+  def do_create(self, name):
+    if name == "":
+      print "  ERROR usage: create <pathname>"
+      print
+      return 0
+
+    # Create the file, and immediately closes the handle
+    path = Pathname();
+    path.pathname = name;
+    status = self.client.create(path)
+    self.client.close(status)
+    return 0
+
+  #############################
+  # Delete the specified file.
+  #############################
+  def do_rm(self, name):
+    if name == "":
+      print "  ERROR usage: rm <pathname>\n"
+      return 0
+
+    # delete file
+    path = Pathname();
+    path.pathname = name;
+    status = self.client.rm(path, False)
+    if status == False:
+      print "  ERROR in deleting path: " + name
+    return 0
+
+  #############################
+  # Rename the specified file/dir
+  #############################
+  def do_mv(self, line):
+    params = line.split()
+    if (len(params) != 2):
+      print "  ERROR usage: mv <srcpathname> <destpathname>\n"
+      return 0
+    src = params[0].strip()
+    dest = params[1].strip()
+
+    if src == "":
+      print "  ERROR usage: mv <srcpathname> <destpathname>\n"
+      return 0
+    if dest == "":
+      print "  ERROR usage: mv <srcpathname> <destpathname>\n"
+      return 0
+
+    # move file
+    path = Pathname();
+    path.pathname = src;
+    destpath = Pathname();
+    destpath.pathname = dest;
+    status = self.client.rename(path, destpath)
+    if status == False:
+      print "  ERROR in renaming path: " + name
+    return 0
+
+  #############################
+  # Delete the specified file.
+  #############################
+  def do_mkdirs(self, name):
+    if name == "":
+      print "  ERROR usage: mkdirs <pathname>\n"
+      return 0
+
+    # create directory
+    path = Pathname();
+    path.pathname = name;
+    fields = self.client.mkdirs(path)
+    return 0
+
+  #############################
+  # does the pathname exist?
+  #############################
+  def do_exists(self, name):
+    if name == "":
+      print "  ERROR usage: exists <pathname>\n"
+      return 0
+
+    # check existence of pathname
+    path = Pathname();
+    path.pathname = name;
+    fields = self.client.exists(path)
+    if (fields == True):
+      print name + " exists."
+    else:
+      print name + " does not exist."
+    return 0
+
+  #############################
+  # copy local file into hdfs
+  #############################
+  def do_put(self, line):
+    params = line.split()
+    if (len(params) != 2):
+      print "  ERROR usage: put <localpathname> <hdfspathname>\n"
+      return 0
+    local = params[0].strip()
+    hdfs = params[1].strip()
+
+    if local == "":
+      print "  ERROR usage: put <localpathname> <hdfspathname>\n"
+      return 0
+    if hdfs == "":
+      print "  ERROR usage: put <localpathname> <hdfspathname>\n"
+      return 0
+
+    # open local file
+    input = open(local, 'rb')
+
+    # open output file
+    path = Pathname();
+    path.pathname = hdfs;
+    output = self.client.create(path)
+
+    # read 1MB at a time and upload to hdfs
+    while True:
+      chunk = input.read(1024*1024)
+      if not chunk: break
+      self.client.write(output, chunk)
+      
+    self.client.close(output) 
+    input.close()
+
+  #############################
+  # copy hdfs file into local
+  #############################
+  def do_get(self, line):
+    params = line.split()
+    if (len(params) != 2):
+      print "  ERROR usage: get <hdfspathname> <localpathname>\n"
+      return 0
+    hdfs = params[0].strip()
+    local = params[1].strip()
+
+    if local == "":
+      print "  ERROR usage: get <hdfspathname> <localpathname>\n"
+      return 0
+    if hdfs == "":
+      print "  ERROR usage: get <hdfspathname> <localpathname>\n"
+      return 0
+
+    # open output local file
+    output = open(local, 'wb')
+
+    # open input hdfs file
+    path = Pathname();
+    path.pathname = hdfs;
+    input = self.client.open(path)
+
+    # find size of hdfs file
+    filesize = self.client.stat(path).length
+
+    # read 1MB bytes at a time from hdfs
+    offset = 0
+    chunksize = 1024 * 1024
+    while True:
+      chunk = self.client.read(input, offset, chunksize)
+      if not chunk: break
+      output.write(chunk)
+      offset += chunksize
+      if (offset >= filesize): break
+      
+    self.client.close(input) 
+    output.close()
+
+  #############################
+  # List attributes of this path
+  #############################
+  def do_ls(self, name):
+    if name == "":
+      print "  ERROR usage: list <pathname>\n"
+      return 0
+
+    # list file status
+    path = Pathname();
+    path.pathname = name;
+    status = self.client.stat(path)
+    if (status.isdir == False):
+      self.printStatus(status)
+      return 0
+    
+    # This is a directory, fetch its contents
+    liststatus = self.client.listStatus(path)
+    for item in liststatus:
+      self.printStatus(item)
+
+  #############################
+  # Set permissions for a file
+  #############################
+  def do_chmod(self, line):
+    params = line.split()
+    if (len(params) != 2):
+      print "  ERROR usage: chmod 774 <pathname>\n"
+      return 0
+    perm = params[0].strip()
+    name = params[1].strip()
+
+    if name == "":
+      print "  ERROR usage: chmod 774 <pathname>\n"
+      return 0
+    if perm == "":
+      print "  ERROR usage: chmod 774 <pathname>\n"
+      return 0
+
+    # set permissions (in octal)
+    path = Pathname();
+    path.pathname = name;
+    status = self.client.chmod(path, int(perm,8))
+    return 0
+
+  #############################
+  # Set owner for a file. This is not an atomic operation.
+  # A change to the group of a file may be overwritten by this one.
+  #############################
+  def do_chown(self, line):
+    params = line.split()
+    if (len(params) != 2):
+      print "  ERROR usage: chown <ownername> <pathname>\n"
+      return 0
+    owner = params[0].strip()
+    name = params[1].strip()
+    if name == "":
+      print "  ERROR usage: chown <ownername> <pathname>\n"
+      return 0
+
+    # get the current owner and group
+    path = Pathname();
+    path.pathname = name;
+    cur = self.client.stat(path)
+
+    # set new owner, keep old group
+    status = self.client.chown(path, owner, cur.group)
+    return 0
+
+  #######################################
+  # Set the replication factor for a file
+  ######################################
+  def do_setreplication(self, line):
+    params = line.split()
+    if (len(params) != 2):
+      print "  ERROR usage: setreplication <replication factor> <pathname>\n"
+      return 0
+    repl = params[0].strip()
+    name = params[1].strip()
+    if name == "":
+      print "  ERROR usage: setreplication <replication factor> <pathname>\n"
+      return 0
+    if repl == "":
+      print "  ERROR usage: setreplication <replication factor> <pathname>\n"
+      return 0
+
+    path = Pathname();
+    path.pathname = name;
+    status = self.client.setReplication(path, int(repl))
+    return 0
+
+  #############################
+  # Display the locations of the blocks of this file
+  #############################
+  def do_getlocations(self, name):
+    if name == "":
+      print "  ERROR usage: getlocations <pathname>\n"
+      return 0
+    path = Pathname();
+    path.pathname = name;
+
+    # find size of hdfs file
+    filesize = self.client.stat(path).length
+
+    # getlocations file
+    blockLocations = self.client.getFileBlockLocations(path, 0, filesize)
+    for item in blockLocations:
+      self.printLocations(item)
+    
+    return 0
+
+  #############################
+  # Utility methods from here
+  #############################
+  #
+  # If I don't do this, the last command is always re-executed which is annoying.
+  #
+  def emptyline(self):
+    pass
+
+  # 
+  # print the status of a path
+  #
+  def printStatus(self, stat):
+    print str(stat.block_replication) + "\t" + str(stat.length) + "\t" + str(stat.modification_time) + "\t" + stat.permission + "\t" + stat.owner + "\t" + stat.group + "\t" + stat.path
+          
+  # 
+  # print the locations of a block
+  #
+  def printLocations(self, location):
+    print str(location.names) + "\t"  + str(location.offset) + "\t" + str(location.length)
+
+  #
+  # Various ways to exit the hdfs shell
+  #
+  def do_quit(self,ignored):
+    try:
+      if startServer:
+        self.client.shutdown(1)
+      return -1
+    except Exception, ex:
+      return -1
+
+  def do_q(self,ignored):
+    return self.do_quit(ignored)
+
+  # ctl-d
+  def do_EOF(self,ignored):
+    return self.do_quit(ignored)
+
+  #
+  # Give the user some amount of help - I am a nice guy
+  #
+
+  def help_create(self):
+    print "create <pathname>"
+
+  def help_rm(self):
+    print "rm <pathname>"
+
+  def help_mv(self):
+    print "mv <srcpathname> <destpathname>"
+
+  def help_mkdirs(self):
+    print "mkdirs <pathname>"
+
+  def help_exists(self):
+    print "exists <pathname>"
+
+  def help_put(self):
+    print "put <localpathname> <hdfspathname>"
+
+  def help_get(self):
+    print "get <hdfspathname> <localpathname>"
+
+  def help_ls(self):
+    print "ls <hdfspathname>"
+
+  def help_chmod(self):
+    print "chmod 775 <hdfspathname>"
+
+  def help_chown(self):
+    print "chown <ownername> <hdfspathname>"
+
+  def help_setreplication(self):
+    print "setrep <replication factor> <hdfspathname>"
+
+  def help_getlocations(self):
+    print "getlocations <pathname>"
+
+  def help_EOF(self):
+    print '<ctl-d> will quit this program.'
+
+  def help_quit(self):
+    print 'if you need to know what quit does, you shouldn\'t be using a computer.'
+
+  def help_q(self):
+    print 'quit and if you need to know what quit does, you shouldn\'t be using a computer.'
+
+  def help_help(self):
+    print 'duh'
+
+  def usage(exec_name):
+    print "Usage: "
+    print "  %s [proxyclientname [proxyclientport]]" % exec_name
+    print "  %s -v" % exec_name
+    print "  %s --help" % exec_name
+    print "  %s -h" % exec_name
+
+if __name__ == "__main__":
+
+  #
+  # Rudimentary command line processing.
+  #
+
+  # real parsing:
+  parser = OptionParser()
+  parser.add_option("-e", "--execute", dest="command_str",
+                                      help="execute this command and exit")
+  parser.add_option("-s","--proxyclient",dest="host",help="the proxyclient's hostname")
+  parser.add_option("-p","--port",dest="port",help="the proxyclient's port number")
+
+  (options, args) = parser.parse_args()
+
+  #
+  # Save host and port information of the proxy server
+  #
+  if (options.host):
+    host = options.host
+    startServer = False
+  if (options.port):
+    port = options.port
+    startServer = False
+
+  #
+  # Retrieve the user's readline history.
+  #
+  historyFileName = os.path.expanduser("~/.hdfs_history")
+  if (os.path.exists(historyFileName)):
+    readline.read_history_file(historyFileName)
+
+  #
+  # Create class and connect to proxy server
+  #
+  c = hadoopthrift_cli(host,port)
+
+  if startServer:
+    if c.startProxyServer() == False:
+      sys.exit(1)
+  if c.connect() == False:
+    sys.exit(1)
+    
+
+  #
+  # If this utility was invoked with one argument, process it
+  #
+  if (options.command_str):
+    c.onecmd(options.command_str)
+    sys.exit(0)
+
+  #
+  # Start looping over user commands.
+  #
+  c.cmdloop('Welcome to the Thrift interactive shell for Hadoop File System. - how can I help you? ' + '\n'
+      'Press tab twice to see the list of commands. ' + '\n' +
+      'To complete the name of a command press tab once. \n'
+      )
+  c.shutdown();
+
+  readline.write_history_file(historyFileName)
+  print '' # I am nothing if not courteous.
+  sys.exit(0)

+ 31 - 0
src/contrib/thriftfs/scripts/start_thrift_server.sh

@@ -0,0 +1,31 @@
+#!/bin/sh
+
+CLASSPATH=
+TOP=../../../..
+
+# the hadoop libraries
+for f in $TOP/build/*.jar ; do
+  CLASSPATH=$CLASSPATH:$f
+done
+
+# the apache libraries
+for f in $TOP/lib/*.jar ; do
+  CLASSPATH=$CLASSPATH:$f
+done
+
+# the thrift libraries
+for f in $TOP/lib/thrift/*.jar ; do
+  CLASSPATH=$CLASSPATH:$f
+done
+
+# the thrift server
+for f in $TOP/build/contrib/thriftfs/*.jar ; do
+  CLASSPATH=$CLASSPATH:$f
+done
+# the thrift hadoop api
+for f in $TOP/src/contrib/thriftfs/lib/*.jar ; do
+  CLASSPATH=$CLASSPATH:$f
+done
+
+java -Dcom.sun.management.jmxremote -cp $CLASSPATH org.apache.hadoop.thriftfs.HadoopThriftServer $*
+

+ 616 - 0
src/contrib/thriftfs/src/java/org/apache/hadoop/thriftfs/HadoopThriftServer.java

@@ -0,0 +1,616 @@
+package org.apache.hadoop.thriftfs;
+
+import com.facebook.thrift.TException;
+import com.facebook.thrift.TApplicationException;
+import com.facebook.thrift.protocol.TBinaryProtocol;
+import com.facebook.thrift.protocol.TProtocol;
+import com.facebook.thrift.server.TServer;
+import com.facebook.thrift.server.TThreadPoolServer;
+import com.facebook.thrift.transport.TServerSocket;
+import com.facebook.thrift.transport.TServerTransport;
+import com.facebook.thrift.transport.TTransportFactory;
+
+// Include Generated code
+import org.apache.hadoop.thriftfs.api.*;
+import org.apache.hadoop.thriftfs.api.ThriftHadoopFileSystem;
+
+import java.io.*;
+import java.util.*;
+import java.net.*;
+
+import org.apache.hadoop.fs.*;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.util.Daemon;
+import org.apache.hadoop.util.StringUtils;
+
+/**
+ * ThriftHadoopFileSystem
+ * A thrift wrapper around the Hadoop File System
+ */
+public class HadoopThriftServer extends ThriftHadoopFileSystem {
+
+  static int serverPort = 0;                    // default port
+  TServer    server = null;
+
+  public static class HadoopThriftHandler implements ThriftHadoopFileSystem.Iface
+  {
+
+    public static final Log LOG = LogFactory.getLog("org.apache.hadoop.thrift");
+
+    // HDFS glue
+    Configuration conf;
+    FileSystem fs;
+        
+    // stucture that maps each Thrift object into an hadoop object
+    private long nextId = new Random().nextLong();
+    private HashMap<Long, Object> hadoopHash = new HashMap<Long, Object>();
+    private Daemon inactivityThread = null;
+
+    // Detect inactive session
+    private static volatile long inactivityPeriod = 3600 * 1000; // 1 hr
+    private static volatile long inactivityRecheckInterval = 60 * 1000;
+    private static volatile boolean fsRunning = true;
+    private static long now;
+
+    // allow outsider to change the hadoopthrift path
+    public void setOption(String key, String val) {
+    }
+
+    /**
+     * Current system time.
+     * @return current time in msec.
+     */
+    static long now() {
+      return System.currentTimeMillis();
+    }
+
+    /**
+    * getVersion
+    *
+    * @return current version of the interface.
+    */
+    public String getVersion() {
+      return "0.1";
+    }
+
+    /**
+     * shutdown
+     *
+     * cleanly closes everything and exit.
+     */
+    public void shutdown(int status) {
+      LOG.info("HadoopThriftServer shutting down.");
+      try {
+        fs.close();
+      } catch (IOException e) {
+        LOG.warn("Unable to close file system");
+      }
+      Runtime.getRuntime().exit(status);
+    }
+
+    /**
+     * Periodically checks to see if there is inactivity
+     */
+    class InactivityMonitor implements Runnable {
+      public void run() {
+        while (fsRunning) {
+          try {
+            if (now() > now + inactivityPeriod) {
+              LOG.warn("HadoopThriftServer Inactivity period of " +
+                       inactivityPeriod + " expired... Stopping Server.");
+              shutdown(-1);
+            }
+          } catch (Exception e) {
+            LOG.error(StringUtils.stringifyException(e));
+          }
+          try {
+            Thread.sleep(inactivityRecheckInterval);
+          } catch (InterruptedException ie) {
+          }
+        }
+      }
+    }
+
+    /**
+     * HadoopThriftServer
+     *
+     * Constructor for the HadoopThriftServer glue with Thrift Class.
+     *
+     * @param name - the name of this handler
+     */
+    public HadoopThriftHandler(String name) {
+      conf = new Configuration();
+      now = now();
+      try {
+        inactivityThread = new Daemon(new InactivityMonitor());
+        fs = FileSystem.get(conf);
+      } catch (IOException e) {
+        LOG.warn("Unable to open hadoop file system...");
+        Runtime.getRuntime().exit(-1);
+      }
+    }
+
+    /**
+      * printStackTrace
+      *
+      * Helper function to print an exception stack trace to the log and not stderr
+      *
+      * @param e the exception
+      *
+      */
+    static private void printStackTrace(Exception e) {
+      for(StackTraceElement s: e.getStackTrace()) {
+        LOG.error(s);
+      }
+    }
+
+    /**
+     * Lookup a thrift object into a hadoop object
+     */
+    private synchronized Object lookup(long id) {
+      return hadoopHash.get(new Long(id));
+    }
+
+    /**
+     * Insert a thrift object into a hadoop object. Return its id.
+     */
+    private synchronized long insert(Object o) {
+      nextId++;
+      hadoopHash.put(nextId, o);
+      return nextId;
+    }
+
+    /**
+     * Delete a thrift object from the hadoop store.
+     */
+    private synchronized Object remove(long id) {
+      return hadoopHash.remove(new Long(id));
+    }
+
+    /**
+      * Implement the API exported by this thrift server
+      */
+
+    /** Set inactivity timeout period. The period is specified in seconds.
+      * if there are no RPC calls to the HadoopThrift server for this much
+      * time, then the server kills itself.
+      */
+    public synchronized void setInactivityTimeoutPeriod(long periodInSeconds) {
+      inactivityPeriod = periodInSeconds * 1000; // in milli seconds
+      if (inactivityRecheckInterval > inactivityPeriod ) {
+        inactivityRecheckInterval = inactivityPeriod;
+      }
+    }
+
+
+    /**
+      * Create a file and open it for writing
+      */
+    public ThriftHandle create(Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("create: " + path);
+        FSDataOutputStream out = fs.create(new Path(path.pathname));
+        long id = insert(out);
+        ThriftHandle obj = new ThriftHandle(id);
+        HadoopThriftHandler.LOG.debug("created: " + path + " id: " + id);
+        return obj;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+      * Create a file and open it for writing, delete file if it exists
+      */
+    public ThriftHandle createFile(Pathname path, 
+                                   short mode,
+                                   boolean  overwrite,
+                                   int bufferSize,
+                                   short replication,
+                                   long blockSize) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("create: " + path +
+                                     " permission: " + mode +
+                                     " overwrite: " + overwrite +
+                                     " bufferSize: " + bufferSize +
+                                     " replication: " + replication +
+                                     " blockSize: " + blockSize);
+        FSDataOutputStream out = fs.create(new Path(path.pathname), 
+                                           new FsPermission(mode),
+                                           overwrite,
+                                           bufferSize,
+                                           replication,
+                                           blockSize,
+                                           null); // progress
+        long id = insert(out);
+        ThriftHandle obj = new ThriftHandle(id);
+        HadoopThriftHandler.LOG.debug("created: " + path + " id: " + id);
+        return obj;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Opens an existing file and returns a handle to read it
+     */
+    public ThriftHandle open(Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("open: " + path);
+        FSDataInputStream out = fs.open(new Path(path.pathname));
+        long id = insert(out);
+        ThriftHandle obj = new ThriftHandle(id);
+        HadoopThriftHandler.LOG.debug("opened: " + path + " id: " + id);
+        return obj;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Opens an existing file to append to it.
+     */
+    public ThriftHandle append(Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("append: " + path);
+        FSDataOutputStream out = fs.append(new Path(path.pathname));
+        long id = insert(out);
+        ThriftHandle obj = new ThriftHandle(id);
+        HadoopThriftHandler.LOG.debug("appended: " + path + " id: " + id);
+        return obj;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * write to a file
+     */
+    public boolean write(ThriftHandle tout, String data) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("write: " + tout.id);
+        FSDataOutputStream out = (FSDataOutputStream)lookup(tout.id);
+        byte[] tmp = data.getBytes("UTF-8");
+        out.write(tmp, 0, tmp.length);
+        HadoopThriftHandler.LOG.debug("wrote: " + tout.id);
+        return true;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * read from a file
+     */
+    public String read(ThriftHandle tout, long offset,
+                       int length) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("read: " + tout.id +
+                                     " offset: " + offset +
+                                     " length: " + length);
+        FSDataInputStream in = (FSDataInputStream)lookup(tout.id);
+        if (in.getPos() != offset) {
+          in.seek(offset);
+        }
+        byte[] tmp = new byte[length];
+        int numbytes = in.read(offset, tmp, 0, length);
+        HadoopThriftHandler.LOG.debug("read done: " + tout.id);
+        return new String(tmp, 0, numbytes, "UTF-8");
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Delete a file/directory
+     */
+    public boolean rm(Pathname path, boolean recursive) 
+                          throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("rm: " + path +
+                                     " recursive: " + recursive);
+        boolean ret = fs.delete(new Path(path.pathname), recursive);
+        HadoopThriftHandler.LOG.debug("rm: " + path);
+        return ret;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Move a file/directory
+     */
+    public boolean rename(Pathname path, Pathname dest) 
+                          throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("rename: " + path +
+                                     " destination: " + dest);
+        boolean ret = fs.rename(new Path(path.pathname), 
+                                new Path(dest.pathname));
+        HadoopThriftHandler.LOG.debug("rename: " + path);
+        return ret;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     *  close file
+     */
+     public boolean close(ThriftHandle tout) throws ThriftIOException {
+       try {
+         now = now();
+         HadoopThriftHandler.LOG.debug("close: " + tout.id);
+         Object obj = remove(tout.id);
+         if (obj instanceof FSDataOutputStream) {
+           FSDataOutputStream out = (FSDataOutputStream)obj;
+           out.close();
+         } else if (obj instanceof FSDataInputStream) {
+           FSDataInputStream in = (FSDataInputStream)obj;
+           in.close();
+         } else {
+           throw new ThriftIOException("Unknown thrift handle.");
+         }
+         HadoopThriftHandler.LOG.debug("closed: " + tout.id);
+         return true;
+       } catch (IOException e) {
+         throw new ThriftIOException(e.getMessage());
+       }
+     }
+
+     /**
+      * Create a directory
+      */
+    public boolean mkdirs(Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("mkdirs: " + path);
+        boolean ret = fs.mkdirs(new Path(path.pathname));
+        HadoopThriftHandler.LOG.debug("mkdirs: " + path);
+        return ret;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Does this pathname exist?
+     */
+    public boolean exists(Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("exists: " + path);
+        boolean ret = fs.exists(new Path(path.pathname));
+        HadoopThriftHandler.LOG.debug("exists done: " + path);
+        return ret;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Returns status about the specified pathname
+     */
+    public org.apache.hadoop.thriftfs.api.FileStatus stat(
+                            Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("stat: " + path);
+        org.apache.hadoop.fs.FileStatus stat = fs.getFileStatus(
+                                           new Path(path.pathname));
+        HadoopThriftHandler.LOG.debug("stat done: " + path);
+        return new org.apache.hadoop.thriftfs.api.FileStatus(
+          stat.getPath().toString(),
+          stat.getLen(),
+          stat.isDir(),
+          stat.getReplication(),
+          stat.getBlockSize(),
+          stat.getModificationTime(),
+          stat.getPermission().toString(),
+          stat.getOwner(),
+          stat.getGroup());
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * If the specified pathname is a directory, then return the
+     * list of pathnames in this directory
+     */
+    public List<org.apache.hadoop.thriftfs.api.FileStatus> listStatus(
+                            Pathname path) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("listStatus: " + path);
+
+        org.apache.hadoop.fs.FileStatus[] stat = fs.listStatus(
+                                           new Path(path.pathname));
+        HadoopThriftHandler.LOG.debug("listStatus done: " + path);
+        org.apache.hadoop.thriftfs.api.FileStatus tmp;
+        List<org.apache.hadoop.thriftfs.api.FileStatus> value = 
+          new LinkedList<org.apache.hadoop.thriftfs.api.FileStatus>();
+
+        for (int i = 0; i < stat.length; i++) {
+          tmp = new org.apache.hadoop.thriftfs.api.FileStatus(
+                      stat[i].getPath().toString(),
+                      stat[i].getLen(),
+                      stat[i].isDir(),
+                      stat[i].getReplication(),
+                      stat[i].getBlockSize(),
+                      stat[i].getModificationTime(),
+                      stat[i].getPermission().toString(),
+                      stat[i].getOwner(),
+                      stat[i].getGroup());
+          value.add(tmp);
+        }
+        return value;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Sets the permission of a pathname
+     */
+    public void chmod(Pathname path, short mode) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("chmod: " + path + 
+                                     " mode " + mode);
+        fs.setPermission(new Path(path.pathname), new FsPermission(mode));
+        HadoopThriftHandler.LOG.debug("chmod done: " + path);
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Sets the owner & group of a pathname
+     */
+    public void chown(Pathname path, String owner, String group) 
+                                                       throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("chown: " + path +
+                                     " owner: " + owner +
+                                     " group: " + group);
+        fs.setOwner(new Path(path.pathname), owner, group);
+        HadoopThriftHandler.LOG.debug("chown done: " + path);
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+
+    /**
+     * Sets the replication factor of a file
+     */
+    public void setReplication(Pathname path, short repl) throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("setrepl: " + path +
+                                     " replication factor: " + repl);
+        fs.setReplication(new Path(path.pathname), repl);
+        HadoopThriftHandler.LOG.debug("setrepl done: " + path);
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+
+    }
+
+    /**
+     * Returns the block locations of this file
+     */
+    public List<org.apache.hadoop.thriftfs.api.BlockLocation> 
+             getFileBlockLocations(Pathname path, long start, long length) 
+                                         throws ThriftIOException {
+      try {
+        now = now();
+        HadoopThriftHandler.LOG.debug("getFileBlockLocations: " + path);
+
+        org.apache.hadoop.fs.FileStatus status = fs.getFileStatus(
+                                                 new Path(path.pathname));
+
+        org.apache.hadoop.fs.BlockLocation[] stat = 
+            fs.getFileBlockLocations(status, start, length);
+        HadoopThriftHandler.LOG.debug("getFileBlockLocations done: " + path);
+
+        org.apache.hadoop.thriftfs.api.BlockLocation tmp;
+        List<org.apache.hadoop.thriftfs.api.BlockLocation> value = 
+          new LinkedList<org.apache.hadoop.thriftfs.api.BlockLocation>();
+
+        for (int i = 0; i < stat.length; i++) {
+
+          // construct the list of hostnames from the array returned
+          // by HDFS
+          List<String> hosts = new LinkedList<String>();
+          String[] hostsHdfs = stat[i].getHosts();
+          for (int j = 0; j < hostsHdfs.length; j++) {
+            hosts.add(hostsHdfs[j]);
+          }
+
+          // construct the list of host:port from the array returned
+          // by HDFS
+          List<String> names = new LinkedList<String>();
+          String[] namesHdfs = stat[i].getNames();
+          for (int j = 0; j < namesHdfs.length; j++) {
+            names.add(namesHdfs[j]);
+          }
+          tmp = new org.apache.hadoop.thriftfs.api.BlockLocation(
+                      hosts, names, stat[i].getOffset(), stat[i].getLength());
+          value.add(tmp);
+        }
+        return value;
+      } catch (IOException e) {
+        throw new ThriftIOException(e.getMessage());
+      }
+    }
+  }
+
+  // Bind to port. If the specified port is 0, then bind to random port.
+  private ServerSocket createServerSocket(int port) throws IOException {
+    try {
+      ServerSocket sock = new ServerSocket();
+      // Prevent 2MSL delay problem on server restarts
+      sock.setReuseAddress(true);
+      // Bind to listening port
+      if (port == 0) {
+        sock.bind(null);
+        serverPort = sock.getLocalPort();
+      } else {
+        sock.bind(new InetSocketAddress(port));
+      }
+      return sock;
+    } catch (IOException ioe) {
+      throw new IOException("Could not create ServerSocket on port " + port + "." +
+                            ioe);
+    }
+  }
+
+  /**
+   * Constrcts a server object
+   */
+  public HadoopThriftServer(String [] args) {
+
+    if (args.length > 0) {
+      serverPort = new Integer(args[0]);
+    }
+    try {
+      ServerSocket ssock = createServerSocket(serverPort);
+      TServerTransport serverTransport = new TServerSocket(ssock);
+      Iface handler = new HadoopThriftHandler("hdfs-thrift-dhruba");
+      ThriftHadoopFileSystem.Processor processor = new ThriftHadoopFileSystem.Processor(handler);
+      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
+      options.minWorkerThreads = 10;
+      server = new TThreadPoolServer(processor, serverTransport,
+                                             new TTransportFactory(),
+                                             new TTransportFactory(),
+                                             new TBinaryProtocol.Factory(),
+                                             new TBinaryProtocol.Factory(), 
+                                             options);
+      System.out.println("Starting the hadoop thrift server on port [" + serverPort + "]...");
+      HadoopThriftHandler.LOG.info("Starting the hadoop thrift server on port [" +serverPort + "]...");
+      System.out.flush();
+
+    } catch (Exception x) {
+      x.printStackTrace();
+    }
+  }
+
+  public static void main(String [] args) {
+    HadoopThriftServer me = new HadoopThriftServer(args);
+    me.server.serve();
+  }
+};
+

+ 51 - 0
src/contrib/thriftfs/test/org/apache/hadoop/thriftfs/TestThriftfs.java

@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.thriftfs;
+
+import junit.framework.TestCase;
+import java.io.*;
+
+/**
+ * This class is supposed to test ThriftHadoopFileSystem but has a long long
+ * way to go.
+ */
+public class TestThriftfs extends TestCase
+{
+  final static int numDatanodes = 1;
+
+  public TestThriftfs() throws IOException
+  {
+  }
+
+  public void testServer() throws IOException
+  {
+    Configuration conf = new Configuration();
+    MiniDFSCluster cluster = new MiniDFSCluster(conf, numDatanodes, true, null);
+    cluster.waitActive();
+    DistributedFileSystem dfs = (DistributedFileSystem)cluster.getFileSystem();
+    HadoopThriftServer server = new HadoopThriftServer();
+    server.close();
+  }
+
+  public static void main(String[]args) throws Exception
+  {
+    new TestThriftfs().testServer();
+  }
+
+}