UNPKG

nopala

Version:

Impala and Hive client for Nodejs

1,886 lines (1,829 loc) 1.26 MB
// // Autogenerated by Thrift Compiler (0.12.0) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // "use strict"; var thrift = require('thrift'); var Thrift = thrift.Thrift; var Q = thrift.Q; var fb303_ttypes = require('./fb303_types'); var FacebookService = require('./FacebookService'); var FacebookServiceClient = FacebookService.Client; var FacebookServiceProcessor = FacebookService.Processor; var ttypes = require('./hive_metastore_types'); //HELPER FUNCTIONS AND STRUCTURES var ThriftHiveMetastore_getMetaConf_args = function(args) { this.key = null; if (args) { if (args.key !== undefined && args.key !== null) { this.key = args.key; } } }; ThriftHiveMetastore_getMetaConf_args.prototype = {}; ThriftHiveMetastore_getMetaConf_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.key = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_getMetaConf_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_getMetaConf_args'); if (this.key !== null && this.key !== undefined) { output.writeFieldBegin('key', Thrift.Type.STRING, 1); output.writeString(this.key); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_getMetaConf_result = function(args) { this.success = null; this.o1 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } } }; ThriftHiveMetastore_getMetaConf_result.prototype = {}; ThriftHiveMetastore_getMetaConf_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRING) { this.success = input.readString(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_getMetaConf_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_getMetaConf_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRING, 0); output.writeString(this.success); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_setMetaConf_args = function(args) { this.key = null; this.value = null; if (args) { if (args.key !== undefined && args.key !== null) { this.key = args.key; } if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; ThriftHiveMetastore_setMetaConf_args.prototype = {}; ThriftHiveMetastore_setMetaConf_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.key = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_setMetaConf_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_setMetaConf_args'); if (this.key !== null && this.key !== undefined) { output.writeFieldBegin('key', Thrift.Type.STRING, 1); output.writeString(this.key); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 2); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_setMetaConf_result = function(args) { this.o1 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args) { if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } } }; ThriftHiveMetastore_setMetaConf_result.prototype = {}; ThriftHiveMetastore_setMetaConf_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_setMetaConf_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_setMetaConf_result'); if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_create_database_args = function(args) { this.database = null; if (args) { if (args.database !== undefined && args.database !== null) { this.database = new ttypes.Database(args.database); } } }; ThriftHiveMetastore_create_database_args.prototype = {}; ThriftHiveMetastore_create_database_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.database = new ttypes.Database(); this.database.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_create_database_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_create_database_args'); if (this.database !== null && this.database !== undefined) { output.writeFieldBegin('database', Thrift.Type.STRUCT, 1); this.database.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_create_database_result = function(args) { this.o1 = null; this.o2 = null; this.o3 = null; if (args instanceof ttypes.AlreadyExistsException) { this.o1 = args; return; } if (args instanceof ttypes.InvalidObjectException) { this.o2 = args; return; } if (args instanceof ttypes.MetaException) { this.o3 = args; return; } if (args) { if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } if (args.o3 !== undefined && args.o3 !== null) { this.o3 = args.o3; } } }; ThriftHiveMetastore_create_database_result.prototype = {}; ThriftHiveMetastore_create_database_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.AlreadyExistsException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.InvalidObjectException(); this.o2.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.o3 = new ttypes.MetaException(); this.o3.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_create_database_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_create_database_result'); if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } if (this.o3 !== null && this.o3 !== undefined) { output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3); this.o3.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_database_args = function(args) { this.name = null; if (args) { if (args.name !== undefined && args.name !== null) { this.name = args.name; } } }; ThriftHiveMetastore_get_database_args.prototype = {}; ThriftHiveMetastore_get_database_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.name = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_database_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_database_args'); if (this.name !== null && this.name !== undefined) { output.writeFieldBegin('name', Thrift.Type.STRING, 1); output.writeString(this.name); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_database_result = function(args) { this.success = null; this.o1 = null; this.o2 = null; if (args instanceof ttypes.NoSuchObjectException) { this.o1 = args; return; } if (args instanceof ttypes.MetaException) { this.o2 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Database(args.success); } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } } }; ThriftHiveMetastore_get_database_result.prototype = {}; ThriftHiveMetastore_get_database_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Database(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.NoSuchObjectException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.MetaException(); this.o2.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_database_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_database_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_drop_database_args = function(args) { this.name = null; this.deleteData = null; this.cascade = null; if (args) { if (args.name !== undefined && args.name !== null) { this.name = args.name; } if (args.deleteData !== undefined && args.deleteData !== null) { this.deleteData = args.deleteData; } if (args.cascade !== undefined && args.cascade !== null) { this.cascade = args.cascade; } } }; ThriftHiveMetastore_drop_database_args.prototype = {}; ThriftHiveMetastore_drop_database_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.name = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.BOOL) { this.deleteData = input.readBool(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { this.cascade = input.readBool(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_drop_database_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_drop_database_args'); if (this.name !== null && this.name !== undefined) { output.writeFieldBegin('name', Thrift.Type.STRING, 1); output.writeString(this.name); output.writeFieldEnd(); } if (this.deleteData !== null && this.deleteData !== undefined) { output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 2); output.writeBool(this.deleteData); output.writeFieldEnd(); } if (this.cascade !== null && this.cascade !== undefined) { output.writeFieldBegin('cascade', Thrift.Type.BOOL, 3); output.writeBool(this.cascade); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_drop_database_result = function(args) { this.o1 = null; this.o2 = null; this.o3 = null; if (args instanceof ttypes.NoSuchObjectException) { this.o1 = args; return; } if (args instanceof ttypes.InvalidOperationException) { this.o2 = args; return; } if (args instanceof ttypes.MetaException) { this.o3 = args; return; } if (args) { if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } if (args.o3 !== undefined && args.o3 !== null) { this.o3 = args.o3; } } }; ThriftHiveMetastore_drop_database_result.prototype = {}; ThriftHiveMetastore_drop_database_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.NoSuchObjectException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.InvalidOperationException(); this.o2.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.o3 = new ttypes.MetaException(); this.o3.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_drop_database_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_drop_database_result'); if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } if (this.o3 !== null && this.o3 !== undefined) { output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3); this.o3.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_databases_args = function(args) { this.pattern = null; if (args) { if (args.pattern !== undefined && args.pattern !== null) { this.pattern = args.pattern; } } }; ThriftHiveMetastore_get_databases_args.prototype = {}; ThriftHiveMetastore_get_databases_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.pattern = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_databases_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_databases_args'); if (this.pattern !== null && this.pattern !== undefined) { output.writeFieldBegin('pattern', Thrift.Type.STRING, 1); output.writeString(this.pattern); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_databases_result = function(args) { this.success = null; this.o1 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } } }; ThriftHiveMetastore_get_databases_result.prototype = {}; ThriftHiveMetastore_get_databases_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { this.success = []; var _rtmp3435 = input.readListBegin(); var _size434 = _rtmp3435.size || 0; for (var _i436 = 0; _i436 < _size434; ++_i436) { var elem437 = null; elem437 = input.readString(); this.success.push(elem437); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_databases_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_databases_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter438 in this.success) { if (this.success.hasOwnProperty(iter438)) { iter438 = this.success[iter438]; output.writeString(iter438); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_all_databases_args = function(args) { }; ThriftHiveMetastore_get_all_databases_args.prototype = {}; ThriftHiveMetastore_get_all_databases_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; if (ftype == Thrift.Type.STOP) { break; } input.skip(ftype); input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_all_databases_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_all_databases_result = function(args) { this.success = null; this.o1 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [null]); } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } } }; ThriftHiveMetastore_get_all_databases_result.prototype = {}; ThriftHiveMetastore_get_all_databases_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { this.success = []; var _rtmp3440 = input.readListBegin(); var _size439 = _rtmp3440.size || 0; for (var _i441 = 0; _i441 < _size439; ++_i441) { var elem442 = null; elem442 = input.readString(); this.success.push(elem442); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_all_databases_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRING, this.success.length); for (var iter443 in this.success) { if (this.success.hasOwnProperty(iter443)) { iter443 = this.success[iter443]; output.writeString(iter443); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_alter_database_args = function(args) { this.dbname = null; this.db = null; if (args) { if (args.dbname !== undefined && args.dbname !== null) { this.dbname = args.dbname; } if (args.db !== undefined && args.db !== null) { this.db = new ttypes.Database(args.db); } } }; ThriftHiveMetastore_alter_database_args.prototype = {}; ThriftHiveMetastore_alter_database_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.dbname = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.db = new ttypes.Database(); this.db.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_alter_database_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_alter_database_args'); if (this.dbname !== null && this.dbname !== undefined) { output.writeFieldBegin('dbname', Thrift.Type.STRING, 1); output.writeString(this.dbname); output.writeFieldEnd(); } if (this.db !== null && this.db !== undefined) { output.writeFieldBegin('db', Thrift.Type.STRUCT, 2); this.db.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_alter_database_result = function(args) { this.o1 = null; this.o2 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args instanceof ttypes.NoSuchObjectException) { this.o2 = args; return; } if (args) { if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } } }; ThriftHiveMetastore_alter_database_result.prototype = {}; ThriftHiveMetastore_alter_database_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.NoSuchObjectException(); this.o2.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_alter_database_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_alter_database_result'); if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_type_args = function(args) { this.name = null; if (args) { if (args.name !== undefined && args.name !== null) { this.name = args.name; } } }; ThriftHiveMetastore_get_type_args.prototype = {}; ThriftHiveMetastore_get_type_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.name = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_type_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_type_args'); if (this.name !== null && this.name !== undefined) { output.writeFieldBegin('name', Thrift.Type.STRING, 1); output.writeString(this.name); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_type_result = function(args) { this.success = null; this.o1 = null; this.o2 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args instanceof ttypes.NoSuchObjectException) { this.o2 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = new ttypes.Type(args.success); } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } } }; ThriftHiveMetastore_get_type_result.prototype = {}; ThriftHiveMetastore_get_type_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new ttypes.Type(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.NoSuchObjectException(); this.o2.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_type_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_type_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_create_type_args = function(args) { this.type = null; if (args) { if (args.type !== undefined && args.type !== null) { this.type = new ttypes.Type(args.type); } } }; ThriftHiveMetastore_create_type_args.prototype = {}; ThriftHiveMetastore_create_type_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.type = new ttypes.Type(); this.type.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_create_type_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_create_type_args'); if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.STRUCT, 1); this.type.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_create_type_result = function(args) { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; if (args instanceof ttypes.AlreadyExistsException) { this.o1 = args; return; } if (args instanceof ttypes.InvalidObjectException) { this.o2 = args; return; } if (args instanceof ttypes.MetaException) { this.o3 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } if (args.o3 !== undefined && args.o3 !== null) { this.o3 = args.o3; } } }; ThriftHiveMetastore_create_type_result.prototype = {}; ThriftHiveMetastore_create_type_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.AlreadyExistsException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.InvalidObjectException(); this.o2.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.o3 = new ttypes.MetaException(); this.o3.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_create_type_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_create_type_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } if (this.o3 !== null && this.o3 !== undefined) { output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3); this.o3.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_drop_type_args = function(args) { this.type = null; if (args) { if (args.type !== undefined && args.type !== null) { this.type = args.type; } } }; ThriftHiveMetastore_drop_type_args.prototype = {}; ThriftHiveMetastore_drop_type_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.type = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_drop_type_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_drop_type_args'); if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.STRING, 1); output.writeString(this.type); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_drop_type_result = function(args) { this.success = null; this.o1 = null; this.o2 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args instanceof ttypes.NoSuchObjectException) { this.o2 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = args.success; } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } } }; ThriftHiveMetastore_drop_type_result.prototype = {}; ThriftHiveMetastore_drop_type_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.NoSuchObjectException(); this.o2.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_drop_type_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_drop_type_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_type_all_args = function(args) { this.name = null; if (args) { if (args.name !== undefined && args.name !== null) { this.name = args.name; } } }; ThriftHiveMetastore_get_type_all_args.prototype = {}; ThriftHiveMetastore_get_type_all_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.name = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_type_all_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_type_all_args'); if (this.name !== null && this.name !== undefined) { output.writeFieldBegin('name', Thrift.Type.STRING, 1); output.writeString(this.name); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_type_all_result = function(args) { this.success = null; this.o2 = null; if (args instanceof ttypes.MetaException) { this.o2 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyMap(args.success, [ttypes.Type]); } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } } }; ThriftHiveMetastore_get_type_all_result.prototype = {}; ThriftHiveMetastore_get_type_all_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.MAP) { this.success = {}; var _rtmp3445 = input.readMapBegin(); var _size444 = _rtmp3445.size || 0; for (var _i446 = 0; _i446 < _size444; ++_i446) { var key447 = null; var val448 = null; key447 = input.readString(); val448 = new ttypes.Type(); val448.read(input); this.success[key447] = val448; } input.readMapEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.MetaException(); this.o2.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_type_all_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_type_all_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.MAP, 0); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success)); for (var kiter449 in this.success) { if (this.success.hasOwnProperty(kiter449)) { var viter450 = this.success[kiter449]; output.writeString(kiter449); viter450.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 1); this.o2.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_fields_args = function(args) { this.db_name = null; this.table_name = null; if (args) { if (args.db_name !== undefined && args.db_name !== null) { this.db_name = args.db_name; } if (args.table_name !== undefined && args.table_name !== null) { this.table_name = args.table_name; } } }; ThriftHiveMetastore_get_fields_args.prototype = {}; ThriftHiveMetastore_get_fields_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.db_name = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.table_name = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_fields_args.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_fields_args'); if (this.db_name !== null && this.db_name !== undefined) { output.writeFieldBegin('db_name', Thrift.Type.STRING, 1); output.writeString(this.db_name); output.writeFieldEnd(); } if (this.table_name !== null && this.table_name !== undefined) { output.writeFieldBegin('table_name', Thrift.Type.STRING, 2); output.writeString(this.table_name); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_fields_result = function(args) { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; if (args instanceof ttypes.MetaException) { this.o1 = args; return; } if (args instanceof ttypes.UnknownTableException) { this.o2 = args; return; } if (args instanceof ttypes.UnknownDBException) { this.o3 = args; return; } if (args) { if (args.success !== undefined && args.success !== null) { this.success = Thrift.copyList(args.success, [ttypes.FieldSchema]); } if (args.o1 !== undefined && args.o1 !== null) { this.o1 = args.o1; } if (args.o2 !== undefined && args.o2 !== null) { this.o2 = args.o2; } if (args.o3 !== undefined && args.o3 !== null) { this.o3 = args.o3; } } }; ThriftHiveMetastore_get_fields_result.prototype = {}; ThriftHiveMetastore_get_fields_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 0: if (ftype == Thrift.Type.LIST) { this.success = []; var _rtmp3452 = input.readListBegin(); var _size451 = _rtmp3452.size || 0; for (var _i453 = 0; _i453 < _size451; ++_i453) { var elem454 = null; elem454 = new ttypes.FieldSchema(); elem454.read(input); this.success.push(elem454); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.o1 = new ttypes.MetaException(); this.o1.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.o2 = new ttypes.UnknownTableException(); this.o2.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.o3 = new ttypes.UnknownDBException(); this.o3.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; ThriftHiveMetastore_get_fields_result.prototype.write = function(output) { output.writeStructBegin('ThriftHiveMetastore_get_fields_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter455 in this.success) { if (this.success.hasOwnProperty(iter455)) { iter455 = this.success[iter455]; iter455.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.o1 !== null && this.o1 !== undefined) { output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1); this.o1.write(output); output.writeFieldEnd(); } if (this.o2 !== null && this.o2 !== undefined) { output.writeFieldBegin('o2', Thrift.Type.STRUCT, 2); this.o2.write(output); output.writeFieldEnd(); } if (this.o3 !== null && this.o3 !== undefined) { output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3); this.o3.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var ThriftHiveMetastore_get_fields_with_environment_context_args = function(args) { this.db_name = null; this.table_name = null; this.environment_context = null; if (args) { if (args.db_name !== undefined && args.db_name !== null) { this.db_name = args.db_name; } if (args.table_name !== undefined && args.table_name !== null) { this.table_name = args.table_name; } if (args.environment_context !== undefined && args.environment_context !== null) { this.environment_context = new ttypes.EnvironmentContext(args.environment_context); } } }; ThriftHiveMetastore_get_fields_with_environment_context_args.prototype = {}; ThriftHiveMetastore_get_fields_with_environment_context_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case