Added:
hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.pyc
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.pyc?rev=690096&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ThriftHadoopFileSystem.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.py
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.py?rev=690096&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.py (added)
+++ hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.py Thu Aug
28 21:31:57 2008
@@ -0,0 +1 @@
+__all__ = ['ttypes', 'constants', 'ThriftHadoopFileSystem']
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.pyc
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.pyc?rev=690096&view=auto
==============================================================================
Binary file - no diff available.
Propchange: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/__init__.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/constants.py
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/constants.py?rev=690096&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/constants.py (added)
+++ hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/constants.py Thu Aug
28 21:31:57 2008
@@ -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 *
+
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.py
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.py?rev=690096&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.py (added)
+++ hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.py Thu Aug 28
21:31:57 2008
@@ -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)
+
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.pyc
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.pyc?rev=690096&view=auto
==============================================================================
Binary file - no diff available.
Propchange: hadoop/core/trunk/src/contrib/thriftfs/gen-py/hadoopfs/ttypes.pyc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb?rev=690096&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb
(added)
+++ hadoop/core/trunk/src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb Thu
Aug 28 21:31:57 2008
@@ -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
+
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_constants.rb
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_constants.rb?rev=690096&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_constants.rb (added)
+++ hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_constants.rb Thu Aug
28 21:31:57 2008
@@ -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'
+
Added: hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_types.rb
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_types.rb?rev=690096&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_types.rb (added)
+++ hadoop/core/trunk/src/contrib/thriftfs/gen-rb/hadoopfs_types.rb Thu Aug 28
21:31:57 2008
@@ -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
+