| /** |
| * 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(); |
| } |
| |
| |
| |