UNPKG

nopala

Version:

Impala and Hive client for Nodejs

39,958 lines 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 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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_fields_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_fields_with_environment_context_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();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 3);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_fields_with_environment_context_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_with_environment_context_result.prototype = {};
ThriftHiveMetastore_get_fields_with_environment_context_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 _rtmp3457 = input.readListBegin();
        var _size456 = _rtmp3457.size || 0;
        for (var _i458 = 0; _i458 < _size456; ++_i458) {
          var elem459 = null;
          elem459 = new ttypes.FieldSchema();
          elem459.read(input);
          this.success.push(elem459);
        }
        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_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_fields_with_environment_context_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 iter460 in this.success) {
      if (this.success.hasOwnProperty(iter460)) {
        iter460 = this.success[iter460];
        iter460.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_schema_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_schema_args.prototype = {};
ThriftHiveMetastore_get_schema_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_schema_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_schema_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_schema_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_schema_result.prototype = {};
ThriftHiveMetastore_get_schema_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 _rtmp3462 = input.readListBegin();
        var _size461 = _rtmp3462.size || 0;
        for (var _i463 = 0; _i463 < _size461; ++_i463) {
          var elem464 = null;
          elem464 = new ttypes.FieldSchema();
          elem464.read(input);
          this.success.push(elem464);
        }
        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_schema_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_schema_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 iter465 in this.success) {
      if (this.success.hasOwnProperty(iter465)) {
        iter465 = this.success[iter465];
        iter465.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_schema_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_schema_with_environment_context_args.prototype = {};
ThriftHiveMetastore_get_schema_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 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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_schema_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_schema_with_environment_context_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();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 3);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_schema_with_environment_context_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_schema_with_environment_context_result.prototype = {};
ThriftHiveMetastore_get_schema_with_environment_context_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 _rtmp3467 = input.readListBegin();
        var _size466 = _rtmp3467.size || 0;
        for (var _i468 = 0; _i468 < _size466; ++_i468) {
          var elem469 = null;
          elem469 = new ttypes.FieldSchema();
          elem469.read(input);
          this.success.push(elem469);
        }
        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_schema_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_schema_with_environment_context_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 iter470 in this.success) {
      if (this.success.hasOwnProperty(iter470)) {
        iter470 = this.success[iter470];
        iter470.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_create_table_args = function(args) {
  this.tbl = null;
  if (args) {
    if (args.tbl !== undefined && args.tbl !== null) {
      this.tbl = new ttypes.Table(args.tbl);
    }
  }
};
ThriftHiveMetastore_create_table_args.prototype = {};
ThriftHiveMetastore_create_table_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.tbl = new ttypes.Table();
        this.tbl.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_table_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_table_args');
  if (this.tbl !== null && this.tbl !== undefined) {
    output.writeFieldBegin('tbl', Thrift.Type.STRUCT, 1);
    this.tbl.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_table_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = 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 instanceof ttypes.NoSuchObjectException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_create_table_result.prototype = {};
ThriftHiveMetastore_create_table_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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.NoSuchObjectException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_table_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_table_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_table_with_environment_context_args = function(args) {
  this.tbl = null;
  this.environment_context = null;
  if (args) {
    if (args.tbl !== undefined && args.tbl !== null) {
      this.tbl = new ttypes.Table(args.tbl);
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_create_table_with_environment_context_args.prototype = {};
ThriftHiveMetastore_create_table_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 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.tbl = new ttypes.Table();
        this.tbl.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_table_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_args');
  if (this.tbl !== null && this.tbl !== undefined) {
    output.writeFieldBegin('tbl', Thrift.Type.STRUCT, 1);
    this.tbl.write(output);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 2);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_table_with_environment_context_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = 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 instanceof ttypes.NoSuchObjectException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_create_table_with_environment_context_result.prototype = {};
ThriftHiveMetastore_create_table_with_environment_context_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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.NoSuchObjectException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_table_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_table_with_constraints_args = function(args) {
  this.tbl = null;
  this.primaryKeys = null;
  this.foreignKeys = null;
  if (args) {
    if (args.tbl !== undefined && args.tbl !== null) {
      this.tbl = new ttypes.Table(args.tbl);
    }
    if (args.primaryKeys !== undefined && args.primaryKeys !== null) {
      this.primaryKeys = Thrift.copyList(args.primaryKeys, [ttypes.SQLPrimaryKey]);
    }
    if (args.foreignKeys !== undefined && args.foreignKeys !== null) {
      this.foreignKeys = Thrift.copyList(args.foreignKeys, [ttypes.SQLForeignKey]);
    }
  }
};
ThriftHiveMetastore_create_table_with_constraints_args.prototype = {};
ThriftHiveMetastore_create_table_with_constraints_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.tbl = new ttypes.Table();
        this.tbl.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.primaryKeys = [];
        var _rtmp3472 = input.readListBegin();
        var _size471 = _rtmp3472.size || 0;
        for (var _i473 = 0; _i473 < _size471; ++_i473) {
          var elem474 = null;
          elem474 = new ttypes.SQLPrimaryKey();
          elem474.read(input);
          this.primaryKeys.push(elem474);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.foreignKeys = [];
        var _rtmp3476 = input.readListBegin();
        var _size475 = _rtmp3476.size || 0;
        for (var _i477 = 0; _i477 < _size475; ++_i477) {
          var elem478 = null;
          elem478 = new ttypes.SQLForeignKey();
          elem478.read(input);
          this.foreignKeys.push(elem478);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_table_with_constraints_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_table_with_constraints_args');
  if (this.tbl !== null && this.tbl !== undefined) {
    output.writeFieldBegin('tbl', Thrift.Type.STRUCT, 1);
    this.tbl.write(output);
    output.writeFieldEnd();
  }
  if (this.primaryKeys !== null && this.primaryKeys !== undefined) {
    output.writeFieldBegin('primaryKeys', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRUCT, this.primaryKeys.length);
    for (var iter479 in this.primaryKeys) {
      if (this.primaryKeys.hasOwnProperty(iter479)) {
        iter479 = this.primaryKeys[iter479];
        iter479.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.foreignKeys !== null && this.foreignKeys !== undefined) {
    output.writeFieldBegin('foreignKeys', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRUCT, this.foreignKeys.length);
    for (var iter480 in this.foreignKeys) {
      if (this.foreignKeys.hasOwnProperty(iter480)) {
        iter480 = this.foreignKeys[iter480];
        iter480.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_table_with_constraints_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = 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 instanceof ttypes.NoSuchObjectException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_create_table_with_constraints_result.prototype = {};
ThriftHiveMetastore_create_table_with_constraints_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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.NoSuchObjectException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_table_with_constraints_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_table_with_constraints_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_constraint_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.DropConstraintRequest(args.req);
    }
  }
};
ThriftHiveMetastore_drop_constraint_args.prototype = {};
ThriftHiveMetastore_drop_constraint_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.req = new ttypes.DropConstraintRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_constraint_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_constraint_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_constraint_result = function(args) {
  this.o1 = null;
  this.o3 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = 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.o3 !== undefined && args.o3 !== null) {
      this.o3 = args.o3;
    }
  }
};
ThriftHiveMetastore_drop_constraint_result.prototype = {};
ThriftHiveMetastore_drop_constraint_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.o3 = new ttypes.MetaException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_constraint_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_constraint_result');
  if (this.o1 !== null && this.o1 !== undefined) {
    output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1);
    this.o1.write(output);
    output.writeFieldEnd();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 2);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_primary_key_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.AddPrimaryKeyRequest(args.req);
    }
  }
};
ThriftHiveMetastore_add_primary_key_args.prototype = {};
ThriftHiveMetastore_add_primary_key_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.req = new ttypes.AddPrimaryKeyRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_primary_key_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_primary_key_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_primary_key_result = function(args) {
  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.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_add_primary_key_result.prototype = {};
ThriftHiveMetastore_add_primary_key_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.MetaException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_primary_key_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_primary_key_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_add_foreign_key_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.AddForeignKeyRequest(args.req);
    }
  }
};
ThriftHiveMetastore_add_foreign_key_args.prototype = {};
ThriftHiveMetastore_add_foreign_key_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.req = new ttypes.AddForeignKeyRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_foreign_key_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_foreign_key_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_foreign_key_result = function(args) {
  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.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_add_foreign_key_result.prototype = {};
ThriftHiveMetastore_add_foreign_key_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.MetaException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_foreign_key_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_foreign_key_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_drop_table_args = function(args) {
  this.dbname = null;
  this.name = null;
  this.deleteData = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
  }
};
ThriftHiveMetastore_drop_table_args.prototype = {};
ThriftHiveMetastore_drop_table_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.STRING) {
        this.name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_table_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_table_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 2);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 3);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_table_result = function(args) {
  this.o1 = null;
  this.o3 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = 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.o3 !== undefined && args.o3 !== null) {
      this.o3 = args.o3;
    }
  }
};
ThriftHiveMetastore_drop_table_result.prototype = {};
ThriftHiveMetastore_drop_table_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.o3 = new ttypes.MetaException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_table_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_table_result');
  if (this.o1 !== null && this.o1 !== undefined) {
    output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1);
    this.o1.write(output);
    output.writeFieldEnd();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 2);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_table_with_environment_context_args = function(args) {
  this.dbname = null;
  this.name = null;
  this.deleteData = null;
  this.environment_context = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_drop_table_with_environment_context_args.prototype = {};
ThriftHiveMetastore_drop_table_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.dbname = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_table_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_table_with_environment_context_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 2);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 3);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 4);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_table_with_environment_context_result = function(args) {
  this.o1 = null;
  this.o3 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = 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.o3 !== undefined && args.o3 !== null) {
      this.o3 = args.o3;
    }
  }
};
ThriftHiveMetastore_drop_table_with_environment_context_result.prototype = {};
ThriftHiveMetastore_drop_table_with_environment_context_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.o3 = new ttypes.MetaException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_table_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_table_with_environment_context_result');
  if (this.o1 !== null && this.o1 !== undefined) {
    output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1);
    this.o1.write(output);
    output.writeFieldEnd();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 2);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_tables_args = function(args) {
  this.db_name = null;
  this.pattern = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.pattern !== undefined && args.pattern !== null) {
      this.pattern = args.pattern;
    }
  }
};
ThriftHiveMetastore_get_tables_args.prototype = {};
ThriftHiveMetastore_get_tables_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.pattern = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_tables_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_tables_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.pattern !== null && this.pattern !== undefined) {
    output.writeFieldBegin('pattern', Thrift.Type.STRING, 2);
    output.writeString(this.pattern);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_tables_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_tables_result.prototype = {};
ThriftHiveMetastore_get_tables_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 _rtmp3482 = input.readListBegin();
        var _size481 = _rtmp3482.size || 0;
        for (var _i483 = 0; _i483 < _size481; ++_i483) {
          var elem484 = null;
          elem484 = input.readString();
          this.success.push(elem484);
        }
        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_tables_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_tables_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 iter485 in this.success) {
      if (this.success.hasOwnProperty(iter485)) {
        iter485 = this.success[iter485];
        output.writeString(iter485);
      }
    }
    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_tables_by_type_args = function(args) {
  this.db_name = null;
  this.pattern = null;
  this.tableType = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.pattern !== undefined && args.pattern !== null) {
      this.pattern = args.pattern;
    }
    if (args.tableType !== undefined && args.tableType !== null) {
      this.tableType = args.tableType;
    }
  }
};
ThriftHiveMetastore_get_tables_by_type_args.prototype = {};
ThriftHiveMetastore_get_tables_by_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.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.pattern = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.tableType = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_tables_by_type_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_tables_by_type_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.pattern !== null && this.pattern !== undefined) {
    output.writeFieldBegin('pattern', Thrift.Type.STRING, 2);
    output.writeString(this.pattern);
    output.writeFieldEnd();
  }
  if (this.tableType !== null && this.tableType !== undefined) {
    output.writeFieldBegin('tableType', Thrift.Type.STRING, 3);
    output.writeString(this.tableType);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_tables_by_type_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_tables_by_type_result.prototype = {};
ThriftHiveMetastore_get_tables_by_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.LIST) {
        this.success = [];
        var _rtmp3487 = input.readListBegin();
        var _size486 = _rtmp3487.size || 0;
        for (var _i488 = 0; _i488 < _size486; ++_i488) {
          var elem489 = null;
          elem489 = input.readString();
          this.success.push(elem489);
        }
        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_tables_by_type_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_tables_by_type_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 iter490 in this.success) {
      if (this.success.hasOwnProperty(iter490)) {
        iter490 = this.success[iter490];
        output.writeString(iter490);
      }
    }
    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_table_meta_args = function(args) {
  this.db_patterns = null;
  this.tbl_patterns = null;
  this.tbl_types = null;
  if (args) {
    if (args.db_patterns !== undefined && args.db_patterns !== null) {
      this.db_patterns = args.db_patterns;
    }
    if (args.tbl_patterns !== undefined && args.tbl_patterns !== null) {
      this.tbl_patterns = args.tbl_patterns;
    }
    if (args.tbl_types !== undefined && args.tbl_types !== null) {
      this.tbl_types = Thrift.copyList(args.tbl_types, [null]);
    }
  }
};
ThriftHiveMetastore_get_table_meta_args.prototype = {};
ThriftHiveMetastore_get_table_meta_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_patterns = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_patterns = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.tbl_types = [];
        var _rtmp3492 = input.readListBegin();
        var _size491 = _rtmp3492.size || 0;
        for (var _i493 = 0; _i493 < _size491; ++_i493) {
          var elem494 = null;
          elem494 = input.readString();
          this.tbl_types.push(elem494);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_meta_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_meta_args');
  if (this.db_patterns !== null && this.db_patterns !== undefined) {
    output.writeFieldBegin('db_patterns', Thrift.Type.STRING, 1);
    output.writeString(this.db_patterns);
    output.writeFieldEnd();
  }
  if (this.tbl_patterns !== null && this.tbl_patterns !== undefined) {
    output.writeFieldBegin('tbl_patterns', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_patterns);
    output.writeFieldEnd();
  }
  if (this.tbl_types !== null && this.tbl_types !== undefined) {
    output.writeFieldBegin('tbl_types', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.tbl_types.length);
    for (var iter495 in this.tbl_types) {
      if (this.tbl_types.hasOwnProperty(iter495)) {
        iter495 = this.tbl_types[iter495];
        output.writeString(iter495);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_meta_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, [ttypes.TableMeta]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_get_table_meta_result.prototype = {};
ThriftHiveMetastore_get_table_meta_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 _rtmp3497 = input.readListBegin();
        var _size496 = _rtmp3497.size || 0;
        for (var _i498 = 0; _i498 < _size496; ++_i498) {
          var elem499 = null;
          elem499 = new ttypes.TableMeta();
          elem499.read(input);
          this.success.push(elem499);
        }
        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_table_meta_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_meta_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 iter500 in this.success) {
      if (this.success.hasOwnProperty(iter500)) {
        iter500 = this.success[iter500];
        iter500.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_all_tables_args = function(args) {
  this.db_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
  }
};
ThriftHiveMetastore_get_all_tables_args.prototype = {};
ThriftHiveMetastore_get_all_tables_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 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_all_tables_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_all_tables_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_all_tables_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_tables_result.prototype = {};
ThriftHiveMetastore_get_all_tables_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 _rtmp3502 = input.readListBegin();
        var _size501 = _rtmp3502.size || 0;
        for (var _i503 = 0; _i503 < _size501; ++_i503) {
          var elem504 = null;
          elem504 = input.readString();
          this.success.push(elem504);
        }
        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_tables_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_all_tables_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 iter505 in this.success) {
      if (this.success.hasOwnProperty(iter505)) {
        iter505 = this.success[iter505];
        output.writeString(iter505);
      }
    }
    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_table_args = function(args) {
  this.dbname = null;
  this.tbl_name = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
  }
};
ThriftHiveMetastore_get_table_args.prototype = {};
ThriftHiveMetastore_get_table_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.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_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.Table(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_table_result.prototype = {};
ThriftHiveMetastore_get_table_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.Table();
        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_table_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_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_get_table_objects_by_name_args = function(args) {
  this.dbname = null;
  this.tbl_names = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.tbl_names !== undefined && args.tbl_names !== null) {
      this.tbl_names = Thrift.copyList(args.tbl_names, [null]);
    }
  }
};
ThriftHiveMetastore_get_table_objects_by_name_args.prototype = {};
ThriftHiveMetastore_get_table_objects_by_name_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.LIST) {
        this.tbl_names = [];
        var _rtmp3507 = input.readListBegin();
        var _size506 = _rtmp3507.size || 0;
        for (var _i508 = 0; _i508 < _size506; ++_i508) {
          var elem509 = null;
          elem509 = input.readString();
          this.tbl_names.push(elem509);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_objects_by_name_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.tbl_names !== null && this.tbl_names !== undefined) {
    output.writeFieldBegin('tbl_names', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.tbl_names.length);
    for (var iter510 in this.tbl_names) {
      if (this.tbl_names.hasOwnProperty(iter510)) {
        iter510 = this.tbl_names[iter510];
        output.writeString(iter510);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_objects_by_name_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [ttypes.Table]);
    }
  }
};
ThriftHiveMetastore_get_table_objects_by_name_result.prototype = {};
ThriftHiveMetastore_get_table_objects_by_name_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 _rtmp3512 = input.readListBegin();
        var _size511 = _rtmp3512.size || 0;
        for (var _i513 = 0; _i513 < _size511; ++_i513) {
          var elem514 = null;
          elem514 = new ttypes.Table();
          elem514.read(input);
          this.success.push(elem514);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_objects_by_name_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_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 iter515 in this.success) {
      if (this.success.hasOwnProperty(iter515)) {
        iter515 = this.success[iter515];
        iter515.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_req_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.GetTableRequest(args.req);
    }
  }
};
ThriftHiveMetastore_get_table_req_args.prototype = {};
ThriftHiveMetastore_get_table_req_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.req = new ttypes.GetTableRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_req_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_req_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_req_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.GetTableResult(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_table_req_result.prototype = {};
ThriftHiveMetastore_get_table_req_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.GetTableResult();
        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_table_req_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_req_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_get_table_objects_by_name_req_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.GetTablesRequest(args.req);
    }
  }
};
ThriftHiveMetastore_get_table_objects_by_name_req_args.prototype = {};
ThriftHiveMetastore_get_table_objects_by_name_req_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.req = new ttypes.GetTablesRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_objects_by_name_req_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_req_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_objects_by_name_req_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.InvalidOperationException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.UnknownDBException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.GetTablesResult(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_get_table_objects_by_name_req_result.prototype = {};
ThriftHiveMetastore_get_table_objects_by_name_req_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.GetTablesResult();
        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.InvalidOperationException();
        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_table_objects_by_name_req_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_req_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();
  }
  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_table_names_by_filter_args = function(args) {
  this.dbname = null;
  this.filter = null;
  this.max_tables = -1;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.filter !== undefined && args.filter !== null) {
      this.filter = args.filter;
    }
    if (args.max_tables !== undefined && args.max_tables !== null) {
      this.max_tables = args.max_tables;
    }
  }
};
ThriftHiveMetastore_get_table_names_by_filter_args.prototype = {};
ThriftHiveMetastore_get_table_names_by_filter_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.STRING) {
        this.filter = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.max_tables = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_names_by_filter_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.filter !== null && this.filter !== undefined) {
    output.writeFieldBegin('filter', Thrift.Type.STRING, 2);
    output.writeString(this.filter);
    output.writeFieldEnd();
  }
  if (this.max_tables !== null && this.max_tables !== undefined) {
    output.writeFieldBegin('max_tables', Thrift.Type.I16, 3);
    output.writeI16(this.max_tables);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_names_by_filter_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.InvalidOperationException) {
    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, [null]);
    }
    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_table_names_by_filter_result.prototype = {};
ThriftHiveMetastore_get_table_names_by_filter_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 _rtmp3517 = input.readListBegin();
        var _size516 = _rtmp3517.size || 0;
        for (var _i518 = 0; _i518 < _size516; ++_i518) {
          var elem519 = null;
          elem519 = input.readString();
          this.success.push(elem519);
        }
        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.InvalidOperationException();
        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_table_names_by_filter_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_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 iter520 in this.success) {
      if (this.success.hasOwnProperty(iter520)) {
        iter520 = this.success[iter520];
        output.writeString(iter520);
      }
    }
    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_alter_table_args = function(args) {
  this.dbname = null;
  this.tbl_name = null;
  this.new_tbl = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_tbl !== undefined && args.new_tbl !== null) {
      this.new_tbl = new ttypes.Table(args.new_tbl);
    }
  }
};
ThriftHiveMetastore_alter_table_args.prototype = {};
ThriftHiveMetastore_alter_table_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.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_tbl = new ttypes.Table();
        this.new_tbl.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_table_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_table_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_tbl !== null && this.new_tbl !== undefined) {
    output.writeFieldBegin('new_tbl', Thrift.Type.STRUCT, 3);
    this.new_tbl.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_table_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_table_result.prototype = {};
ThriftHiveMetastore_alter_table_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.InvalidOperationException();
        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_alter_table_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_table_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_alter_table_with_environment_context_args = function(args) {
  this.dbname = null;
  this.tbl_name = null;
  this.new_tbl = null;
  this.environment_context = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_tbl !== undefined && args.new_tbl !== null) {
      this.new_tbl = new ttypes.Table(args.new_tbl);
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_alter_table_with_environment_context_args.prototype = {};
ThriftHiveMetastore_alter_table_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.dbname = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_tbl = new ttypes.Table();
        this.new_tbl.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_table_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_tbl !== null && this.new_tbl !== undefined) {
    output.writeFieldBegin('new_tbl', Thrift.Type.STRUCT, 3);
    this.new_tbl.write(output);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 4);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_table_with_environment_context_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_table_with_environment_context_result.prototype = {};
ThriftHiveMetastore_alter_table_with_environment_context_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.InvalidOperationException();
        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_alter_table_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_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_alter_table_with_cascade_args = function(args) {
  this.dbname = null;
  this.tbl_name = null;
  this.new_tbl = null;
  this.cascade = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_tbl !== undefined && args.new_tbl !== null) {
      this.new_tbl = new ttypes.Table(args.new_tbl);
    }
    if (args.cascade !== undefined && args.cascade !== null) {
      this.cascade = args.cascade;
    }
  }
};
ThriftHiveMetastore_alter_table_with_cascade_args.prototype = {};
ThriftHiveMetastore_alter_table_with_cascade_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.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_tbl = new ttypes.Table();
        this.new_tbl.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.cascade = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_table_with_cascade_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_table_with_cascade_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_tbl !== null && this.new_tbl !== undefined) {
    output.writeFieldBegin('new_tbl', Thrift.Type.STRUCT, 3);
    this.new_tbl.write(output);
    output.writeFieldEnd();
  }
  if (this.cascade !== null && this.cascade !== undefined) {
    output.writeFieldBegin('cascade', Thrift.Type.BOOL, 4);
    output.writeBool(this.cascade);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_table_with_cascade_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_table_with_cascade_result.prototype = {};
ThriftHiveMetastore_alter_table_with_cascade_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.InvalidOperationException();
        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_alter_table_with_cascade_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_table_with_cascade_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_add_partition_args = function(args) {
  this.new_part = null;
  if (args) {
    if (args.new_part !== undefined && args.new_part !== null) {
      this.new_part = new ttypes.Partition(args.new_part);
    }
  }
};
ThriftHiveMetastore_add_partition_args.prototype = {};
ThriftHiveMetastore_add_partition_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.new_part = new ttypes.Partition();
        this.new_part.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partition_args');
  if (this.new_part !== null && this.new_part !== undefined) {
    output.writeFieldBegin('new_part', Thrift.Type.STRUCT, 1);
    this.new_part.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_partition_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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_add_partition_result.prototype = {};
ThriftHiveMetastore_add_partition_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.Partition();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_add_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partition_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();
  }
  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_add_partition_with_environment_context_args = function(args) {
  this.new_part = null;
  this.environment_context = null;
  if (args) {
    if (args.new_part !== undefined && args.new_part !== null) {
      this.new_part = new ttypes.Partition(args.new_part);
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_add_partition_with_environment_context_args.prototype = {};
ThriftHiveMetastore_add_partition_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 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_part = new ttypes.Partition();
        this.new_part.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_partition_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_args');
  if (this.new_part !== null && this.new_part !== undefined) {
    output.writeFieldBegin('new_part', Thrift.Type.STRUCT, 1);
    this.new_part.write(output);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 2);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_partition_with_environment_context_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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_add_partition_with_environment_context_result.prototype = {};
ThriftHiveMetastore_add_partition_with_environment_context_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.Partition();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_add_partition_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_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();
  }
  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_add_partitions_args = function(args) {
  this.new_parts = null;
  if (args) {
    if (args.new_parts !== undefined && args.new_parts !== null) {
      this.new_parts = Thrift.copyList(args.new_parts, [ttypes.Partition]);
    }
  }
};
ThriftHiveMetastore_add_partitions_args.prototype = {};
ThriftHiveMetastore_add_partitions_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.LIST) {
        this.new_parts = [];
        var _rtmp3522 = input.readListBegin();
        var _size521 = _rtmp3522.size || 0;
        for (var _i523 = 0; _i523 < _size521; ++_i523) {
          var elem524 = null;
          elem524 = new ttypes.Partition();
          elem524.read(input);
          this.new_parts.push(elem524);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_partitions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partitions_args');
  if (this.new_parts !== null && this.new_parts !== undefined) {
    output.writeFieldBegin('new_parts', Thrift.Type.LIST, 1);
    output.writeListBegin(Thrift.Type.STRUCT, this.new_parts.length);
    for (var iter525 in this.new_parts) {
      if (this.new_parts.hasOwnProperty(iter525)) {
        iter525 = this.new_parts[iter525];
        iter525.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_partitions_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    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_add_partitions_result.prototype = {};
ThriftHiveMetastore_add_partitions_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.I32) {
        this.success = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_add_partitions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partitions_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.I32, 0);
    output.writeI32(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_add_partitions_pspec_args = function(args) {
  this.new_parts = null;
  if (args) {
    if (args.new_parts !== undefined && args.new_parts !== null) {
      this.new_parts = Thrift.copyList(args.new_parts, [ttypes.PartitionSpec]);
    }
  }
};
ThriftHiveMetastore_add_partitions_pspec_args.prototype = {};
ThriftHiveMetastore_add_partitions_pspec_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.LIST) {
        this.new_parts = [];
        var _rtmp3527 = input.readListBegin();
        var _size526 = _rtmp3527.size || 0;
        for (var _i528 = 0; _i528 < _size526; ++_i528) {
          var elem529 = null;
          elem529 = new ttypes.PartitionSpec();
          elem529.read(input);
          this.new_parts.push(elem529);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_partitions_pspec_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partitions_pspec_args');
  if (this.new_parts !== null && this.new_parts !== undefined) {
    output.writeFieldBegin('new_parts', Thrift.Type.LIST, 1);
    output.writeListBegin(Thrift.Type.STRUCT, this.new_parts.length);
    for (var iter530 in this.new_parts) {
      if (this.new_parts.hasOwnProperty(iter530)) {
        iter530 = this.new_parts[iter530];
        iter530.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_partitions_pspec_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    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_add_partitions_pspec_result.prototype = {};
ThriftHiveMetastore_add_partitions_pspec_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.I32) {
        this.success = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_add_partitions_pspec_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partitions_pspec_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.I32, 0);
    output.writeI32(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_append_partition_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
  }
};
ThriftHiveMetastore_append_partition_args.prototype = {};
ThriftHiveMetastore_append_partition_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3532 = input.readListBegin();
        var _size531 = _rtmp3532.size || 0;
        for (var _i533 = 0; _i533 < _size531; ++_i533) {
          var elem534 = null;
          elem534 = input.readString();
          this.part_vals.push(elem534);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_append_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter535 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter535)) {
        iter535 = this.part_vals[iter535];
        output.writeString(iter535);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_append_partition_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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_append_partition_result.prototype = {};
ThriftHiveMetastore_append_partition_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.Partition();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_append_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_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();
  }
  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_add_partitions_req_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.AddPartitionsRequest(args.request);
    }
  }
};
ThriftHiveMetastore_add_partitions_req_args.prototype = {};
ThriftHiveMetastore_add_partitions_req_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.request = new ttypes.AddPartitionsRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_partitions_req_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partitions_req_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_partitions_req_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.AddPartitionsResult(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_add_partitions_req_result.prototype = {};
ThriftHiveMetastore_add_partitions_req_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.AddPartitionsResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_add_partitions_req_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_partitions_req_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();
  }
  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_append_partition_with_environment_context_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.environment_context = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_append_partition_with_environment_context_args.prototype = {};
ThriftHiveMetastore_append_partition_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3537 = input.readListBegin();
        var _size536 = _rtmp3537.size || 0;
        for (var _i538 = 0; _i538 < _size536; ++_i538) {
          var elem539 = null;
          elem539 = input.readString();
          this.part_vals.push(elem539);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_append_partition_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_with_environment_context_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter540 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter540)) {
        iter540 = this.part_vals[iter540];
        output.writeString(iter540);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 4);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_append_partition_with_environment_context_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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_append_partition_with_environment_context_result.prototype = {};
ThriftHiveMetastore_append_partition_with_environment_context_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.Partition();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_append_partition_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_with_environment_context_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();
  }
  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_append_partition_by_name_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
  }
};
ThriftHiveMetastore_append_partition_by_name_args.prototype = {};
ThriftHiveMetastore_append_partition_by_name_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_append_partition_by_name_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_by_name_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_append_partition_by_name_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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_append_partition_by_name_result.prototype = {};
ThriftHiveMetastore_append_partition_by_name_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.Partition();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_append_partition_by_name_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_by_name_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();
  }
  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_append_partition_by_name_with_environment_context_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_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.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_append_partition_by_name_with_environment_context_args.prototype = {};
ThriftHiveMetastore_append_partition_by_name_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_append_partition_by_name_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_by_name_with_environment_context_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 4);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_append_partition_by_name_with_environment_context_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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_append_partition_by_name_with_environment_context_result.prototype = {};
ThriftHiveMetastore_append_partition_by_name_with_environment_context_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.Partition();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_append_partition_by_name_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_append_partition_by_name_with_environment_context_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();
  }
  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_partition_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.deleteData = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
  }
};
ThriftHiveMetastore_drop_partition_args.prototype = {};
ThriftHiveMetastore_drop_partition_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3542 = input.readListBegin();
        var _size541 = _rtmp3542.size || 0;
        for (var _i543 = 0; _i543 < _size541; ++_i543) {
          var elem544 = null;
          elem544 = input.readString();
          this.part_vals.push(elem544);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter545 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter545)) {
        iter545 = this.part_vals[iter545];
        output.writeString(iter545);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 4);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_partition_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 = 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_partition_result.prototype = {};
ThriftHiveMetastore_drop_partition_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.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_drop_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_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_drop_partition_with_environment_context_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.deleteData = null;
  this.environment_context = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_drop_partition_with_environment_context_args.prototype = {};
ThriftHiveMetastore_drop_partition_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3547 = input.readListBegin();
        var _size546 = _rtmp3547.size || 0;
        for (var _i548 = 0; _i548 < _size546; ++_i548) {
          var elem549 = null;
          elem549 = input.readString();
          this.part_vals.push(elem549);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_partition_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_with_environment_context_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter550 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter550)) {
        iter550 = this.part_vals[iter550];
        output.writeString(iter550);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 4);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 5);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_partition_with_environment_context_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 = 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_partition_with_environment_context_result.prototype = {};
ThriftHiveMetastore_drop_partition_with_environment_context_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.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_drop_partition_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_with_environment_context_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_drop_partition_by_name_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_name = null;
  this.deleteData = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
  }
};
ThriftHiveMetastore_drop_partition_by_name_args.prototype = {};
ThriftHiveMetastore_drop_partition_by_name_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_partition_by_name_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 4);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_partition_by_name_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 = 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_partition_by_name_result.prototype = {};
ThriftHiveMetastore_drop_partition_by_name_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.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_drop_partition_by_name_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_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_drop_partition_by_name_with_environment_context_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_name = null;
  this.deleteData = null;
  this.environment_context = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args.prototype = {};
ThriftHiveMetastore_drop_partition_by_name_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_with_environment_context_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 4);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 5);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_partition_by_name_with_environment_context_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 = 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_partition_by_name_with_environment_context_result.prototype = {};
ThriftHiveMetastore_drop_partition_by_name_with_environment_context_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.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_drop_partition_by_name_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_with_environment_context_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_drop_partitions_req_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.DropPartitionsRequest(args.req);
    }
  }
};
ThriftHiveMetastore_drop_partitions_req_args.prototype = {};
ThriftHiveMetastore_drop_partitions_req_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.req = new ttypes.DropPartitionsRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_partitions_req_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partitions_req_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_partitions_req_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.DropPartitionsResult(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_partitions_req_result.prototype = {};
ThriftHiveMetastore_drop_partitions_req_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.DropPartitionsResult();
        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_drop_partitions_req_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_partitions_req_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_get_partition_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
  }
};
ThriftHiveMetastore_get_partition_args.prototype = {};
ThriftHiveMetastore_get_partition_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3552 = input.readListBegin();
        var _size551 = _rtmp3552.size || 0;
        for (var _i553 = 0; _i553 < _size551; ++_i553) {
          var elem554 = null;
          elem554 = input.readString();
          this.part_vals.push(elem554);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter555 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter555)) {
        iter555 = this.part_vals[iter555];
        output.writeString(iter555);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_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.Partition(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_partition_result.prototype = {};
ThriftHiveMetastore_get_partition_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.Partition();
        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_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_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_exchange_partition_args = function(args) {
  this.partitionSpecs = null;
  this.source_db = null;
  this.source_table_name = null;
  this.dest_db = null;
  this.dest_table_name = null;
  if (args) {
    if (args.partitionSpecs !== undefined && args.partitionSpecs !== null) {
      this.partitionSpecs = Thrift.copyMap(args.partitionSpecs, [null]);
    }
    if (args.source_db !== undefined && args.source_db !== null) {
      this.source_db = args.source_db;
    }
    if (args.source_table_name !== undefined && args.source_table_name !== null) {
      this.source_table_name = args.source_table_name;
    }
    if (args.dest_db !== undefined && args.dest_db !== null) {
      this.dest_db = args.dest_db;
    }
    if (args.dest_table_name !== undefined && args.dest_table_name !== null) {
      this.dest_table_name = args.dest_table_name;
    }
  }
};
ThriftHiveMetastore_exchange_partition_args.prototype = {};
ThriftHiveMetastore_exchange_partition_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.MAP) {
        this.partitionSpecs = {};
        var _rtmp3557 = input.readMapBegin();
        var _size556 = _rtmp3557.size || 0;
        for (var _i558 = 0; _i558 < _size556; ++_i558) {
          var key559 = null;
          var val560 = null;
          key559 = input.readString();
          val560 = input.readString();
          this.partitionSpecs[key559] = val560;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.source_db = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.source_table_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.dest_db = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRING) {
        this.dest_table_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_exchange_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_exchange_partition_args');
  if (this.partitionSpecs !== null && this.partitionSpecs !== undefined) {
    output.writeFieldBegin('partitionSpecs', Thrift.Type.MAP, 1);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.partitionSpecs));
    for (var kiter561 in this.partitionSpecs) {
      if (this.partitionSpecs.hasOwnProperty(kiter561)) {
        var viter562 = this.partitionSpecs[kiter561];
        output.writeString(kiter561);
        output.writeString(viter562);
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.source_db !== null && this.source_db !== undefined) {
    output.writeFieldBegin('source_db', Thrift.Type.STRING, 2);
    output.writeString(this.source_db);
    output.writeFieldEnd();
  }
  if (this.source_table_name !== null && this.source_table_name !== undefined) {
    output.writeFieldBegin('source_table_name', Thrift.Type.STRING, 3);
    output.writeString(this.source_table_name);
    output.writeFieldEnd();
  }
  if (this.dest_db !== null && this.dest_db !== undefined) {
    output.writeFieldBegin('dest_db', Thrift.Type.STRING, 4);
    output.writeString(this.dest_db);
    output.writeFieldEnd();
  }
  if (this.dest_table_name !== null && this.dest_table_name !== undefined) {
    output.writeFieldBegin('dest_table_name', Thrift.Type.STRING, 5);
    output.writeString(this.dest_table_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_exchange_partition_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.MetaException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Partition(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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_exchange_partition_result.prototype = {};
ThriftHiveMetastore_exchange_partition_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.Partition();
        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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.InvalidObjectException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_exchange_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_exchange_partition_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();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_exchange_partitions_args = function(args) {
  this.partitionSpecs = null;
  this.source_db = null;
  this.source_table_name = null;
  this.dest_db = null;
  this.dest_table_name = null;
  if (args) {
    if (args.partitionSpecs !== undefined && args.partitionSpecs !== null) {
      this.partitionSpecs = Thrift.copyMap(args.partitionSpecs, [null]);
    }
    if (args.source_db !== undefined && args.source_db !== null) {
      this.source_db = args.source_db;
    }
    if (args.source_table_name !== undefined && args.source_table_name !== null) {
      this.source_table_name = args.source_table_name;
    }
    if (args.dest_db !== undefined && args.dest_db !== null) {
      this.dest_db = args.dest_db;
    }
    if (args.dest_table_name !== undefined && args.dest_table_name !== null) {
      this.dest_table_name = args.dest_table_name;
    }
  }
};
ThriftHiveMetastore_exchange_partitions_args.prototype = {};
ThriftHiveMetastore_exchange_partitions_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.MAP) {
        this.partitionSpecs = {};
        var _rtmp3564 = input.readMapBegin();
        var _size563 = _rtmp3564.size || 0;
        for (var _i565 = 0; _i565 < _size563; ++_i565) {
          var key566 = null;
          var val567 = null;
          key566 = input.readString();
          val567 = input.readString();
          this.partitionSpecs[key566] = val567;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.source_db = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.source_table_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.dest_db = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRING) {
        this.dest_table_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_exchange_partitions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_exchange_partitions_args');
  if (this.partitionSpecs !== null && this.partitionSpecs !== undefined) {
    output.writeFieldBegin('partitionSpecs', Thrift.Type.MAP, 1);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.partitionSpecs));
    for (var kiter568 in this.partitionSpecs) {
      if (this.partitionSpecs.hasOwnProperty(kiter568)) {
        var viter569 = this.partitionSpecs[kiter568];
        output.writeString(kiter568);
        output.writeString(viter569);
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.source_db !== null && this.source_db !== undefined) {
    output.writeFieldBegin('source_db', Thrift.Type.STRING, 2);
    output.writeString(this.source_db);
    output.writeFieldEnd();
  }
  if (this.source_table_name !== null && this.source_table_name !== undefined) {
    output.writeFieldBegin('source_table_name', Thrift.Type.STRING, 3);
    output.writeString(this.source_table_name);
    output.writeFieldEnd();
  }
  if (this.dest_db !== null && this.dest_db !== undefined) {
    output.writeFieldBegin('dest_db', Thrift.Type.STRING, 4);
    output.writeString(this.dest_db);
    output.writeFieldEnd();
  }
  if (this.dest_table_name !== null && this.dest_table_name !== undefined) {
    output.writeFieldBegin('dest_table_name', Thrift.Type.STRING, 5);
    output.writeString(this.dest_table_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_exchange_partitions_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.MetaException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_exchange_partitions_result.prototype = {};
ThriftHiveMetastore_exchange_partitions_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 _rtmp3571 = input.readListBegin();
        var _size570 = _rtmp3571.size || 0;
        for (var _i572 = 0; _i572 < _size570; ++_i572) {
          var elem573 = null;
          elem573 = new ttypes.Partition();
          elem573.read(input);
          this.success.push(elem573);
        }
        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.NoSuchObjectException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.InvalidObjectException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_exchange_partitions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_exchange_partitions_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 iter574 in this.success) {
      if (this.success.hasOwnProperty(iter574)) {
        iter574 = this.success[iter574];
        iter574.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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_with_auth_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.user_name = null;
  this.group_names = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.user_name !== undefined && args.user_name !== null) {
      this.user_name = args.user_name;
    }
    if (args.group_names !== undefined && args.group_names !== null) {
      this.group_names = Thrift.copyList(args.group_names, [null]);
    }
  }
};
ThriftHiveMetastore_get_partition_with_auth_args.prototype = {};
ThriftHiveMetastore_get_partition_with_auth_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3576 = input.readListBegin();
        var _size575 = _rtmp3576.size || 0;
        for (var _i577 = 0; _i577 < _size575; ++_i577) {
          var elem578 = null;
          elem578 = input.readString();
          this.part_vals.push(elem578);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.user_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.LIST) {
        this.group_names = [];
        var _rtmp3580 = input.readListBegin();
        var _size579 = _rtmp3580.size || 0;
        for (var _i581 = 0; _i581 < _size579; ++_i581) {
          var elem582 = null;
          elem582 = input.readString();
          this.group_names.push(elem582);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_with_auth_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter583 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter583)) {
        iter583 = this.part_vals[iter583];
        output.writeString(iter583);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.user_name !== null && this.user_name !== undefined) {
    output.writeFieldBegin('user_name', Thrift.Type.STRING, 4);
    output.writeString(this.user_name);
    output.writeFieldEnd();
  }
  if (this.group_names !== null && this.group_names !== undefined) {
    output.writeFieldBegin('group_names', Thrift.Type.LIST, 5);
    output.writeListBegin(Thrift.Type.STRING, this.group_names.length);
    for (var iter584 in this.group_names) {
      if (this.group_names.hasOwnProperty(iter584)) {
        iter584 = this.group_names[iter584];
        output.writeString(iter584);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_with_auth_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.Partition(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_partition_with_auth_result.prototype = {};
ThriftHiveMetastore_get_partition_with_auth_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.Partition();
        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_partition_with_auth_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_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_get_partition_by_name_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
  }
};
ThriftHiveMetastore_get_partition_by_name_args.prototype = {};
ThriftHiveMetastore_get_partition_by_name_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_by_name_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_by_name_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_by_name_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.Partition(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_partition_by_name_result.prototype = {};
ThriftHiveMetastore_get_partition_by_name_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.Partition();
        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_partition_by_name_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_by_name_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_get_partitions_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_partitions_args.prototype = {};
ThriftHiveMetastore_get_partitions_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 3);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_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 = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_result.prototype = {};
ThriftHiveMetastore_get_partitions_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 _rtmp3586 = input.readListBegin();
        var _size585 = _rtmp3586.size || 0;
        for (var _i587 = 0; _i587 < _size585; ++_i587) {
          var elem588 = null;
          elem588 = new ttypes.Partition();
          elem588.read(input);
          this.success.push(elem588);
        }
        input.readListEnd();
      } 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_partitions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_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 iter589 in this.success) {
      if (this.success.hasOwnProperty(iter589)) {
        iter589 = this.success[iter589];
        iter589.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_with_auth_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.max_parts = -1;
  this.user_name = null;
  this.group_names = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
    if (args.user_name !== undefined && args.user_name !== null) {
      this.user_name = args.user_name;
    }
    if (args.group_names !== undefined && args.group_names !== null) {
      this.group_names = Thrift.copyList(args.group_names, [null]);
    }
  }
};
ThriftHiveMetastore_get_partitions_with_auth_args.prototype = {};
ThriftHiveMetastore_get_partitions_with_auth_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.user_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.LIST) {
        this.group_names = [];
        var _rtmp3591 = input.readListBegin();
        var _size590 = _rtmp3591.size || 0;
        for (var _i592 = 0; _i592 < _size590; ++_i592) {
          var elem593 = null;
          elem593 = input.readString();
          this.group_names.push(elem593);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_with_auth_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 3);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  if (this.user_name !== null && this.user_name !== undefined) {
    output.writeFieldBegin('user_name', Thrift.Type.STRING, 4);
    output.writeString(this.user_name);
    output.writeFieldEnd();
  }
  if (this.group_names !== null && this.group_names !== undefined) {
    output.writeFieldBegin('group_names', Thrift.Type.LIST, 5);
    output.writeListBegin(Thrift.Type.STRING, this.group_names.length);
    for (var iter594 in this.group_names) {
      if (this.group_names.hasOwnProperty(iter594)) {
        iter594 = this.group_names[iter594];
        output.writeString(iter594);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_with_auth_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 = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_with_auth_result.prototype = {};
ThriftHiveMetastore_get_partitions_with_auth_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 _rtmp3596 = input.readListBegin();
        var _size595 = _rtmp3596.size || 0;
        for (var _i597 = 0; _i597 < _size595; ++_i597) {
          var elem598 = null;
          elem598 = new ttypes.Partition();
          elem598.read(input);
          this.success.push(elem598);
        }
        input.readListEnd();
      } 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_partitions_with_auth_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_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 iter599 in this.success) {
      if (this.success.hasOwnProperty(iter599)) {
        iter599 = this.success[iter599];
        iter599.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_pspec_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_partitions_pspec_args.prototype = {};
ThriftHiveMetastore_get_partitions_pspec_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I32) {
        this.max_parts = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_pspec_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_pspec_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I32, 3);
    output.writeI32(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_pspec_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 = Thrift.copyList(args.success, [ttypes.PartitionSpec]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_pspec_result.prototype = {};
ThriftHiveMetastore_get_partitions_pspec_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 _rtmp3601 = input.readListBegin();
        var _size600 = _rtmp3601.size || 0;
        for (var _i602 = 0; _i602 < _size600; ++_i602) {
          var elem603 = null;
          elem603 = new ttypes.PartitionSpec();
          elem603.read(input);
          this.success.push(elem603);
        }
        input.readListEnd();
      } 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_partitions_pspec_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_pspec_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 iter604 in this.success) {
      if (this.success.hasOwnProperty(iter604)) {
        iter604 = this.success[iter604];
        iter604.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_names_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_partition_names_args.prototype = {};
ThriftHiveMetastore_get_partition_names_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_names_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_names_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 3);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_names_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.copyList(args.success, [null]);
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partition_names_result.prototype = {};
ThriftHiveMetastore_get_partition_names_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 _rtmp3606 = input.readListBegin();
        var _size605 = _rtmp3606.size || 0;
        for (var _i607 = 0; _i607 < _size605; ++_i607) {
          var elem608 = null;
          elem608 = input.readString();
          this.success.push(elem608);
        }
        input.readListEnd();
      } 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_partition_names_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_names_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 iter609 in this.success) {
      if (this.success.hasOwnProperty(iter609)) {
        iter609 = this.success[iter609];
        output.writeString(iter609);
      }
    }
    output.writeListEnd();
    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_partitions_ps_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_partitions_ps_args.prototype = {};
ThriftHiveMetastore_get_partitions_ps_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3611 = input.readListBegin();
        var _size610 = _rtmp3611.size || 0;
        for (var _i612 = 0; _i612 < _size610; ++_i612) {
          var elem613 = null;
          elem613 = input.readString();
          this.part_vals.push(elem613);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_ps_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_ps_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter614 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter614)) {
        iter614 = this.part_vals[iter614];
        output.writeString(iter614);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 4);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_ps_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 = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_ps_result.prototype = {};
ThriftHiveMetastore_get_partitions_ps_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 _rtmp3616 = input.readListBegin();
        var _size615 = _rtmp3616.size || 0;
        for (var _i617 = 0; _i617 < _size615; ++_i617) {
          var elem618 = null;
          elem618 = new ttypes.Partition();
          elem618.read(input);
          this.success.push(elem618);
        }
        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.NoSuchObjectException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_ps_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_ps_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 iter619 in this.success) {
      if (this.success.hasOwnProperty(iter619)) {
        iter619 = this.success[iter619];
        iter619.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_ps_with_auth_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.max_parts = -1;
  this.user_name = null;
  this.group_names = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
    if (args.user_name !== undefined && args.user_name !== null) {
      this.user_name = args.user_name;
    }
    if (args.group_names !== undefined && args.group_names !== null) {
      this.group_names = Thrift.copyList(args.group_names, [null]);
    }
  }
};
ThriftHiveMetastore_get_partitions_ps_with_auth_args.prototype = {};
ThriftHiveMetastore_get_partitions_ps_with_auth_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3621 = input.readListBegin();
        var _size620 = _rtmp3621.size || 0;
        for (var _i622 = 0; _i622 < _size620; ++_i622) {
          var elem623 = null;
          elem623 = input.readString();
          this.part_vals.push(elem623);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRING) {
        this.user_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.LIST) {
        this.group_names = [];
        var _rtmp3625 = input.readListBegin();
        var _size624 = _rtmp3625.size || 0;
        for (var _i626 = 0; _i626 < _size624; ++_i626) {
          var elem627 = null;
          elem627 = input.readString();
          this.group_names.push(elem627);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_ps_with_auth_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter628 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter628)) {
        iter628 = this.part_vals[iter628];
        output.writeString(iter628);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 4);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  if (this.user_name !== null && this.user_name !== undefined) {
    output.writeFieldBegin('user_name', Thrift.Type.STRING, 5);
    output.writeString(this.user_name);
    output.writeFieldEnd();
  }
  if (this.group_names !== null && this.group_names !== undefined) {
    output.writeFieldBegin('group_names', Thrift.Type.LIST, 6);
    output.writeListBegin(Thrift.Type.STRING, this.group_names.length);
    for (var iter629 in this.group_names) {
      if (this.group_names.hasOwnProperty(iter629)) {
        iter629 = this.group_names[iter629];
        output.writeString(iter629);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_ps_with_auth_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 = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_ps_with_auth_result.prototype = {};
ThriftHiveMetastore_get_partitions_ps_with_auth_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 _rtmp3631 = input.readListBegin();
        var _size630 = _rtmp3631.size || 0;
        for (var _i632 = 0; _i632 < _size630; ++_i632) {
          var elem633 = null;
          elem633 = new ttypes.Partition();
          elem633.read(input);
          this.success.push(elem633);
        }
        input.readListEnd();
      } 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_partitions_ps_with_auth_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_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 iter634 in this.success) {
      if (this.success.hasOwnProperty(iter634)) {
        iter634 = this.success[iter634];
        iter634.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_names_ps_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_partition_names_ps_args.prototype = {};
ThriftHiveMetastore_get_partition_names_ps_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3636 = input.readListBegin();
        var _size635 = _rtmp3636.size || 0;
        for (var _i637 = 0; _i637 < _size635; ++_i637) {
          var elem638 = null;
          elem638 = input.readString();
          this.part_vals.push(elem638);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_names_ps_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter639 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter639)) {
        iter639 = this.part_vals[iter639];
        output.writeString(iter639);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 4);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_names_ps_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 = Thrift.copyList(args.success, [null]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partition_names_ps_result.prototype = {};
ThriftHiveMetastore_get_partition_names_ps_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 _rtmp3641 = input.readListBegin();
        var _size640 = _rtmp3641.size || 0;
        for (var _i642 = 0; _i642 < _size640; ++_i642) {
          var elem643 = null;
          elem643 = input.readString();
          this.success.push(elem643);
        }
        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.NoSuchObjectException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_names_ps_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_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 iter644 in this.success) {
      if (this.success.hasOwnProperty(iter644)) {
        iter644 = this.success[iter644];
        output.writeString(iter644);
      }
    }
    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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_by_filter_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.filter = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.filter !== undefined && args.filter !== null) {
      this.filter = args.filter;
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_partitions_by_filter_args.prototype = {};
ThriftHiveMetastore_get_partitions_by_filter_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.filter = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I16) {
        this.max_parts = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_by_filter_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.filter !== null && this.filter !== undefined) {
    output.writeFieldBegin('filter', Thrift.Type.STRING, 3);
    output.writeString(this.filter);
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I16, 4);
    output.writeI16(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_by_filter_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 = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_by_filter_result.prototype = {};
ThriftHiveMetastore_get_partitions_by_filter_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 _rtmp3646 = input.readListBegin();
        var _size645 = _rtmp3646.size || 0;
        for (var _i647 = 0; _i647 < _size645; ++_i647) {
          var elem648 = null;
          elem648 = new ttypes.Partition();
          elem648.read(input);
          this.success.push(elem648);
        }
        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.NoSuchObjectException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_by_filter_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_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 iter649 in this.success) {
      if (this.success.hasOwnProperty(iter649)) {
        iter649 = this.success[iter649];
        iter649.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_part_specs_by_filter_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.filter = null;
  this.max_parts = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.filter !== undefined && args.filter !== null) {
      this.filter = args.filter;
    }
    if (args.max_parts !== undefined && args.max_parts !== null) {
      this.max_parts = args.max_parts;
    }
  }
};
ThriftHiveMetastore_get_part_specs_by_filter_args.prototype = {};
ThriftHiveMetastore_get_part_specs_by_filter_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.filter = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.max_parts = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_part_specs_by_filter_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_part_specs_by_filter_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.filter !== null && this.filter !== undefined) {
    output.writeFieldBegin('filter', Thrift.Type.STRING, 3);
    output.writeString(this.filter);
    output.writeFieldEnd();
  }
  if (this.max_parts !== null && this.max_parts !== undefined) {
    output.writeFieldBegin('max_parts', Thrift.Type.I32, 4);
    output.writeI32(this.max_parts);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_part_specs_by_filter_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 = Thrift.copyList(args.success, [ttypes.PartitionSpec]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_part_specs_by_filter_result.prototype = {};
ThriftHiveMetastore_get_part_specs_by_filter_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 _rtmp3651 = input.readListBegin();
        var _size650 = _rtmp3651.size || 0;
        for (var _i652 = 0; _i652 < _size650; ++_i652) {
          var elem653 = null;
          elem653 = new ttypes.PartitionSpec();
          elem653.read(input);
          this.success.push(elem653);
        }
        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.NoSuchObjectException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_part_specs_by_filter_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_part_specs_by_filter_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 iter654 in this.success) {
      if (this.success.hasOwnProperty(iter654)) {
        iter654 = this.success[iter654];
        iter654.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_by_expr_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.PartitionsByExprRequest(args.req);
    }
  }
};
ThriftHiveMetastore_get_partitions_by_expr_args.prototype = {};
ThriftHiveMetastore_get_partitions_by_expr_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.req = new ttypes.PartitionsByExprRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_by_expr_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_by_expr_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_by_expr_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.PartitionsByExprResult(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_partitions_by_expr_result.prototype = {};
ThriftHiveMetastore_get_partitions_by_expr_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.PartitionsByExprResult();
        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_partitions_by_expr_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_by_expr_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_get_num_partitions_by_filter_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.filter = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.filter !== undefined && args.filter !== null) {
      this.filter = args.filter;
    }
  }
};
ThriftHiveMetastore_get_num_partitions_by_filter_args.prototype = {};
ThriftHiveMetastore_get_num_partitions_by_filter_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.filter = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_num_partitions_by_filter_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_num_partitions_by_filter_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.filter !== null && this.filter !== undefined) {
    output.writeFieldBegin('filter', Thrift.Type.STRING, 3);
    output.writeString(this.filter);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_num_partitions_by_filter_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_get_num_partitions_by_filter_result.prototype = {};
ThriftHiveMetastore_get_num_partitions_by_filter_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.I32) {
        this.success = input.readI32();
      } 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_num_partitions_by_filter_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_num_partitions_by_filter_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.I32, 0);
    output.writeI32(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_partitions_by_names_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.names = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.names !== undefined && args.names !== null) {
      this.names = Thrift.copyList(args.names, [null]);
    }
  }
};
ThriftHiveMetastore_get_partitions_by_names_args.prototype = {};
ThriftHiveMetastore_get_partitions_by_names_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.names = [];
        var _rtmp3656 = input.readListBegin();
        var _size655 = _rtmp3656.size || 0;
        for (var _i657 = 0; _i657 < _size655; ++_i657) {
          var elem658 = null;
          elem658 = input.readString();
          this.names.push(elem658);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_by_names_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.names !== null && this.names !== undefined) {
    output.writeFieldBegin('names', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.names.length);
    for (var iter659 in this.names) {
      if (this.names.hasOwnProperty(iter659)) {
        iter659 = this.names[iter659];
        output.writeString(iter659);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_by_names_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 = Thrift.copyList(args.success, [ttypes.Partition]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_partitions_by_names_result.prototype = {};
ThriftHiveMetastore_get_partitions_by_names_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 _rtmp3661 = input.readListBegin();
        var _size660 = _rtmp3661.size || 0;
        for (var _i662 = 0; _i662 < _size660; ++_i662) {
          var elem663 = null;
          elem663 = new ttypes.Partition();
          elem663.read(input);
          this.success.push(elem663);
        }
        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.NoSuchObjectException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_by_names_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_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 iter664 in this.success) {
      if (this.success.hasOwnProperty(iter664)) {
        iter664 = this.success[iter664];
        iter664.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_partition_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.new_part = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_part !== undefined && args.new_part !== null) {
      this.new_part = new ttypes.Partition(args.new_part);
    }
  }
};
ThriftHiveMetastore_alter_partition_args.prototype = {};
ThriftHiveMetastore_alter_partition_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_part = new ttypes.Partition();
        this.new_part.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partition_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_part !== null && this.new_part !== undefined) {
    output.writeFieldBegin('new_part', Thrift.Type.STRUCT, 3);
    this.new_part.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_partition_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_partition_result.prototype = {};
ThriftHiveMetastore_alter_partition_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.InvalidOperationException();
        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_alter_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partition_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_alter_partitions_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.new_parts = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_parts !== undefined && args.new_parts !== null) {
      this.new_parts = Thrift.copyList(args.new_parts, [ttypes.Partition]);
    }
  }
};
ThriftHiveMetastore_alter_partitions_args.prototype = {};
ThriftHiveMetastore_alter_partitions_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.new_parts = [];
        var _rtmp3666 = input.readListBegin();
        var _size665 = _rtmp3666.size || 0;
        for (var _i667 = 0; _i667 < _size665; ++_i667) {
          var elem668 = null;
          elem668 = new ttypes.Partition();
          elem668.read(input);
          this.new_parts.push(elem668);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_partitions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partitions_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_parts !== null && this.new_parts !== undefined) {
    output.writeFieldBegin('new_parts', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRUCT, this.new_parts.length);
    for (var iter669 in this.new_parts) {
      if (this.new_parts.hasOwnProperty(iter669)) {
        iter669 = this.new_parts[iter669];
        iter669.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_partitions_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_partitions_result.prototype = {};
ThriftHiveMetastore_alter_partitions_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.InvalidOperationException();
        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_alter_partitions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partitions_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_alter_partitions_with_environment_context_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.new_parts = null;
  this.environment_context = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_parts !== undefined && args.new_parts !== null) {
      this.new_parts = Thrift.copyList(args.new_parts, [ttypes.Partition]);
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_alter_partitions_with_environment_context_args.prototype = {};
ThriftHiveMetastore_alter_partitions_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.new_parts = [];
        var _rtmp3671 = input.readListBegin();
        var _size670 = _rtmp3671.size || 0;
        for (var _i672 = 0; _i672 < _size670; ++_i672) {
          var elem673 = null;
          elem673 = new ttypes.Partition();
          elem673.read(input);
          this.new_parts.push(elem673);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_partitions_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partitions_with_environment_context_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_parts !== null && this.new_parts !== undefined) {
    output.writeFieldBegin('new_parts', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRUCT, this.new_parts.length);
    for (var iter674 in this.new_parts) {
      if (this.new_parts.hasOwnProperty(iter674)) {
        iter674 = this.new_parts[iter674];
        iter674.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 4);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_partitions_with_environment_context_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_partitions_with_environment_context_result.prototype = {};
ThriftHiveMetastore_alter_partitions_with_environment_context_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.InvalidOperationException();
        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_alter_partitions_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partitions_with_environment_context_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_alter_partition_with_environment_context_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.new_part = null;
  this.environment_context = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.new_part !== undefined && args.new_part !== null) {
      this.new_part = new ttypes.Partition(args.new_part);
    }
    if (args.environment_context !== undefined && args.environment_context !== null) {
      this.environment_context = new ttypes.EnvironmentContext(args.environment_context);
    }
  }
};
ThriftHiveMetastore_alter_partition_with_environment_context_args.prototype = {};
ThriftHiveMetastore_alter_partition_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 1:
      if (ftype == Thrift.Type.STRING) {
        this.db_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_part = new ttypes.Partition();
        this.new_part.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.environment_context = new ttypes.EnvironmentContext();
        this.environment_context.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_partition_with_environment_context_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.new_part !== null && this.new_part !== undefined) {
    output.writeFieldBegin('new_part', Thrift.Type.STRUCT, 3);
    this.new_part.write(output);
    output.writeFieldEnd();
  }
  if (this.environment_context !== null && this.environment_context !== undefined) {
    output.writeFieldBegin('environment_context', Thrift.Type.STRUCT, 4);
    this.environment_context.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_partition_with_environment_context_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_partition_with_environment_context_result.prototype = {};
ThriftHiveMetastore_alter_partition_with_environment_context_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.InvalidOperationException();
        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_alter_partition_with_environment_context_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_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_rename_partition_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.new_part = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.new_part !== undefined && args.new_part !== null) {
      this.new_part = new ttypes.Partition(args.new_part);
    }
  }
};
ThriftHiveMetastore_rename_partition_args.prototype = {};
ThriftHiveMetastore_rename_partition_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.part_vals = [];
        var _rtmp3676 = input.readListBegin();
        var _size675 = _rtmp3676.size || 0;
        for (var _i677 = 0; _i677 < _size675; ++_i677) {
          var elem678 = null;
          elem678 = input.readString();
          this.part_vals.push(elem678);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_part = new ttypes.Partition();
        this.new_part.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_rename_partition_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_rename_partition_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter679 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter679)) {
        iter679 = this.part_vals[iter679];
        output.writeString(iter679);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.new_part !== null && this.new_part !== undefined) {
    output.writeFieldBegin('new_part', Thrift.Type.STRUCT, 4);
    this.new_part.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_rename_partition_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_rename_partition_result.prototype = {};
ThriftHiveMetastore_rename_partition_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.InvalidOperationException();
        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_rename_partition_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_rename_partition_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_partition_name_has_valid_characters_args = function(args) {
  this.part_vals = null;
  this.throw_exception = null;
  if (args) {
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyList(args.part_vals, [null]);
    }
    if (args.throw_exception !== undefined && args.throw_exception !== null) {
      this.throw_exception = args.throw_exception;
    }
  }
};
ThriftHiveMetastore_partition_name_has_valid_characters_args.prototype = {};
ThriftHiveMetastore_partition_name_has_valid_characters_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.LIST) {
        this.part_vals = [];
        var _rtmp3681 = input.readListBegin();
        var _size680 = _rtmp3681.size || 0;
        for (var _i682 = 0; _i682 < _size680; ++_i682) {
          var elem683 = null;
          elem683 = input.readString();
          this.part_vals.push(elem683);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.BOOL) {
        this.throw_exception = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_partition_name_has_valid_characters_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_partition_name_has_valid_characters_args');
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.LIST, 1);
    output.writeListBegin(Thrift.Type.STRING, this.part_vals.length);
    for (var iter684 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(iter684)) {
        iter684 = this.part_vals[iter684];
        output.writeString(iter684);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.throw_exception !== null && this.throw_exception !== undefined) {
    output.writeFieldBegin('throw_exception', Thrift.Type.BOOL, 2);
    output.writeBool(this.throw_exception);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_partition_name_has_valid_characters_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_partition_name_has_valid_characters_result.prototype = {};
ThriftHiveMetastore_partition_name_has_valid_characters_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_partition_name_has_valid_characters_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_partition_name_has_valid_characters_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_config_value_args = function(args) {
  this.name = null;
  this.defaultValue = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    }
    if (args.defaultValue !== undefined && args.defaultValue !== null) {
      this.defaultValue = args.defaultValue;
    }
  }
};
ThriftHiveMetastore_get_config_value_args.prototype = {};
ThriftHiveMetastore_get_config_value_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.STRING) {
        this.defaultValue = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_config_value_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_config_value_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.defaultValue !== null && this.defaultValue !== undefined) {
    output.writeFieldBegin('defaultValue', Thrift.Type.STRING, 2);
    output.writeString(this.defaultValue);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_config_value_result = function(args) {
  this.success = null;
  this.o1 = null;
  if (args instanceof ttypes.ConfigValSecurityException) {
    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_get_config_value_result.prototype = {};
ThriftHiveMetastore_get_config_value_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.ConfigValSecurityException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_config_value_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_config_value_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_partition_name_to_vals_args = function(args) {
  this.part_name = null;
  if (args) {
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
  }
};
ThriftHiveMetastore_partition_name_to_vals_args.prototype = {};
ThriftHiveMetastore_partition_name_to_vals_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.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_partition_name_to_vals_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args');
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 1);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_partition_name_to_vals_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_partition_name_to_vals_result.prototype = {};
ThriftHiveMetastore_partition_name_to_vals_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 _rtmp3686 = input.readListBegin();
        var _size685 = _rtmp3686.size || 0;
        for (var _i687 = 0; _i687 < _size685; ++_i687) {
          var elem688 = null;
          elem688 = input.readString();
          this.success.push(elem688);
        }
        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_partition_name_to_vals_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_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 iter689 in this.success) {
      if (this.success.hasOwnProperty(iter689)) {
        iter689 = this.success[iter689];
        output.writeString(iter689);
      }
    }
    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_partition_name_to_spec_args = function(args) {
  this.part_name = null;
  if (args) {
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
  }
};
ThriftHiveMetastore_partition_name_to_spec_args.prototype = {};
ThriftHiveMetastore_partition_name_to_spec_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.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_partition_name_to_spec_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args');
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 1);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_partition_name_to_spec_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.copyMap(args.success, [null]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_partition_name_to_spec_result.prototype = {};
ThriftHiveMetastore_partition_name_to_spec_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 _rtmp3691 = input.readMapBegin();
        var _size690 = _rtmp3691.size || 0;
        for (var _i692 = 0; _i692 < _size690; ++_i692) {
          var key693 = null;
          var val694 = null;
          key693 = input.readString();
          val694 = input.readString();
          this.success[key693] = val694;
        }
        input.readMapEnd();
      } 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_partition_name_to_spec_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.MAP, 0);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.success));
    for (var kiter695 in this.success) {
      if (this.success.hasOwnProperty(kiter695)) {
        var viter696 = this.success[kiter695];
        output.writeString(kiter695);
        output.writeString(viter696);
      }
    }
    output.writeMapEnd();
    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_markPartitionForEvent_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.eventType = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyMap(args.part_vals, [null]);
    }
    if (args.eventType !== undefined && args.eventType !== null) {
      this.eventType = args.eventType;
    }
  }
};
ThriftHiveMetastore_markPartitionForEvent_args.prototype = {};
ThriftHiveMetastore_markPartitionForEvent_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.MAP) {
        this.part_vals = {};
        var _rtmp3698 = input.readMapBegin();
        var _size697 = _rtmp3698.size || 0;
        for (var _i699 = 0; _i699 < _size697; ++_i699) {
          var key700 = null;
          var val701 = null;
          key700 = input.readString();
          val701 = input.readString();
          this.part_vals[key700] = val701;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.eventType = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_markPartitionForEvent_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.MAP, 3);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.part_vals));
    for (var kiter702 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(kiter702)) {
        var viter703 = this.part_vals[kiter702];
        output.writeString(kiter702);
        output.writeString(viter703);
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.eventType !== null && this.eventType !== undefined) {
    output.writeFieldBegin('eventType', Thrift.Type.I32, 4);
    output.writeI32(this.eventType);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_markPartitionForEvent_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  this.o5 = null;
  this.o6 = null;
  if (args instanceof ttypes.MetaException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.UnknownDBException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.UnknownTableException) {
    this.o4 = args;
    return;
  }
  if (args instanceof ttypes.UnknownPartitionException) {
    this.o5 = args;
    return;
  }
  if (args instanceof ttypes.InvalidPartitionException) {
    this.o6 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
    if (args.o5 !== undefined && args.o5 !== null) {
      this.o5 = args.o5;
    }
    if (args.o6 !== undefined && args.o6 !== null) {
      this.o6 = args.o6;
    }
  }
};
ThriftHiveMetastore_markPartitionForEvent_result.prototype = {};
ThriftHiveMetastore_markPartitionForEvent_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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.UnknownDBException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.UnknownTableException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.o5 = new ttypes.UnknownPartitionException();
        this.o5.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.STRUCT) {
        this.o6 = new ttypes.InvalidPartitionException();
        this.o6.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_markPartitionForEvent_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  if (this.o5 !== null && this.o5 !== undefined) {
    output.writeFieldBegin('o5', Thrift.Type.STRUCT, 5);
    this.o5.write(output);
    output.writeFieldEnd();
  }
  if (this.o6 !== null && this.o6 !== undefined) {
    output.writeFieldBegin('o6', Thrift.Type.STRUCT, 6);
    this.o6.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_isPartitionMarkedForEvent_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_vals = null;
  this.eventType = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_vals !== undefined && args.part_vals !== null) {
      this.part_vals = Thrift.copyMap(args.part_vals, [null]);
    }
    if (args.eventType !== undefined && args.eventType !== null) {
      this.eventType = args.eventType;
    }
  }
};
ThriftHiveMetastore_isPartitionMarkedForEvent_args.prototype = {};
ThriftHiveMetastore_isPartitionMarkedForEvent_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.MAP) {
        this.part_vals = {};
        var _rtmp3705 = input.readMapBegin();
        var _size704 = _rtmp3705.size || 0;
        for (var _i706 = 0; _i706 < _size704; ++_i706) {
          var key707 = null;
          var val708 = null;
          key707 = input.readString();
          val708 = input.readString();
          this.part_vals[key707] = val708;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.eventType = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_isPartitionMarkedForEvent_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_vals !== null && this.part_vals !== undefined) {
    output.writeFieldBegin('part_vals', Thrift.Type.MAP, 3);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.part_vals));
    for (var kiter709 in this.part_vals) {
      if (this.part_vals.hasOwnProperty(kiter709)) {
        var viter710 = this.part_vals[kiter709];
        output.writeString(kiter709);
        output.writeString(viter710);
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.eventType !== null && this.eventType !== undefined) {
    output.writeFieldBegin('eventType', Thrift.Type.I32, 4);
    output.writeI32(this.eventType);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_isPartitionMarkedForEvent_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  this.o5 = null;
  this.o6 = null;
  if (args instanceof ttypes.MetaException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.UnknownDBException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.UnknownTableException) {
    this.o4 = args;
    return;
  }
  if (args instanceof ttypes.UnknownPartitionException) {
    this.o5 = args;
    return;
  }
  if (args instanceof ttypes.InvalidPartitionException) {
    this.o6 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
    if (args.o5 !== undefined && args.o5 !== null) {
      this.o5 = args.o5;
    }
    if (args.o6 !== undefined && args.o6 !== null) {
      this.o6 = args.o6;
    }
  }
};
ThriftHiveMetastore_isPartitionMarkedForEvent_result.prototype = {};
ThriftHiveMetastore_isPartitionMarkedForEvent_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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.UnknownDBException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.UnknownTableException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.o5 = new ttypes.UnknownPartitionException();
        this.o5.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.STRUCT) {
        this.o6 = new ttypes.InvalidPartitionException();
        this.o6.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_isPartitionMarkedForEvent_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  if (this.o5 !== null && this.o5 !== undefined) {
    output.writeFieldBegin('o5', Thrift.Type.STRUCT, 5);
    this.o5.write(output);
    output.writeFieldEnd();
  }
  if (this.o6 !== null && this.o6 !== undefined) {
    output.writeFieldBegin('o6', Thrift.Type.STRUCT, 6);
    this.o6.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_index_args = function(args) {
  this.new_index = null;
  this.index_table = null;
  if (args) {
    if (args.new_index !== undefined && args.new_index !== null) {
      this.new_index = new ttypes.Index(args.new_index);
    }
    if (args.index_table !== undefined && args.index_table !== null) {
      this.index_table = new ttypes.Table(args.index_table);
    }
  }
};
ThriftHiveMetastore_add_index_args.prototype = {};
ThriftHiveMetastore_add_index_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.new_index = new ttypes.Index();
        this.new_index.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.index_table = new ttypes.Table();
        this.index_table.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_index_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_index_args');
  if (this.new_index !== null && this.new_index !== undefined) {
    output.writeFieldBegin('new_index', Thrift.Type.STRUCT, 1);
    this.new_index.write(output);
    output.writeFieldEnd();
  }
  if (this.index_table !== null && this.index_table !== undefined) {
    output.writeFieldBegin('index_table', Thrift.Type.STRUCT, 2);
    this.index_table.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_index_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.InvalidObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.AlreadyExistsException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.Index(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_add_index_result.prototype = {};
ThriftHiveMetastore_add_index_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.Index();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.InvalidObjectException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.AlreadyExistsException();
        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_add_index_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_index_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();
  }
  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_alter_index_args = function(args) {
  this.dbname = null;
  this.base_tbl_name = null;
  this.idx_name = null;
  this.new_idx = null;
  if (args) {
    if (args.dbname !== undefined && args.dbname !== null) {
      this.dbname = args.dbname;
    }
    if (args.base_tbl_name !== undefined && args.base_tbl_name !== null) {
      this.base_tbl_name = args.base_tbl_name;
    }
    if (args.idx_name !== undefined && args.idx_name !== null) {
      this.idx_name = args.idx_name;
    }
    if (args.new_idx !== undefined && args.new_idx !== null) {
      this.new_idx = new ttypes.Index(args.new_idx);
    }
  }
};
ThriftHiveMetastore_alter_index_args.prototype = {};
ThriftHiveMetastore_alter_index_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.STRING) {
        this.base_tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.idx_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.new_idx = new ttypes.Index();
        this.new_idx.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_index_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_index_args');
  if (this.dbname !== null && this.dbname !== undefined) {
    output.writeFieldBegin('dbname', Thrift.Type.STRING, 1);
    output.writeString(this.dbname);
    output.writeFieldEnd();
  }
  if (this.base_tbl_name !== null && this.base_tbl_name !== undefined) {
    output.writeFieldBegin('base_tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.base_tbl_name);
    output.writeFieldEnd();
  }
  if (this.idx_name !== null && this.idx_name !== undefined) {
    output.writeFieldBegin('idx_name', Thrift.Type.STRING, 3);
    output.writeString(this.idx_name);
    output.writeFieldEnd();
  }
  if (this.new_idx !== null && this.new_idx !== undefined) {
    output.writeFieldBegin('new_idx', Thrift.Type.STRUCT, 4);
    this.new_idx.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_index_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_index_result.prototype = {};
ThriftHiveMetastore_alter_index_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.InvalidOperationException();
        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_alter_index_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_index_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_drop_index_by_name_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.index_name = null;
  this.deleteData = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.index_name !== undefined && args.index_name !== null) {
      this.index_name = args.index_name;
    }
    if (args.deleteData !== undefined && args.deleteData !== null) {
      this.deleteData = args.deleteData;
    }
  }
};
ThriftHiveMetastore_drop_index_by_name_args.prototype = {};
ThriftHiveMetastore_drop_index_by_name_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.index_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.deleteData = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_index_by_name_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_index_by_name_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.index_name !== null && this.index_name !== undefined) {
    output.writeFieldBegin('index_name', Thrift.Type.STRING, 3);
    output.writeString(this.index_name);
    output.writeFieldEnd();
  }
  if (this.deleteData !== null && this.deleteData !== undefined) {
    output.writeFieldBegin('deleteData', Thrift.Type.BOOL, 4);
    output.writeBool(this.deleteData);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_index_by_name_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 = 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_index_by_name_result.prototype = {};
ThriftHiveMetastore_drop_index_by_name_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.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_drop_index_by_name_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_index_by_name_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_index_by_name_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.index_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.index_name !== undefined && args.index_name !== null) {
      this.index_name = args.index_name;
    }
  }
};
ThriftHiveMetastore_get_index_by_name_args.prototype = {};
ThriftHiveMetastore_get_index_by_name_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.index_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_index_by_name_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_index_by_name_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.index_name !== null && this.index_name !== undefined) {
    output.writeFieldBegin('index_name', Thrift.Type.STRING, 3);
    output.writeString(this.index_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_index_by_name_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.Index(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_index_by_name_result.prototype = {};
ThriftHiveMetastore_get_index_by_name_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.Index();
        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_index_by_name_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_index_by_name_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_get_indexes_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.max_indexes = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.max_indexes !== undefined && args.max_indexes !== null) {
      this.max_indexes = args.max_indexes;
    }
  }
};
ThriftHiveMetastore_get_indexes_args.prototype = {};
ThriftHiveMetastore_get_indexes_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.max_indexes = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_indexes_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_indexes_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.max_indexes !== null && this.max_indexes !== undefined) {
    output.writeFieldBegin('max_indexes', Thrift.Type.I16, 3);
    output.writeI16(this.max_indexes);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_indexes_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 = Thrift.copyList(args.success, [ttypes.Index]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_indexes_result.prototype = {};
ThriftHiveMetastore_get_indexes_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 _rtmp3712 = input.readListBegin();
        var _size711 = _rtmp3712.size || 0;
        for (var _i713 = 0; _i713 < _size711; ++_i713) {
          var elem714 = null;
          elem714 = new ttypes.Index();
          elem714.read(input);
          this.success.push(elem714);
        }
        input.readListEnd();
      } 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_indexes_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_indexes_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 iter715 in this.success) {
      if (this.success.hasOwnProperty(iter715)) {
        iter715 = this.success[iter715];
        iter715.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_index_names_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.max_indexes = -1;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.max_indexes !== undefined && args.max_indexes !== null) {
      this.max_indexes = args.max_indexes;
    }
  }
};
ThriftHiveMetastore_get_index_names_args.prototype = {};
ThriftHiveMetastore_get_index_names_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.max_indexes = input.readI16();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_index_names_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_index_names_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.max_indexes !== null && this.max_indexes !== undefined) {
    output.writeFieldBegin('max_indexes', Thrift.Type.I16, 3);
    output.writeI16(this.max_indexes);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_index_names_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.copyList(args.success, [null]);
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_get_index_names_result.prototype = {};
ThriftHiveMetastore_get_index_names_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 _rtmp3717 = input.readListBegin();
        var _size716 = _rtmp3717.size || 0;
        for (var _i718 = 0; _i718 < _size716; ++_i718) {
          var elem719 = null;
          elem719 = input.readString();
          this.success.push(elem719);
        }
        input.readListEnd();
      } 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_index_names_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_index_names_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 iter720 in this.success) {
      if (this.success.hasOwnProperty(iter720)) {
        iter720 = this.success[iter720];
        output.writeString(iter720);
      }
    }
    output.writeListEnd();
    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_primary_keys_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.PrimaryKeysRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_primary_keys_args.prototype = {};
ThriftHiveMetastore_get_primary_keys_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.request = new ttypes.PrimaryKeysRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_primary_keys_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_primary_keys_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_primary_keys_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.PrimaryKeysResponse(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_primary_keys_result.prototype = {};
ThriftHiveMetastore_get_primary_keys_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.PrimaryKeysResponse();
        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_primary_keys_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_primary_keys_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_get_foreign_keys_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.ForeignKeysRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_foreign_keys_args.prototype = {};
ThriftHiveMetastore_get_foreign_keys_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.request = new ttypes.ForeignKeysRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_foreign_keys_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_foreign_keys_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_foreign_keys_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.ForeignKeysResponse(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_foreign_keys_result.prototype = {};
ThriftHiveMetastore_get_foreign_keys_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.ForeignKeysResponse();
        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_foreign_keys_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_foreign_keys_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_update_table_column_statistics_args = function(args) {
  this.stats_obj = null;
  if (args) {
    if (args.stats_obj !== undefined && args.stats_obj !== null) {
      this.stats_obj = new ttypes.ColumnStatistics(args.stats_obj);
    }
  }
};
ThriftHiveMetastore_update_table_column_statistics_args.prototype = {};
ThriftHiveMetastore_update_table_column_statistics_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.stats_obj = new ttypes.ColumnStatistics();
        this.stats_obj.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_update_table_column_statistics_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_update_table_column_statistics_args');
  if (this.stats_obj !== null && this.stats_obj !== undefined) {
    output.writeFieldBegin('stats_obj', Thrift.Type.STRUCT, 1);
    this.stats_obj.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_update_table_column_statistics_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_update_table_column_statistics_result.prototype = {};
ThriftHiveMetastore_update_table_column_statistics_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.NoSuchObjectException();
        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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_update_table_column_statistics_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_update_table_column_statistics_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_update_partition_column_statistics_args = function(args) {
  this.stats_obj = null;
  if (args) {
    if (args.stats_obj !== undefined && args.stats_obj !== null) {
      this.stats_obj = new ttypes.ColumnStatistics(args.stats_obj);
    }
  }
};
ThriftHiveMetastore_update_partition_column_statistics_args.prototype = {};
ThriftHiveMetastore_update_partition_column_statistics_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.stats_obj = new ttypes.ColumnStatistics();
        this.stats_obj.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_update_partition_column_statistics_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_update_partition_column_statistics_args');
  if (this.stats_obj !== null && this.stats_obj !== undefined) {
    output.writeFieldBegin('stats_obj', Thrift.Type.STRUCT, 1);
    this.stats_obj.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_update_partition_column_statistics_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_update_partition_column_statistics_result.prototype = {};
ThriftHiveMetastore_update_partition_column_statistics_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.NoSuchObjectException();
        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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_update_partition_column_statistics_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_update_partition_column_statistics_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_column_statistics_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.col_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.col_name !== undefined && args.col_name !== null) {
      this.col_name = args.col_name;
    }
  }
};
ThriftHiveMetastore_get_table_column_statistics_args.prototype = {};
ThriftHiveMetastore_get_table_column_statistics_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.col_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_column_statistics_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_column_statistics_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.col_name !== null && this.col_name !== undefined) {
    output.writeFieldBegin('col_name', Thrift.Type.STRING, 3);
    output.writeString(this.col_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_column_statistics_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o4 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.ColumnStatistics(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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_get_table_column_statistics_result.prototype = {};
ThriftHiveMetastore_get_table_column_statistics_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.ColumnStatistics();
        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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.InvalidInputException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidObjectException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_column_statistics_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_column_statistics_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();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_column_statistics_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_name = null;
  this.col_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
    if (args.col_name !== undefined && args.col_name !== null) {
      this.col_name = args.col_name;
    }
  }
};
ThriftHiveMetastore_get_partition_column_statistics_args.prototype = {};
ThriftHiveMetastore_get_partition_column_statistics_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.col_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_column_statistics_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_column_statistics_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  if (this.col_name !== null && this.col_name !== undefined) {
    output.writeFieldBegin('col_name', Thrift.Type.STRING, 4);
    output.writeString(this.col_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partition_column_statistics_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o4 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.ColumnStatistics(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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_get_partition_column_statistics_result.prototype = {};
ThriftHiveMetastore_get_partition_column_statistics_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.ColumnStatistics();
        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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.InvalidInputException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidObjectException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partition_column_statistics_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partition_column_statistics_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();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 3);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_statistics_req_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.TableStatsRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_table_statistics_req_args.prototype = {};
ThriftHiveMetastore_get_table_statistics_req_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.request = new ttypes.TableStatsRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_table_statistics_req_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_statistics_req_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_table_statistics_req_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.TableStatsResult(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_table_statistics_req_result.prototype = {};
ThriftHiveMetastore_get_table_statistics_req_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.TableStatsResult();
        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_table_statistics_req_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_table_statistics_req_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_get_partitions_statistics_req_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.PartitionsStatsRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_partitions_statistics_req_args.prototype = {};
ThriftHiveMetastore_get_partitions_statistics_req_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.request = new ttypes.PartitionsStatsRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_partitions_statistics_req_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_statistics_req_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_partitions_statistics_req_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.PartitionsStatsResult(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_partitions_statistics_req_result.prototype = {};
ThriftHiveMetastore_get_partitions_statistics_req_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.PartitionsStatsResult();
        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_partitions_statistics_req_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_partitions_statistics_req_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_get_aggr_stats_for_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.PartitionsStatsRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_aggr_stats_for_args.prototype = {};
ThriftHiveMetastore_get_aggr_stats_for_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.request = new ttypes.PartitionsStatsRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_aggr_stats_for_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_aggr_stats_for_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_aggr_stats_for_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.AggrStats(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_aggr_stats_for_result.prototype = {};
ThriftHiveMetastore_get_aggr_stats_for_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.AggrStats();
        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_aggr_stats_for_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_aggr_stats_for_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_set_aggr_stats_for_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.SetPartitionsStatsRequest(args.request);
    }
  }
};
ThriftHiveMetastore_set_aggr_stats_for_args.prototype = {};
ThriftHiveMetastore_set_aggr_stats_for_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.request = new ttypes.SetPartitionsStatsRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_set_aggr_stats_for_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_set_aggr_stats_for_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_set_aggr_stats_for_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_set_aggr_stats_for_result.prototype = {};
ThriftHiveMetastore_set_aggr_stats_for_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.NoSuchObjectException();
        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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_set_aggr_stats_for_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_set_aggr_stats_for_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_delete_partition_column_statistics_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.part_name = null;
  this.col_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.part_name !== undefined && args.part_name !== null) {
      this.part_name = args.part_name;
    }
    if (args.col_name !== undefined && args.col_name !== null) {
      this.col_name = args.col_name;
    }
  }
};
ThriftHiveMetastore_delete_partition_column_statistics_args.prototype = {};
ThriftHiveMetastore_delete_partition_column_statistics_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.part_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.col_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_delete_partition_column_statistics_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_delete_partition_column_statistics_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.part_name !== null && this.part_name !== undefined) {
    output.writeFieldBegin('part_name', Thrift.Type.STRING, 3);
    output.writeString(this.part_name);
    output.writeFieldEnd();
  }
  if (this.col_name !== null && this.col_name !== undefined) {
    output.writeFieldBegin('col_name', Thrift.Type.STRING, 4);
    output.writeString(this.col_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_delete_partition_column_statistics_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_delete_partition_column_statistics_result.prototype = {};
ThriftHiveMetastore_delete_partition_column_statistics_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.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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.InvalidObjectException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_delete_partition_column_statistics_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_delete_partition_column_statistics_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_delete_table_column_statistics_args = function(args) {
  this.db_name = null;
  this.tbl_name = null;
  this.col_name = null;
  if (args) {
    if (args.db_name !== undefined && args.db_name !== null) {
      this.db_name = args.db_name;
    }
    if (args.tbl_name !== undefined && args.tbl_name !== null) {
      this.tbl_name = args.tbl_name;
    }
    if (args.col_name !== undefined && args.col_name !== null) {
      this.col_name = args.col_name;
    }
  }
};
ThriftHiveMetastore_delete_table_column_statistics_args.prototype = {};
ThriftHiveMetastore_delete_table_column_statistics_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.tbl_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.col_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_delete_table_column_statistics_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_delete_table_column_statistics_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.tbl_name !== null && this.tbl_name !== undefined) {
    output.writeFieldBegin('tbl_name', Thrift.Type.STRING, 2);
    output.writeString(this.tbl_name);
    output.writeFieldEnd();
  }
  if (this.col_name !== null && this.col_name !== undefined) {
    output.writeFieldBegin('col_name', Thrift.Type.STRING, 3);
    output.writeString(this.col_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_delete_table_column_statistics_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.InvalidObjectException) {
    this.o3 = args;
    return;
  }
  if (args instanceof ttypes.InvalidInputException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_delete_table_column_statistics_result.prototype = {};
ThriftHiveMetastore_delete_table_column_statistics_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.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;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.InvalidObjectException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.InvalidInputException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_delete_table_column_statistics_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_delete_table_column_statistics_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_function_args = function(args) {
  this.func = null;
  if (args) {
    if (args.func !== undefined && args.func !== null) {
      this.func = new ttypes.Function(args.func);
    }
  }
};
ThriftHiveMetastore_create_function_args.prototype = {};
ThriftHiveMetastore_create_function_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.func = new ttypes.Function();
        this.func.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_function_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_function_args');
  if (this.func !== null && this.func !== undefined) {
    output.writeFieldBegin('func', Thrift.Type.STRUCT, 1);
    this.func.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_function_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  this.o4 = 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 instanceof ttypes.NoSuchObjectException) {
    this.o4 = 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;
    }
    if (args.o4 !== undefined && args.o4 !== null) {
      this.o4 = args.o4;
    }
  }
};
ThriftHiveMetastore_create_function_result.prototype = {};
ThriftHiveMetastore_create_function_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;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.o4 = new ttypes.NoSuchObjectException();
        this.o4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_function_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_function_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();
  }
  if (this.o4 !== null && this.o4 !== undefined) {
    output.writeFieldBegin('o4', Thrift.Type.STRUCT, 4);
    this.o4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_function_args = function(args) {
  this.dbName = null;
  this.funcName = null;
  if (args) {
    if (args.dbName !== undefined && args.dbName !== null) {
      this.dbName = args.dbName;
    }
    if (args.funcName !== undefined && args.funcName !== null) {
      this.funcName = args.funcName;
    }
  }
};
ThriftHiveMetastore_drop_function_args.prototype = {};
ThriftHiveMetastore_drop_function_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.STRING) {
        this.funcName = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_function_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_function_args');
  if (this.dbName !== null && this.dbName !== undefined) {
    output.writeFieldBegin('dbName', Thrift.Type.STRING, 1);
    output.writeString(this.dbName);
    output.writeFieldEnd();
  }
  if (this.funcName !== null && this.funcName !== undefined) {
    output.writeFieldBegin('funcName', Thrift.Type.STRING, 2);
    output.writeString(this.funcName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_function_result = function(args) {
  this.o1 = null;
  this.o3 = null;
  if (args instanceof ttypes.NoSuchObjectException) {
    this.o1 = 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.o3 !== undefined && args.o3 !== null) {
      this.o3 = args.o3;
    }
  }
};
ThriftHiveMetastore_drop_function_result.prototype = {};
ThriftHiveMetastore_drop_function_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.o3 = new ttypes.MetaException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_function_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_function_result');
  if (this.o1 !== null && this.o1 !== undefined) {
    output.writeFieldBegin('o1', Thrift.Type.STRUCT, 1);
    this.o1.write(output);
    output.writeFieldEnd();
  }
  if (this.o3 !== null && this.o3 !== undefined) {
    output.writeFieldBegin('o3', Thrift.Type.STRUCT, 2);
    this.o3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_function_args = function(args) {
  this.dbName = null;
  this.funcName = null;
  this.newFunc = null;
  if (args) {
    if (args.dbName !== undefined && args.dbName !== null) {
      this.dbName = args.dbName;
    }
    if (args.funcName !== undefined && args.funcName !== null) {
      this.funcName = args.funcName;
    }
    if (args.newFunc !== undefined && args.newFunc !== null) {
      this.newFunc = new ttypes.Function(args.newFunc);
    }
  }
};
ThriftHiveMetastore_alter_function_args.prototype = {};
ThriftHiveMetastore_alter_function_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.STRING) {
        this.funcName = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.newFunc = new ttypes.Function();
        this.newFunc.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_alter_function_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_function_args');
  if (this.dbName !== null && this.dbName !== undefined) {
    output.writeFieldBegin('dbName', Thrift.Type.STRING, 1);
    output.writeString(this.dbName);
    output.writeFieldEnd();
  }
  if (this.funcName !== null && this.funcName !== undefined) {
    output.writeFieldBegin('funcName', Thrift.Type.STRING, 2);
    output.writeString(this.funcName);
    output.writeFieldEnd();
  }
  if (this.newFunc !== null && this.newFunc !== undefined) {
    output.writeFieldBegin('newFunc', Thrift.Type.STRUCT, 3);
    this.newFunc.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_alter_function_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.InvalidOperationException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.MetaException) {
    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_function_result.prototype = {};
ThriftHiveMetastore_alter_function_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.InvalidOperationException();
        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_alter_function_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_alter_function_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_functions_args = function(args) {
  this.dbName = null;
  this.pattern = null;
  if (args) {
    if (args.dbName !== undefined && args.dbName !== null) {
      this.dbName = args.dbName;
    }
    if (args.pattern !== undefined && args.pattern !== null) {
      this.pattern = args.pattern;
    }
  }
};
ThriftHiveMetastore_get_functions_args.prototype = {};
ThriftHiveMetastore_get_functions_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.STRING) {
        this.pattern = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_functions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_functions_args');
  if (this.dbName !== null && this.dbName !== undefined) {
    output.writeFieldBegin('dbName', Thrift.Type.STRING, 1);
    output.writeString(this.dbName);
    output.writeFieldEnd();
  }
  if (this.pattern !== null && this.pattern !== undefined) {
    output.writeFieldBegin('pattern', Thrift.Type.STRING, 2);
    output.writeString(this.pattern);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_functions_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_functions_result.prototype = {};
ThriftHiveMetastore_get_functions_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 _rtmp3722 = input.readListBegin();
        var _size721 = _rtmp3722.size || 0;
        for (var _i723 = 0; _i723 < _size721; ++_i723) {
          var elem724 = null;
          elem724 = input.readString();
          this.success.push(elem724);
        }
        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_functions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_functions_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 iter725 in this.success) {
      if (this.success.hasOwnProperty(iter725)) {
        iter725 = this.success[iter725];
        output.writeString(iter725);
      }
    }
    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_function_args = function(args) {
  this.dbName = null;
  this.funcName = null;
  if (args) {
    if (args.dbName !== undefined && args.dbName !== null) {
      this.dbName = args.dbName;
    }
    if (args.funcName !== undefined && args.funcName !== null) {
      this.funcName = args.funcName;
    }
  }
};
ThriftHiveMetastore_get_function_args.prototype = {};
ThriftHiveMetastore_get_function_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.STRING) {
        this.funcName = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_function_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_function_args');
  if (this.dbName !== null && this.dbName !== undefined) {
    output.writeFieldBegin('dbName', Thrift.Type.STRING, 1);
    output.writeString(this.dbName);
    output.writeFieldEnd();
  }
  if (this.funcName !== null && this.funcName !== undefined) {
    output.writeFieldBegin('funcName', Thrift.Type.STRING, 2);
    output.writeString(this.funcName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_function_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.Function(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_function_result.prototype = {};
ThriftHiveMetastore_get_function_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.Function();
        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_function_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_function_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_get_all_functions_args = function(args) {
};
ThriftHiveMetastore_get_all_functions_args.prototype = {};
ThriftHiveMetastore_get_all_functions_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_functions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_all_functions_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_all_functions_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 = new ttypes.GetAllFunctionsResponse(args.success);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_get_all_functions_result.prototype = {};
ThriftHiveMetastore_get_all_functions_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.GetAllFunctionsResponse();
        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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_all_functions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_all_functions_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_role_args = function(args) {
  this.role = null;
  if (args) {
    if (args.role !== undefined && args.role !== null) {
      this.role = new ttypes.Role(args.role);
    }
  }
};
ThriftHiveMetastore_create_role_args.prototype = {};
ThriftHiveMetastore_create_role_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.role = new ttypes.Role();
        this.role.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_role_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_role_args');
  if (this.role !== null && this.role !== undefined) {
    output.writeFieldBegin('role', Thrift.Type.STRUCT, 1);
    this.role.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_create_role_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_create_role_result.prototype = {};
ThriftHiveMetastore_create_role_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_create_role_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_create_role_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_role_args = function(args) {
  this.role_name = null;
  if (args) {
    if (args.role_name !== undefined && args.role_name !== null) {
      this.role_name = args.role_name;
    }
  }
};
ThriftHiveMetastore_drop_role_args.prototype = {};
ThriftHiveMetastore_drop_role_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.role_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_role_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_role_args');
  if (this.role_name !== null && this.role_name !== undefined) {
    output.writeFieldBegin('role_name', Thrift.Type.STRING, 1);
    output.writeString(this.role_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_drop_role_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_drop_role_result.prototype = {};
ThriftHiveMetastore_drop_role_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_drop_role_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_drop_role_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_role_names_args = function(args) {
};
ThriftHiveMetastore_get_role_names_args.prototype = {};
ThriftHiveMetastore_get_role_names_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_role_names_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_role_names_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_role_names_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_role_names_result.prototype = {};
ThriftHiveMetastore_get_role_names_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 _rtmp3727 = input.readListBegin();
        var _size726 = _rtmp3727.size || 0;
        for (var _i728 = 0; _i728 < _size726; ++_i728) {
          var elem729 = null;
          elem729 = input.readString();
          this.success.push(elem729);
        }
        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_role_names_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_role_names_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 iter730 in this.success) {
      if (this.success.hasOwnProperty(iter730)) {
        iter730 = this.success[iter730];
        output.writeString(iter730);
      }
    }
    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_grant_role_args = function(args) {
  this.role_name = null;
  this.principal_name = null;
  this.principal_type = null;
  this.grantor = null;
  this.grantorType = null;
  this.grant_option = null;
  if (args) {
    if (args.role_name !== undefined && args.role_name !== null) {
      this.role_name = args.role_name;
    }
    if (args.principal_name !== undefined && args.principal_name !== null) {
      this.principal_name = args.principal_name;
    }
    if (args.principal_type !== undefined && args.principal_type !== null) {
      this.principal_type = args.principal_type;
    }
    if (args.grantor !== undefined && args.grantor !== null) {
      this.grantor = args.grantor;
    }
    if (args.grantorType !== undefined && args.grantorType !== null) {
      this.grantorType = args.grantorType;
    }
    if (args.grant_option !== undefined && args.grant_option !== null) {
      this.grant_option = args.grant_option;
    }
  }
};
ThriftHiveMetastore_grant_role_args.prototype = {};
ThriftHiveMetastore_grant_role_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.role_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.principal_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I32) {
        this.principal_type = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.grantor = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.I32) {
        this.grantorType = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.BOOL) {
        this.grant_option = input.readBool();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_role_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_role_args');
  if (this.role_name !== null && this.role_name !== undefined) {
    output.writeFieldBegin('role_name', Thrift.Type.STRING, 1);
    output.writeString(this.role_name);
    output.writeFieldEnd();
  }
  if (this.principal_name !== null && this.principal_name !== undefined) {
    output.writeFieldBegin('principal_name', Thrift.Type.STRING, 2);
    output.writeString(this.principal_name);
    output.writeFieldEnd();
  }
  if (this.principal_type !== null && this.principal_type !== undefined) {
    output.writeFieldBegin('principal_type', Thrift.Type.I32, 3);
    output.writeI32(this.principal_type);
    output.writeFieldEnd();
  }
  if (this.grantor !== null && this.grantor !== undefined) {
    output.writeFieldBegin('grantor', Thrift.Type.STRING, 4);
    output.writeString(this.grantor);
    output.writeFieldEnd();
  }
  if (this.grantorType !== null && this.grantorType !== undefined) {
    output.writeFieldBegin('grantorType', Thrift.Type.I32, 5);
    output.writeI32(this.grantorType);
    output.writeFieldEnd();
  }
  if (this.grant_option !== null && this.grant_option !== undefined) {
    output.writeFieldBegin('grant_option', Thrift.Type.BOOL, 6);
    output.writeBool(this.grant_option);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_role_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_grant_role_result.prototype = {};
ThriftHiveMetastore_grant_role_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_role_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_role_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_revoke_role_args = function(args) {
  this.role_name = null;
  this.principal_name = null;
  this.principal_type = null;
  if (args) {
    if (args.role_name !== undefined && args.role_name !== null) {
      this.role_name = args.role_name;
    }
    if (args.principal_name !== undefined && args.principal_name !== null) {
      this.principal_name = args.principal_name;
    }
    if (args.principal_type !== undefined && args.principal_type !== null) {
      this.principal_type = args.principal_type;
    }
  }
};
ThriftHiveMetastore_revoke_role_args.prototype = {};
ThriftHiveMetastore_revoke_role_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.role_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.principal_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I32) {
        this.principal_type = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_revoke_role_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_revoke_role_args');
  if (this.role_name !== null && this.role_name !== undefined) {
    output.writeFieldBegin('role_name', Thrift.Type.STRING, 1);
    output.writeString(this.role_name);
    output.writeFieldEnd();
  }
  if (this.principal_name !== null && this.principal_name !== undefined) {
    output.writeFieldBegin('principal_name', Thrift.Type.STRING, 2);
    output.writeString(this.principal_name);
    output.writeFieldEnd();
  }
  if (this.principal_type !== null && this.principal_type !== undefined) {
    output.writeFieldBegin('principal_type', Thrift.Type.I32, 3);
    output.writeI32(this.principal_type);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_revoke_role_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_revoke_role_result.prototype = {};
ThriftHiveMetastore_revoke_role_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_revoke_role_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_revoke_role_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_list_roles_args = function(args) {
  this.principal_name = null;
  this.principal_type = null;
  if (args) {
    if (args.principal_name !== undefined && args.principal_name !== null) {
      this.principal_name = args.principal_name;
    }
    if (args.principal_type !== undefined && args.principal_type !== null) {
      this.principal_type = args.principal_type;
    }
  }
};
ThriftHiveMetastore_list_roles_args.prototype = {};
ThriftHiveMetastore_list_roles_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.principal_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.principal_type = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_list_roles_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_list_roles_args');
  if (this.principal_name !== null && this.principal_name !== undefined) {
    output.writeFieldBegin('principal_name', Thrift.Type.STRING, 1);
    output.writeString(this.principal_name);
    output.writeFieldEnd();
  }
  if (this.principal_type !== null && this.principal_type !== undefined) {
    output.writeFieldBegin('principal_type', Thrift.Type.I32, 2);
    output.writeI32(this.principal_type);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_list_roles_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, [ttypes.Role]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_list_roles_result.prototype = {};
ThriftHiveMetastore_list_roles_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 _rtmp3732 = input.readListBegin();
        var _size731 = _rtmp3732.size || 0;
        for (var _i733 = 0; _i733 < _size731; ++_i733) {
          var elem734 = null;
          elem734 = new ttypes.Role();
          elem734.read(input);
          this.success.push(elem734);
        }
        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_list_roles_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_list_roles_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 iter735 in this.success) {
      if (this.success.hasOwnProperty(iter735)) {
        iter735 = this.success[iter735];
        iter735.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_revoke_role_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.GrantRevokeRoleRequest(args.request);
    }
  }
};
ThriftHiveMetastore_grant_revoke_role_args.prototype = {};
ThriftHiveMetastore_grant_revoke_role_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.request = new ttypes.GrantRevokeRoleRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_revoke_role_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_revoke_role_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_revoke_role_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 = new ttypes.GrantRevokeRoleResponse(args.success);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_grant_revoke_role_result.prototype = {};
ThriftHiveMetastore_grant_revoke_role_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.GrantRevokeRoleResponse();
        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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_revoke_role_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_revoke_role_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_principals_in_role_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.GetPrincipalsInRoleRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_principals_in_role_args.prototype = {};
ThriftHiveMetastore_get_principals_in_role_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.request = new ttypes.GetPrincipalsInRoleRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_principals_in_role_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_principals_in_role_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_principals_in_role_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 = new ttypes.GetPrincipalsInRoleResponse(args.success);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_get_principals_in_role_result.prototype = {};
ThriftHiveMetastore_get_principals_in_role_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.GetPrincipalsInRoleResponse();
        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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_principals_in_role_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_principals_in_role_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_role_grants_for_principal_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.GetRoleGrantsForPrincipalRequest(args.request);
    }
  }
};
ThriftHiveMetastore_get_role_grants_for_principal_args.prototype = {};
ThriftHiveMetastore_get_role_grants_for_principal_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.request = new ttypes.GetRoleGrantsForPrincipalRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_role_grants_for_principal_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_role_grants_for_principal_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_role_grants_for_principal_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 = new ttypes.GetRoleGrantsForPrincipalResponse(args.success);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_get_role_grants_for_principal_result.prototype = {};
ThriftHiveMetastore_get_role_grants_for_principal_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.GetRoleGrantsForPrincipalResponse();
        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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_role_grants_for_principal_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_role_grants_for_principal_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_privilege_set_args = function(args) {
  this.hiveObject = null;
  this.user_name = null;
  this.group_names = null;
  if (args) {
    if (args.hiveObject !== undefined && args.hiveObject !== null) {
      this.hiveObject = new ttypes.HiveObjectRef(args.hiveObject);
    }
    if (args.user_name !== undefined && args.user_name !== null) {
      this.user_name = args.user_name;
    }
    if (args.group_names !== undefined && args.group_names !== null) {
      this.group_names = Thrift.copyList(args.group_names, [null]);
    }
  }
};
ThriftHiveMetastore_get_privilege_set_args.prototype = {};
ThriftHiveMetastore_get_privilege_set_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.hiveObject = new ttypes.HiveObjectRef();
        this.hiveObject.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.user_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.group_names = [];
        var _rtmp3737 = input.readListBegin();
        var _size736 = _rtmp3737.size || 0;
        for (var _i738 = 0; _i738 < _size736; ++_i738) {
          var elem739 = null;
          elem739 = input.readString();
          this.group_names.push(elem739);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_privilege_set_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_privilege_set_args');
  if (this.hiveObject !== null && this.hiveObject !== undefined) {
    output.writeFieldBegin('hiveObject', Thrift.Type.STRUCT, 1);
    this.hiveObject.write(output);
    output.writeFieldEnd();
  }
  if (this.user_name !== null && this.user_name !== undefined) {
    output.writeFieldBegin('user_name', Thrift.Type.STRING, 2);
    output.writeString(this.user_name);
    output.writeFieldEnd();
  }
  if (this.group_names !== null && this.group_names !== undefined) {
    output.writeFieldBegin('group_names', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.group_names.length);
    for (var iter740 in this.group_names) {
      if (this.group_names.hasOwnProperty(iter740)) {
        iter740 = this.group_names[iter740];
        output.writeString(iter740);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_privilege_set_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 = new ttypes.PrincipalPrivilegeSet(args.success);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_get_privilege_set_result.prototype = {};
ThriftHiveMetastore_get_privilege_set_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.PrincipalPrivilegeSet();
        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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_privilege_set_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_privilege_set_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_list_privileges_args = function(args) {
  this.principal_name = null;
  this.principal_type = null;
  this.hiveObject = null;
  if (args) {
    if (args.principal_name !== undefined && args.principal_name !== null) {
      this.principal_name = args.principal_name;
    }
    if (args.principal_type !== undefined && args.principal_type !== null) {
      this.principal_type = args.principal_type;
    }
    if (args.hiveObject !== undefined && args.hiveObject !== null) {
      this.hiveObject = new ttypes.HiveObjectRef(args.hiveObject);
    }
  }
};
ThriftHiveMetastore_list_privileges_args.prototype = {};
ThriftHiveMetastore_list_privileges_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.principal_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.principal_type = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.hiveObject = new ttypes.HiveObjectRef();
        this.hiveObject.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_list_privileges_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_list_privileges_args');
  if (this.principal_name !== null && this.principal_name !== undefined) {
    output.writeFieldBegin('principal_name', Thrift.Type.STRING, 1);
    output.writeString(this.principal_name);
    output.writeFieldEnd();
  }
  if (this.principal_type !== null && this.principal_type !== undefined) {
    output.writeFieldBegin('principal_type', Thrift.Type.I32, 2);
    output.writeI32(this.principal_type);
    output.writeFieldEnd();
  }
  if (this.hiveObject !== null && this.hiveObject !== undefined) {
    output.writeFieldBegin('hiveObject', Thrift.Type.STRUCT, 3);
    this.hiveObject.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_list_privileges_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, [ttypes.HiveObjectPrivilege]);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_list_privileges_result.prototype = {};
ThriftHiveMetastore_list_privileges_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 _rtmp3742 = input.readListBegin();
        var _size741 = _rtmp3742.size || 0;
        for (var _i743 = 0; _i743 < _size741; ++_i743) {
          var elem744 = null;
          elem744 = new ttypes.HiveObjectPrivilege();
          elem744.read(input);
          this.success.push(elem744);
        }
        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_list_privileges_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_list_privileges_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 iter745 in this.success) {
      if (this.success.hasOwnProperty(iter745)) {
        iter745 = this.success[iter745];
        iter745.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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_privileges_args = function(args) {
  this.privileges = null;
  if (args) {
    if (args.privileges !== undefined && args.privileges !== null) {
      this.privileges = new ttypes.PrivilegeBag(args.privileges);
    }
  }
};
ThriftHiveMetastore_grant_privileges_args.prototype = {};
ThriftHiveMetastore_grant_privileges_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.privileges = new ttypes.PrivilegeBag();
        this.privileges.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_privileges_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_privileges_args');
  if (this.privileges !== null && this.privileges !== undefined) {
    output.writeFieldBegin('privileges', Thrift.Type.STRUCT, 1);
    this.privileges.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_privileges_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_grant_privileges_result.prototype = {};
ThriftHiveMetastore_grant_privileges_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_privileges_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_privileges_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_revoke_privileges_args = function(args) {
  this.privileges = null;
  if (args) {
    if (args.privileges !== undefined && args.privileges !== null) {
      this.privileges = new ttypes.PrivilegeBag(args.privileges);
    }
  }
};
ThriftHiveMetastore_revoke_privileges_args.prototype = {};
ThriftHiveMetastore_revoke_privileges_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.privileges = new ttypes.PrivilegeBag();
        this.privileges.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_revoke_privileges_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_revoke_privileges_args');
  if (this.privileges !== null && this.privileges !== undefined) {
    output.writeFieldBegin('privileges', Thrift.Type.STRUCT, 1);
    this.privileges.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_revoke_privileges_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_revoke_privileges_result.prototype = {};
ThriftHiveMetastore_revoke_privileges_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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_revoke_privileges_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_revoke_privileges_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_revoke_privileges_args = function(args) {
  this.request = null;
  if (args) {
    if (args.request !== undefined && args.request !== null) {
      this.request = new ttypes.GrantRevokePrivilegeRequest(args.request);
    }
  }
};
ThriftHiveMetastore_grant_revoke_privileges_args.prototype = {};
ThriftHiveMetastore_grant_revoke_privileges_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.request = new ttypes.GrantRevokePrivilegeRequest();
        this.request.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_revoke_privileges_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_revoke_privileges_args');
  if (this.request !== null && this.request !== undefined) {
    output.writeFieldBegin('request', Thrift.Type.STRUCT, 1);
    this.request.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_grant_revoke_privileges_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 = new ttypes.GrantRevokePrivilegeResponse(args.success);
    }
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_grant_revoke_privileges_result.prototype = {};
ThriftHiveMetastore_grant_revoke_privileges_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.GrantRevokePrivilegeResponse();
        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;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_grant_revoke_privileges_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_grant_revoke_privileges_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();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_set_ugi_args = function(args) {
  this.user_name = null;
  this.group_names = null;
  if (args) {
    if (args.user_name !== undefined && args.user_name !== null) {
      this.user_name = args.user_name;
    }
    if (args.group_names !== undefined && args.group_names !== null) {
      this.group_names = Thrift.copyList(args.group_names, [null]);
    }
  }
};
ThriftHiveMetastore_set_ugi_args.prototype = {};
ThriftHiveMetastore_set_ugi_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.user_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.group_names = [];
        var _rtmp3747 = input.readListBegin();
        var _size746 = _rtmp3747.size || 0;
        for (var _i748 = 0; _i748 < _size746; ++_i748) {
          var elem749 = null;
          elem749 = input.readString();
          this.group_names.push(elem749);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_set_ugi_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_set_ugi_args');
  if (this.user_name !== null && this.user_name !== undefined) {
    output.writeFieldBegin('user_name', Thrift.Type.STRING, 1);
    output.writeString(this.user_name);
    output.writeFieldEnd();
  }
  if (this.group_names !== null && this.group_names !== undefined) {
    output.writeFieldBegin('group_names', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.group_names.length);
    for (var iter750 in this.group_names) {
      if (this.group_names.hasOwnProperty(iter750)) {
        iter750 = this.group_names[iter750];
        output.writeString(iter750);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_set_ugi_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_set_ugi_result.prototype = {};
ThriftHiveMetastore_set_ugi_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 _rtmp3752 = input.readListBegin();
        var _size751 = _rtmp3752.size || 0;
        for (var _i753 = 0; _i753 < _size751; ++_i753) {
          var elem754 = null;
          elem754 = input.readString();
          this.success.push(elem754);
        }
        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_set_ugi_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_set_ugi_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 iter755 in this.success) {
      if (this.success.hasOwnProperty(iter755)) {
        iter755 = this.success[iter755];
        output.writeString(iter755);
      }
    }
    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_delegation_token_args = function(args) {
  this.token_owner = null;
  this.renewer_kerberos_principal_name = null;
  if (args) {
    if (args.token_owner !== undefined && args.token_owner !== null) {
      this.token_owner = args.token_owner;
    }
    if (args.renewer_kerberos_principal_name !== undefined && args.renewer_kerberos_principal_name !== null) {
      this.renewer_kerberos_principal_name = args.renewer_kerberos_principal_name;
    }
  }
};
ThriftHiveMetastore_get_delegation_token_args.prototype = {};
ThriftHiveMetastore_get_delegation_token_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.token_owner = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.renewer_kerberos_principal_name = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_delegation_token_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_delegation_token_args');
  if (this.token_owner !== null && this.token_owner !== undefined) {
    output.writeFieldBegin('token_owner', Thrift.Type.STRING, 1);
    output.writeString(this.token_owner);
    output.writeFieldEnd();
  }
  if (this.renewer_kerberos_principal_name !== null && this.renewer_kerberos_principal_name !== undefined) {
    output.writeFieldBegin('renewer_kerberos_principal_name', Thrift.Type.STRING, 2);
    output.writeString(this.renewer_kerberos_principal_name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_delegation_token_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_get_delegation_token_result.prototype = {};
ThriftHiveMetastore_get_delegation_token_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_get_delegation_token_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_delegation_token_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_renew_delegation_token_args = function(args) {
  this.token_str_form = null;
  if (args) {
    if (args.token_str_form !== undefined && args.token_str_form !== null) {
      this.token_str_form = args.token_str_form;
    }
  }
};
ThriftHiveMetastore_renew_delegation_token_args.prototype = {};
ThriftHiveMetastore_renew_delegation_token_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.token_str_form = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_renew_delegation_token_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_renew_delegation_token_args');
  if (this.token_str_form !== null && this.token_str_form !== undefined) {
    output.writeFieldBegin('token_str_form', Thrift.Type.STRING, 1);
    output.writeString(this.token_str_form);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_renew_delegation_token_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_renew_delegation_token_result.prototype = {};
ThriftHiveMetastore_renew_delegation_token_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.I64) {
        this.success = input.readI64();
      } 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_renew_delegation_token_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_renew_delegation_token_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.I64, 0);
    output.writeI64(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_cancel_delegation_token_args = function(args) {
  this.token_str_form = null;
  if (args) {
    if (args.token_str_form !== undefined && args.token_str_form !== null) {
      this.token_str_form = args.token_str_form;
    }
  }
};
ThriftHiveMetastore_cancel_delegation_token_args.prototype = {};
ThriftHiveMetastore_cancel_delegation_token_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.token_str_form = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_cancel_delegation_token_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_cancel_delegation_token_args');
  if (this.token_str_form !== null && this.token_str_form !== undefined) {
    output.writeFieldBegin('token_str_form', Thrift.Type.STRING, 1);
    output.writeString(this.token_str_form);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_cancel_delegation_token_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_cancel_delegation_token_result.prototype = {};
ThriftHiveMetastore_cancel_delegation_token_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_cancel_delegation_token_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_cancel_delegation_token_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_add_token_args = function(args) {
  this.token_identifier = null;
  this.delegation_token = null;
  if (args) {
    if (args.token_identifier !== undefined && args.token_identifier !== null) {
      this.token_identifier = args.token_identifier;
    }
    if (args.delegation_token !== undefined && args.delegation_token !== null) {
      this.delegation_token = args.delegation_token;
    }
  }
};
ThriftHiveMetastore_add_token_args.prototype = {};
ThriftHiveMetastore_add_token_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.token_identifier = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.delegation_token = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_token_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_token_args');
  if (this.token_identifier !== null && this.token_identifier !== undefined) {
    output.writeFieldBegin('token_identifier', Thrift.Type.STRING, 1);
    output.writeString(this.token_identifier);
    output.writeFieldEnd();
  }
  if (this.delegation_token !== null && this.delegation_token !== undefined) {
    output.writeFieldBegin('delegation_token', Thrift.Type.STRING, 2);
    output.writeString(this.delegation_token);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_token_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = args.success;
    }
  }
};
ThriftHiveMetastore_add_token_result.prototype = {};
ThriftHiveMetastore_add_token_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 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_token_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_token_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
    output.writeBool(this.success);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_remove_token_args = function(args) {
  this.token_identifier = null;
  if (args) {
    if (args.token_identifier !== undefined && args.token_identifier !== null) {
      this.token_identifier = args.token_identifier;
    }
  }
};
ThriftHiveMetastore_remove_token_args.prototype = {};
ThriftHiveMetastore_remove_token_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.token_identifier = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_remove_token_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_remove_token_args');
  if (this.token_identifier !== null && this.token_identifier !== undefined) {
    output.writeFieldBegin('token_identifier', Thrift.Type.STRING, 1);
    output.writeString(this.token_identifier);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_remove_token_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = args.success;
    }
  }
};
ThriftHiveMetastore_remove_token_result.prototype = {};
ThriftHiveMetastore_remove_token_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 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_remove_token_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_remove_token_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
    output.writeBool(this.success);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_token_args = function(args) {
  this.token_identifier = null;
  if (args) {
    if (args.token_identifier !== undefined && args.token_identifier !== null) {
      this.token_identifier = args.token_identifier;
    }
  }
};
ThriftHiveMetastore_get_token_args.prototype = {};
ThriftHiveMetastore_get_token_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.token_identifier = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_token_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_token_args');
  if (this.token_identifier !== null && this.token_identifier !== undefined) {
    output.writeFieldBegin('token_identifier', Thrift.Type.STRING, 1);
    output.writeString(this.token_identifier);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_token_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = args.success;
    }
  }
};
ThriftHiveMetastore_get_token_result.prototype = {};
ThriftHiveMetastore_get_token_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 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_token_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_token_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRING, 0);
    output.writeString(this.success);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_all_token_identifiers_args = function(args) {
};
ThriftHiveMetastore_get_all_token_identifiers_args.prototype = {};
ThriftHiveMetastore_get_all_token_identifiers_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_token_identifiers_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_all_token_identifiers_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_all_token_identifiers_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
  }
};
ThriftHiveMetastore_get_all_token_identifiers_result.prototype = {};
ThriftHiveMetastore_get_all_token_identifiers_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 _rtmp3757 = input.readListBegin();
        var _size756 = _rtmp3757.size || 0;
        for (var _i758 = 0; _i758 < _size756; ++_i758) {
          var elem759 = null;
          elem759 = input.readString();
          this.success.push(elem759);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_all_token_identifiers_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_all_token_identifiers_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 iter760 in this.success) {
      if (this.success.hasOwnProperty(iter760)) {
        iter760 = this.success[iter760];
        output.writeString(iter760);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_master_key_args = function(args) {
  this.key = null;
  if (args) {
    if (args.key !== undefined && args.key !== null) {
      this.key = args.key;
    }
  }
};
ThriftHiveMetastore_add_master_key_args.prototype = {};
ThriftHiveMetastore_add_master_key_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_add_master_key_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_master_key_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_add_master_key_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_add_master_key_result.prototype = {};
ThriftHiveMetastore_add_master_key_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.I32) {
        this.success = input.readI32();
      } 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_add_master_key_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_master_key_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.I32, 0);
    output.writeI32(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_update_master_key_args = function(args) {
  this.seq_number = null;
  this.key = null;
  if (args) {
    if (args.seq_number !== undefined && args.seq_number !== null) {
      this.seq_number = args.seq_number;
    }
    if (args.key !== undefined && args.key !== null) {
      this.key = args.key;
    }
  }
};
ThriftHiveMetastore_update_master_key_args.prototype = {};
ThriftHiveMetastore_update_master_key_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.I32) {
        this.seq_number = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.key = input.readString();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_update_master_key_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_update_master_key_args');
  if (this.seq_number !== null && this.seq_number !== undefined) {
    output.writeFieldBegin('seq_number', Thrift.Type.I32, 1);
    output.writeI32(this.seq_number);
    output.writeFieldEnd();
  }
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 2);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_update_master_key_result = function(args) {
  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.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
    if (args.o2 !== undefined && args.o2 !== null) {
      this.o2 = args.o2;
    }
  }
};
ThriftHiveMetastore_update_master_key_result.prototype = {};
ThriftHiveMetastore_update_master_key_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.MetaException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_update_master_key_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_update_master_key_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_remove_master_key_args = function(args) {
  this.key_seq = null;
  if (args) {
    if (args.key_seq !== undefined && args.key_seq !== null) {
      this.key_seq = args.key_seq;
    }
  }
};
ThriftHiveMetastore_remove_master_key_args.prototype = {};
ThriftHiveMetastore_remove_master_key_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.I32) {
        this.key_seq = input.readI32();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_remove_master_key_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_remove_master_key_args');
  if (this.key_seq !== null && this.key_seq !== undefined) {
    output.writeFieldBegin('key_seq', Thrift.Type.I32, 1);
    output.writeI32(this.key_seq);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_remove_master_key_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = args.success;
    }
  }
};
ThriftHiveMetastore_remove_master_key_result.prototype = {};
ThriftHiveMetastore_remove_master_key_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 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_remove_master_key_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_remove_master_key_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
    output.writeBool(this.success);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_master_keys_args = function(args) {
};
ThriftHiveMetastore_get_master_keys_args.prototype = {};
ThriftHiveMetastore_get_master_keys_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_master_keys_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_master_keys_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_master_keys_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
  }
};
ThriftHiveMetastore_get_master_keys_result.prototype = {};
ThriftHiveMetastore_get_master_keys_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 _rtmp3762 = input.readListBegin();
        var _size761 = _rtmp3762.size || 0;
        for (var _i763 = 0; _i763 < _size761; ++_i763) {
          var elem764 = null;
          elem764 = input.readString();
          this.success.push(elem764);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_master_keys_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_master_keys_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 iter765 in this.success) {
      if (this.success.hasOwnProperty(iter765)) {
        iter765 = this.success[iter765];
        output.writeString(iter765);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_open_txns_args = function(args) {
};
ThriftHiveMetastore_get_open_txns_args.prototype = {};
ThriftHiveMetastore_get_open_txns_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_open_txns_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_open_txns_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_open_txns_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.GetOpenTxnsResponse(args.success);
    }
  }
};
ThriftHiveMetastore_get_open_txns_result.prototype = {};
ThriftHiveMetastore_get_open_txns_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.GetOpenTxnsResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_open_txns_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_open_txns_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_open_txns_info_args = function(args) {
};
ThriftHiveMetastore_get_open_txns_info_args.prototype = {};
ThriftHiveMetastore_get_open_txns_info_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_open_txns_info_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_open_txns_info_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_open_txns_info_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.GetOpenTxnsInfoResponse(args.success);
    }
  }
};
ThriftHiveMetastore_get_open_txns_info_result.prototype = {};
ThriftHiveMetastore_get_open_txns_info_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.GetOpenTxnsInfoResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_open_txns_info_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_open_txns_info_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_open_txns_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.OpenTxnRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_open_txns_args.prototype = {};
ThriftHiveMetastore_open_txns_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.rqst = new ttypes.OpenTxnRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_open_txns_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_open_txns_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_open_txns_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.OpenTxnsResponse(args.success);
    }
  }
};
ThriftHiveMetastore_open_txns_result.prototype = {};
ThriftHiveMetastore_open_txns_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.OpenTxnsResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_open_txns_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_open_txns_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_abort_txn_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.AbortTxnRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_abort_txn_args.prototype = {};
ThriftHiveMetastore_abort_txn_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.rqst = new ttypes.AbortTxnRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_abort_txn_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_abort_txn_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_abort_txn_result = function(args) {
  this.o1 = null;
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o1 = args;
    return;
  }
  if (args) {
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_abort_txn_result.prototype = {};
ThriftHiveMetastore_abort_txn_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.NoSuchTxnException();
        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_abort_txn_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_abort_txn_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_abort_txns_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.AbortTxnsRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_abort_txns_args.prototype = {};
ThriftHiveMetastore_abort_txns_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.rqst = new ttypes.AbortTxnsRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_abort_txns_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_abort_txns_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_abort_txns_result = function(args) {
  this.o1 = null;
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o1 = args;
    return;
  }
  if (args) {
    if (args.o1 !== undefined && args.o1 !== null) {
      this.o1 = args.o1;
    }
  }
};
ThriftHiveMetastore_abort_txns_result.prototype = {};
ThriftHiveMetastore_abort_txns_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.NoSuchTxnException();
        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_abort_txns_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_abort_txns_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_commit_txn_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.CommitTxnRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_commit_txn_args.prototype = {};
ThriftHiveMetastore_commit_txn_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.rqst = new ttypes.CommitTxnRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_commit_txn_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_commit_txn_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_commit_txn_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.TxnAbortedException) {
    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_commit_txn_result.prototype = {};
ThriftHiveMetastore_commit_txn_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.NoSuchTxnException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.TxnAbortedException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_commit_txn_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_commit_txn_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_lock_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.LockRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_lock_args.prototype = {};
ThriftHiveMetastore_lock_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.rqst = new ttypes.LockRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_lock_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_lock_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_lock_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.TxnAbortedException) {
    this.o2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.LockResponse(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_lock_result.prototype = {};
ThriftHiveMetastore_lock_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.LockResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.NoSuchTxnException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.TxnAbortedException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_lock_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_lock_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_check_lock_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.CheckLockRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_check_lock_args.prototype = {};
ThriftHiveMetastore_check_lock_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.rqst = new ttypes.CheckLockRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_check_lock_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_check_lock_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_check_lock_result = function(args) {
  this.success = null;
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.TxnAbortedException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.NoSuchLockException) {
    this.o3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.LockResponse(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_check_lock_result.prototype = {};
ThriftHiveMetastore_check_lock_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.LockResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.o1 = new ttypes.NoSuchTxnException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.TxnAbortedException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.NoSuchLockException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_check_lock_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_check_lock_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();
  }
  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_unlock_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.UnlockRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_unlock_args.prototype = {};
ThriftHiveMetastore_unlock_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.rqst = new ttypes.UnlockRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_unlock_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_unlock_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_unlock_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.NoSuchLockException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.TxnOpenException) {
    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_unlock_result.prototype = {};
ThriftHiveMetastore_unlock_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.NoSuchLockException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.TxnOpenException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_unlock_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_unlock_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_show_locks_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.ShowLocksRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_show_locks_args.prototype = {};
ThriftHiveMetastore_show_locks_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.rqst = new ttypes.ShowLocksRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_show_locks_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_show_locks_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_show_locks_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.ShowLocksResponse(args.success);
    }
  }
};
ThriftHiveMetastore_show_locks_result.prototype = {};
ThriftHiveMetastore_show_locks_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.ShowLocksResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_show_locks_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_show_locks_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_heartbeat_args = function(args) {
  this.ids = null;
  if (args) {
    if (args.ids !== undefined && args.ids !== null) {
      this.ids = new ttypes.HeartbeatRequest(args.ids);
    }
  }
};
ThriftHiveMetastore_heartbeat_args.prototype = {};
ThriftHiveMetastore_heartbeat_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.ids = new ttypes.HeartbeatRequest();
        this.ids.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_heartbeat_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_heartbeat_args');
  if (this.ids !== null && this.ids !== undefined) {
    output.writeFieldBegin('ids', Thrift.Type.STRUCT, 1);
    this.ids.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_heartbeat_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  this.o3 = null;
  if (args instanceof ttypes.NoSuchLockException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o2 = args;
    return;
  }
  if (args instanceof ttypes.TxnAbortedException) {
    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_heartbeat_result.prototype = {};
ThriftHiveMetastore_heartbeat_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.NoSuchLockException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.NoSuchTxnException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.o3 = new ttypes.TxnAbortedException();
        this.o3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_heartbeat_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_heartbeat_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_heartbeat_txn_range_args = function(args) {
  this.txns = null;
  if (args) {
    if (args.txns !== undefined && args.txns !== null) {
      this.txns = new ttypes.HeartbeatTxnRangeRequest(args.txns);
    }
  }
};
ThriftHiveMetastore_heartbeat_txn_range_args.prototype = {};
ThriftHiveMetastore_heartbeat_txn_range_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.txns = new ttypes.HeartbeatTxnRangeRequest();
        this.txns.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_heartbeat_txn_range_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_heartbeat_txn_range_args');
  if (this.txns !== null && this.txns !== undefined) {
    output.writeFieldBegin('txns', Thrift.Type.STRUCT, 1);
    this.txns.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_heartbeat_txn_range_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.HeartbeatTxnRangeResponse(args.success);
    }
  }
};
ThriftHiveMetastore_heartbeat_txn_range_result.prototype = {};
ThriftHiveMetastore_heartbeat_txn_range_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.HeartbeatTxnRangeResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_heartbeat_txn_range_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_heartbeat_txn_range_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_compact_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.CompactionRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_compact_args.prototype = {};
ThriftHiveMetastore_compact_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.rqst = new ttypes.CompactionRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_compact_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_compact_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_compact_result = function(args) {
};
ThriftHiveMetastore_compact_result.prototype = {};
ThriftHiveMetastore_compact_result.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_compact_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_compact_result');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_compact2_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.CompactionRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_compact2_args.prototype = {};
ThriftHiveMetastore_compact2_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.rqst = new ttypes.CompactionRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_compact2_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_compact2_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_compact2_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.CompactionResponse(args.success);
    }
  }
};
ThriftHiveMetastore_compact2_result.prototype = {};
ThriftHiveMetastore_compact2_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.CompactionResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_compact2_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_compact2_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_show_compact_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.ShowCompactRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_show_compact_args.prototype = {};
ThriftHiveMetastore_show_compact_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.rqst = new ttypes.ShowCompactRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_show_compact_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_show_compact_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_show_compact_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.ShowCompactResponse(args.success);
    }
  }
};
ThriftHiveMetastore_show_compact_result.prototype = {};
ThriftHiveMetastore_show_compact_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.ShowCompactResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_show_compact_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_show_compact_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_dynamic_partitions_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.AddDynamicPartitions(args.rqst);
    }
  }
};
ThriftHiveMetastore_add_dynamic_partitions_args.prototype = {};
ThriftHiveMetastore_add_dynamic_partitions_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.rqst = new ttypes.AddDynamicPartitions();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_dynamic_partitions_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_dynamic_partitions_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_add_dynamic_partitions_result = function(args) {
  this.o1 = null;
  this.o2 = null;
  if (args instanceof ttypes.NoSuchTxnException) {
    this.o1 = args;
    return;
  }
  if (args instanceof ttypes.TxnAbortedException) {
    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_add_dynamic_partitions_result.prototype = {};
ThriftHiveMetastore_add_dynamic_partitions_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.NoSuchTxnException();
        this.o1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.o2 = new ttypes.TxnAbortedException();
        this.o2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_add_dynamic_partitions_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_add_dynamic_partitions_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_next_notification_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.NotificationEventRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_get_next_notification_args.prototype = {};
ThriftHiveMetastore_get_next_notification_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.rqst = new ttypes.NotificationEventRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_next_notification_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_next_notification_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_next_notification_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.NotificationEventResponse(args.success);
    }
  }
};
ThriftHiveMetastore_get_next_notification_result.prototype = {};
ThriftHiveMetastore_get_next_notification_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.NotificationEventResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_next_notification_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_next_notification_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_current_notificationEventId_args = function(args) {
};
ThriftHiveMetastore_get_current_notificationEventId_args.prototype = {};
ThriftHiveMetastore_get_current_notificationEventId_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_current_notificationEventId_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_current_notificationEventId_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_current_notificationEventId_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.CurrentNotificationEventId(args.success);
    }
  }
};
ThriftHiveMetastore_get_current_notificationEventId_result.prototype = {};
ThriftHiveMetastore_get_current_notificationEventId_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.CurrentNotificationEventId();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_current_notificationEventId_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_current_notificationEventId_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_fire_listener_event_args = function(args) {
  this.rqst = null;
  if (args) {
    if (args.rqst !== undefined && args.rqst !== null) {
      this.rqst = new ttypes.FireEventRequest(args.rqst);
    }
  }
};
ThriftHiveMetastore_fire_listener_event_args.prototype = {};
ThriftHiveMetastore_fire_listener_event_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.rqst = new ttypes.FireEventRequest();
        this.rqst.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_fire_listener_event_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_fire_listener_event_args');
  if (this.rqst !== null && this.rqst !== undefined) {
    output.writeFieldBegin('rqst', Thrift.Type.STRUCT, 1);
    this.rqst.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_fire_listener_event_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.FireEventResponse(args.success);
    }
  }
};
ThriftHiveMetastore_fire_listener_event_result.prototype = {};
ThriftHiveMetastore_fire_listener_event_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.FireEventResponse();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_fire_listener_event_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_fire_listener_event_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_flushCache_args = function(args) {
};
ThriftHiveMetastore_flushCache_args.prototype = {};
ThriftHiveMetastore_flushCache_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_flushCache_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_flushCache_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_flushCache_result = function(args) {
};
ThriftHiveMetastore_flushCache_result.prototype = {};
ThriftHiveMetastore_flushCache_result.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_flushCache_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_flushCache_result');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_file_metadata_by_expr_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.GetFileMetadataByExprRequest(args.req);
    }
  }
};
ThriftHiveMetastore_get_file_metadata_by_expr_args.prototype = {};
ThriftHiveMetastore_get_file_metadata_by_expr_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.req = new ttypes.GetFileMetadataByExprRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_file_metadata_by_expr_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_file_metadata_by_expr_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_file_metadata_by_expr_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.GetFileMetadataByExprResult(args.success);
    }
  }
};
ThriftHiveMetastore_get_file_metadata_by_expr_result.prototype = {};
ThriftHiveMetastore_get_file_metadata_by_expr_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.GetFileMetadataByExprResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_file_metadata_by_expr_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_file_metadata_by_expr_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_file_metadata_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.GetFileMetadataRequest(args.req);
    }
  }
};
ThriftHiveMetastore_get_file_metadata_args.prototype = {};
ThriftHiveMetastore_get_file_metadata_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.req = new ttypes.GetFileMetadataRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_file_metadata_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_file_metadata_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_get_file_metadata_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.GetFileMetadataResult(args.success);
    }
  }
};
ThriftHiveMetastore_get_file_metadata_result.prototype = {};
ThriftHiveMetastore_get_file_metadata_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.GetFileMetadataResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_get_file_metadata_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_get_file_metadata_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_put_file_metadata_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.PutFileMetadataRequest(args.req);
    }
  }
};
ThriftHiveMetastore_put_file_metadata_args.prototype = {};
ThriftHiveMetastore_put_file_metadata_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.req = new ttypes.PutFileMetadataRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_put_file_metadata_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_put_file_metadata_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_put_file_metadata_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.PutFileMetadataResult(args.success);
    }
  }
};
ThriftHiveMetastore_put_file_metadata_result.prototype = {};
ThriftHiveMetastore_put_file_metadata_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.PutFileMetadataResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_put_file_metadata_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_put_file_metadata_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_clear_file_metadata_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.ClearFileMetadataRequest(args.req);
    }
  }
};
ThriftHiveMetastore_clear_file_metadata_args.prototype = {};
ThriftHiveMetastore_clear_file_metadata_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.req = new ttypes.ClearFileMetadataRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_clear_file_metadata_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_clear_file_metadata_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_clear_file_metadata_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.ClearFileMetadataResult(args.success);
    }
  }
};
ThriftHiveMetastore_clear_file_metadata_result.prototype = {};
ThriftHiveMetastore_clear_file_metadata_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.ClearFileMetadataResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_clear_file_metadata_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_clear_file_metadata_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_cache_file_metadata_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.CacheFileMetadataRequest(args.req);
    }
  }
};
ThriftHiveMetastore_cache_file_metadata_args.prototype = {};
ThriftHiveMetastore_cache_file_metadata_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.req = new ttypes.CacheFileMetadataRequest();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_cache_file_metadata_args.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_cache_file_metadata_args');
  if (this.req !== null && this.req !== undefined) {
    output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
    this.req.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastore_cache_file_metadata_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.CacheFileMetadataResult(args.success);
    }
  }
};
ThriftHiveMetastore_cache_file_metadata_result.prototype = {};
ThriftHiveMetastore_cache_file_metadata_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.CacheFileMetadataResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ThriftHiveMetastore_cache_file_metadata_result.prototype.write = function(output) {
  output.writeStructBegin('ThriftHiveMetastore_cache_file_metadata_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

var ThriftHiveMetastoreClient = exports.Client = function(output, pClass) {
  this.output = output;
  this.pClass = pClass;
  this._seqid = 0;
  this._reqs = {};
};
Thrift.inherits(ThriftHiveMetastoreClient, FacebookServiceClient);
ThriftHiveMetastoreClient.prototype.seqid = function() { return this._seqid; };
ThriftHiveMetastoreClient.prototype.new_seqid = function() { return this._seqid += 1; };

ThriftHiveMetastoreClient.prototype.getMetaConf = function(key, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_getMetaConf(key);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_getMetaConf(key);
  }
};

ThriftHiveMetastoreClient.prototype.send_getMetaConf = function(key) {
  var output = new this.pClass(this.output);
  var params = {
    key: key
  };
  var args = new ThriftHiveMetastore_getMetaConf_args(params);
  try {
    output.writeMessageBegin('getMetaConf', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_getMetaConf = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_getMetaConf_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('getMetaConf failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.setMetaConf = function(key, value, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_setMetaConf(key, value);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_setMetaConf(key, value);
  }
};

ThriftHiveMetastoreClient.prototype.send_setMetaConf = function(key, value) {
  var output = new this.pClass(this.output);
  var params = {
    key: key,
    value: value
  };
  var args = new ThriftHiveMetastore_setMetaConf_args(params);
  try {
    output.writeMessageBegin('setMetaConf', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_setMetaConf = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_setMetaConf_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.create_database = function(database, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_database(database);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_database(database);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_database = function(database) {
  var output = new this.pClass(this.output);
  var params = {
    database: database
  };
  var args = new ThriftHiveMetastore_create_database_args(params);
  try {
    output.writeMessageBegin('create_database', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_database = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_database_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_database = function(name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_database(name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_database(name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_database = function(name) {
  var output = new this.pClass(this.output);
  var params = {
    name: name
  };
  var args = new ThriftHiveMetastore_get_database_args(params);
  try {
    output.writeMessageBegin('get_database', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_database = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_database_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_database failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_database = function(name, deleteData, cascade, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_database(name, deleteData, cascade);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_database(name, deleteData, cascade);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_database = function(name, deleteData, cascade) {
  var output = new this.pClass(this.output);
  var params = {
    name: name,
    deleteData: deleteData,
    cascade: cascade
  };
  var args = new ThriftHiveMetastore_drop_database_args(params);
  try {
    output.writeMessageBegin('drop_database', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_database = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_database_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_databases = function(pattern, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_databases(pattern);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_databases(pattern);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_databases = function(pattern) {
  var output = new this.pClass(this.output);
  var params = {
    pattern: pattern
  };
  var args = new ThriftHiveMetastore_get_databases_args(params);
  try {
    output.writeMessageBegin('get_databases', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_databases = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_databases_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_databases failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_all_databases = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_all_databases();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_all_databases();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_all_databases = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_all_databases_args();
  try {
    output.writeMessageBegin('get_all_databases', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_all_databases = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_all_databases_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_all_databases failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.alter_database = function(dbname, db, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_database(dbname, db);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_database(dbname, db);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_database = function(dbname, db) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    db: db
  };
  var args = new ThriftHiveMetastore_alter_database_args(params);
  try {
    output.writeMessageBegin('alter_database', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_database = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_database_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_type = function(name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_type(name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_type(name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_type = function(name) {
  var output = new this.pClass(this.output);
  var params = {
    name: name
  };
  var args = new ThriftHiveMetastore_get_type_args(params);
  try {
    output.writeMessageBegin('get_type', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_type = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_type_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_type failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.create_type = function(type, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_type(type);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_type(type);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_type = function(type) {
  var output = new this.pClass(this.output);
  var params = {
    type: type
  };
  var args = new ThriftHiveMetastore_create_type_args(params);
  try {
    output.writeMessageBegin('create_type', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_type = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_type_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('create_type failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_type = function(type, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_type(type);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_type(type);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_type = function(type) {
  var output = new this.pClass(this.output);
  var params = {
    type: type
  };
  var args = new ThriftHiveMetastore_drop_type_args(params);
  try {
    output.writeMessageBegin('drop_type', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_type = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_type_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_type failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_type_all = function(name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_type_all(name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_type_all(name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_type_all = function(name) {
  var output = new this.pClass(this.output);
  var params = {
    name: name
  };
  var args = new ThriftHiveMetastore_get_type_all_args(params);
  try {
    output.writeMessageBegin('get_type_all', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_type_all = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_type_all_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_type_all failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_fields = function(db_name, table_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_fields(db_name, table_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_fields(db_name, table_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_fields = function(db_name, table_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    table_name: table_name
  };
  var args = new ThriftHiveMetastore_get_fields_args(params);
  try {
    output.writeMessageBegin('get_fields', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_fields = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_fields_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_fields failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_fields_with_environment_context = function(db_name, table_name, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_fields_with_environment_context(db_name, table_name, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_fields_with_environment_context(db_name, table_name, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_fields_with_environment_context = function(db_name, table_name, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    table_name: table_name,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_get_fields_with_environment_context_args(params);
  try {
    output.writeMessageBegin('get_fields_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_fields_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_fields_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_fields_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_schema = function(db_name, table_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_schema(db_name, table_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_schema(db_name, table_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_schema = function(db_name, table_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    table_name: table_name
  };
  var args = new ThriftHiveMetastore_get_schema_args(params);
  try {
    output.writeMessageBegin('get_schema', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_schema = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_schema_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_schema failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_schema_with_environment_context = function(db_name, table_name, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_schema_with_environment_context(db_name, table_name, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_schema_with_environment_context(db_name, table_name, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_schema_with_environment_context = function(db_name, table_name, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    table_name: table_name,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_get_schema_with_environment_context_args(params);
  try {
    output.writeMessageBegin('get_schema_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_schema_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_schema_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_schema_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.create_table = function(tbl, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_table(tbl);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_table(tbl);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_table = function(tbl) {
  var output = new this.pClass(this.output);
  var params = {
    tbl: tbl
  };
  var args = new ThriftHiveMetastore_create_table_args(params);
  try {
    output.writeMessageBegin('create_table', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_table = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_table_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.create_table_with_environment_context = function(tbl, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_table_with_environment_context(tbl, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_table_with_environment_context(tbl, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_table_with_environment_context = function(tbl, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    tbl: tbl,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_create_table_with_environment_context_args(params);
  try {
    output.writeMessageBegin('create_table_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_table_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_table_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.create_table_with_constraints = function(tbl, primaryKeys, foreignKeys, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_table_with_constraints(tbl, primaryKeys, foreignKeys);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_table_with_constraints(tbl, primaryKeys, foreignKeys);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_table_with_constraints = function(tbl, primaryKeys, foreignKeys) {
  var output = new this.pClass(this.output);
  var params = {
    tbl: tbl,
    primaryKeys: primaryKeys,
    foreignKeys: foreignKeys
  };
  var args = new ThriftHiveMetastore_create_table_with_constraints_args(params);
  try {
    output.writeMessageBegin('create_table_with_constraints', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_table_with_constraints = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_table_with_constraints_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.drop_constraint = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_constraint(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_constraint(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_constraint = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_drop_constraint_args(params);
  try {
    output.writeMessageBegin('drop_constraint', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_constraint = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_constraint_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.add_primary_key = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_primary_key(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_primary_key(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_primary_key = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_add_primary_key_args(params);
  try {
    output.writeMessageBegin('add_primary_key', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_primary_key = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_primary_key_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.add_foreign_key = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_foreign_key(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_foreign_key(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_foreign_key = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_add_foreign_key_args(params);
  try {
    output.writeMessageBegin('add_foreign_key', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_foreign_key = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_foreign_key_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.drop_table = function(dbname, name, deleteData, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_table(dbname, name, deleteData);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_table(dbname, name, deleteData);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_table = function(dbname, name, deleteData) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    name: name,
    deleteData: deleteData
  };
  var args = new ThriftHiveMetastore_drop_table_args(params);
  try {
    output.writeMessageBegin('drop_table', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_table = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_table_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.drop_table_with_environment_context = function(dbname, name, deleteData, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_table_with_environment_context(dbname, name, deleteData, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_table_with_environment_context(dbname, name, deleteData, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_table_with_environment_context = function(dbname, name, deleteData, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    name: name,
    deleteData: deleteData,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_drop_table_with_environment_context_args(params);
  try {
    output.writeMessageBegin('drop_table_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_table_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_table_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_tables = function(db_name, pattern, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_tables(db_name, pattern);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_tables(db_name, pattern);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_tables = function(db_name, pattern) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    pattern: pattern
  };
  var args = new ThriftHiveMetastore_get_tables_args(params);
  try {
    output.writeMessageBegin('get_tables', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_tables = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_tables_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_tables failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_tables_by_type = function(db_name, pattern, tableType, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_tables_by_type(db_name, pattern, tableType);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_tables_by_type(db_name, pattern, tableType);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_tables_by_type = function(db_name, pattern, tableType) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    pattern: pattern,
    tableType: tableType
  };
  var args = new ThriftHiveMetastore_get_tables_by_type_args(params);
  try {
    output.writeMessageBegin('get_tables_by_type', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_tables_by_type = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_tables_by_type_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_tables_by_type failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_meta = function(db_patterns, tbl_patterns, tbl_types, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_meta(db_patterns, tbl_patterns, tbl_types);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_meta(db_patterns, tbl_patterns, tbl_types);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_meta = function(db_patterns, tbl_patterns, tbl_types) {
  var output = new this.pClass(this.output);
  var params = {
    db_patterns: db_patterns,
    tbl_patterns: tbl_patterns,
    tbl_types: tbl_types
  };
  var args = new ThriftHiveMetastore_get_table_meta_args(params);
  try {
    output.writeMessageBegin('get_table_meta', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_meta = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_meta_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_meta failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_all_tables = function(db_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_all_tables(db_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_all_tables(db_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_all_tables = function(db_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name
  };
  var args = new ThriftHiveMetastore_get_all_tables_args(params);
  try {
    output.writeMessageBegin('get_all_tables', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_all_tables = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_all_tables_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_all_tables failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table = function(dbname, tbl_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table(dbname, tbl_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table(dbname, tbl_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table = function(dbname, tbl_name) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    tbl_name: tbl_name
  };
  var args = new ThriftHiveMetastore_get_table_args(params);
  try {
    output.writeMessageBegin('get_table', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_objects_by_name = function(dbname, tbl_names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_objects_by_name(dbname, tbl_names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_objects_by_name(dbname, tbl_names);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_objects_by_name = function(dbname, tbl_names) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    tbl_names: tbl_names
  };
  var args = new ThriftHiveMetastore_get_table_objects_by_name_args(params);
  try {
    output.writeMessageBegin('get_table_objects_by_name', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_objects_by_name = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_objects_by_name_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_objects_by_name failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_req = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_req(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_req(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_req = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_get_table_req_args(params);
  try {
    output.writeMessageBegin('get_table_req', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_req = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_req_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_req failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_objects_by_name_req = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_objects_by_name_req(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_objects_by_name_req(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_objects_by_name_req = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_get_table_objects_by_name_req_args(params);
  try {
    output.writeMessageBegin('get_table_objects_by_name_req', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_objects_by_name_req = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_objects_by_name_req_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_objects_by_name_req failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_names_by_filter = function(dbname, filter, max_tables, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_names_by_filter(dbname, filter, max_tables);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_names_by_filter(dbname, filter, max_tables);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_names_by_filter = function(dbname, filter, max_tables) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    filter: filter,
    max_tables: max_tables
  };
  var args = new ThriftHiveMetastore_get_table_names_by_filter_args(params);
  try {
    output.writeMessageBegin('get_table_names_by_filter', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_names_by_filter = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_names_by_filter_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_names_by_filter failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.alter_table = function(dbname, tbl_name, new_tbl, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_table(dbname, tbl_name, new_tbl);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_table(dbname, tbl_name, new_tbl);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_table = function(dbname, tbl_name, new_tbl) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    tbl_name: tbl_name,
    new_tbl: new_tbl
  };
  var args = new ThriftHiveMetastore_alter_table_args(params);
  try {
    output.writeMessageBegin('alter_table', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_table = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_table_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.alter_table_with_environment_context = function(dbname, tbl_name, new_tbl, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_table_with_environment_context = function(dbname, tbl_name, new_tbl, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    tbl_name: tbl_name,
    new_tbl: new_tbl,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_alter_table_with_environment_context_args(params);
  try {
    output.writeMessageBegin('alter_table_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_table_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_table_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.alter_table_with_cascade = function(dbname, tbl_name, new_tbl, cascade, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_table_with_cascade = function(dbname, tbl_name, new_tbl, cascade) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    tbl_name: tbl_name,
    new_tbl: new_tbl,
    cascade: cascade
  };
  var args = new ThriftHiveMetastore_alter_table_with_cascade_args(params);
  try {
    output.writeMessageBegin('alter_table_with_cascade', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_table_with_cascade = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_table_with_cascade_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.add_partition = function(new_part, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_partition(new_part);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_partition(new_part);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_partition = function(new_part) {
  var output = new this.pClass(this.output);
  var params = {
    new_part: new_part
  };
  var args = new ThriftHiveMetastore_add_partition_args(params);
  try {
    output.writeMessageBegin('add_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_partition failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_partition_with_environment_context = function(new_part, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_partition_with_environment_context(new_part, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_partition_with_environment_context(new_part, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_partition_with_environment_context = function(new_part, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    new_part: new_part,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_add_partition_with_environment_context_args(params);
  try {
    output.writeMessageBegin('add_partition_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_partition_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_partition_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_partition_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_partitions = function(new_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_partitions(new_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_partitions(new_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_partitions = function(new_parts) {
  var output = new this.pClass(this.output);
  var params = {
    new_parts: new_parts
  };
  var args = new ThriftHiveMetastore_add_partitions_args(params);
  try {
    output.writeMessageBegin('add_partitions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_partitions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_partitions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_partitions failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_partitions_pspec = function(new_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_partitions_pspec(new_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_partitions_pspec(new_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_partitions_pspec = function(new_parts) {
  var output = new this.pClass(this.output);
  var params = {
    new_parts: new_parts
  };
  var args = new ThriftHiveMetastore_add_partitions_pspec_args(params);
  try {
    output.writeMessageBegin('add_partitions_pspec', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_partitions_pspec = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_partitions_pspec_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_partitions_pspec failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.append_partition = function(db_name, tbl_name, part_vals, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_append_partition(db_name, tbl_name, part_vals);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_append_partition(db_name, tbl_name, part_vals);
  }
};

ThriftHiveMetastoreClient.prototype.send_append_partition = function(db_name, tbl_name, part_vals) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals
  };
  var args = new ThriftHiveMetastore_append_partition_args(params);
  try {
    output.writeMessageBegin('append_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_append_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_append_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('append_partition failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_partitions_req = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_partitions_req(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_partitions_req(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_partitions_req = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_add_partitions_req_args(params);
  try {
    output.writeMessageBegin('add_partitions_req', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_partitions_req = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_partitions_req_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_partitions_req failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.append_partition_with_environment_context = function(db_name, tbl_name, part_vals, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_append_partition_with_environment_context = function(db_name, tbl_name, part_vals, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_append_partition_with_environment_context_args(params);
  try {
    output.writeMessageBegin('append_partition_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_append_partition_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_append_partition_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('append_partition_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.append_partition_by_name = function(db_name, tbl_name, part_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_append_partition_by_name(db_name, tbl_name, part_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_append_partition_by_name(db_name, tbl_name, part_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_append_partition_by_name = function(db_name, tbl_name, part_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name
  };
  var args = new ThriftHiveMetastore_append_partition_by_name_args(params);
  try {
    output.writeMessageBegin('append_partition_by_name', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_append_partition_by_name = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_append_partition_by_name_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('append_partition_by_name failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.append_partition_by_name_with_environment_context = function(db_name, tbl_name, part_name, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_append_partition_by_name_with_environment_context = function(db_name, tbl_name, part_name, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_append_partition_by_name_with_environment_context_args(params);
  try {
    output.writeMessageBegin('append_partition_by_name_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_append_partition_by_name_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_append_partition_by_name_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('append_partition_by_name_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_partition = function(db_name, tbl_name, part_vals, deleteData, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_partition(db_name, tbl_name, part_vals, deleteData);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_partition(db_name, tbl_name, part_vals, deleteData);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_partition = function(db_name, tbl_name, part_vals, deleteData) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    deleteData: deleteData
  };
  var args = new ThriftHiveMetastore_drop_partition_args(params);
  try {
    output.writeMessageBegin('drop_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_partition failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_partition_with_environment_context = function(db_name, tbl_name, part_vals, deleteData, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_partition_with_environment_context = function(db_name, tbl_name, part_vals, deleteData, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    deleteData: deleteData,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_drop_partition_with_environment_context_args(params);
  try {
    output.writeMessageBegin('drop_partition_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_partition_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_partition_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_partition_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_partition_by_name = function(db_name, tbl_name, part_name, deleteData, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_partition_by_name = function(db_name, tbl_name, part_name, deleteData) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name,
    deleteData: deleteData
  };
  var args = new ThriftHiveMetastore_drop_partition_by_name_args(params);
  try {
    output.writeMessageBegin('drop_partition_by_name', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_partition_by_name = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_partition_by_name_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_partition_by_name failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_partition_by_name_with_environment_context = function(db_name, tbl_name, part_name, deleteData, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_partition_by_name_with_environment_context = function(db_name, tbl_name, part_name, deleteData, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name,
    deleteData: deleteData,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args(params);
  try {
    output.writeMessageBegin('drop_partition_by_name_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_partition_by_name_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_partition_by_name_with_environment_context failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_partitions_req = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_partitions_req(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_partitions_req(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_partitions_req = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_drop_partitions_req_args(params);
  try {
    output.writeMessageBegin('drop_partitions_req', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_partitions_req = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_partitions_req_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_partitions_req failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partition = function(db_name, tbl_name, part_vals, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partition(db_name, tbl_name, part_vals);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partition(db_name, tbl_name, part_vals);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partition = function(db_name, tbl_name, part_vals) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals
  };
  var args = new ThriftHiveMetastore_get_partition_args(params);
  try {
    output.writeMessageBegin('get_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partition failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.exchange_partition = function(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_exchange_partition = function(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) {
  var output = new this.pClass(this.output);
  var params = {
    partitionSpecs: partitionSpecs,
    source_db: source_db,
    source_table_name: source_table_name,
    dest_db: dest_db,
    dest_table_name: dest_table_name
  };
  var args = new ThriftHiveMetastore_exchange_partition_args(params);
  try {
    output.writeMessageBegin('exchange_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_exchange_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_exchange_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('exchange_partition failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.exchange_partitions = function(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_exchange_partitions = function(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) {
  var output = new this.pClass(this.output);
  var params = {
    partitionSpecs: partitionSpecs,
    source_db: source_db,
    source_table_name: source_table_name,
    dest_db: dest_db,
    dest_table_name: dest_table_name
  };
  var args = new ThriftHiveMetastore_exchange_partitions_args(params);
  try {
    output.writeMessageBegin('exchange_partitions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_exchange_partitions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_exchange_partitions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('exchange_partitions failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partition_with_auth = function(db_name, tbl_name, part_vals, user_name, group_names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partition_with_auth = function(db_name, tbl_name, part_vals, user_name, group_names) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    user_name: user_name,
    group_names: group_names
  };
  var args = new ThriftHiveMetastore_get_partition_with_auth_args(params);
  try {
    output.writeMessageBegin('get_partition_with_auth', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partition_with_auth = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partition_with_auth_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partition_with_auth failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partition_by_name = function(db_name, tbl_name, part_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partition_by_name(db_name, tbl_name, part_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partition_by_name(db_name, tbl_name, part_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partition_by_name = function(db_name, tbl_name, part_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name
  };
  var args = new ThriftHiveMetastore_get_partition_by_name_args(params);
  try {
    output.writeMessageBegin('get_partition_by_name', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partition_by_name = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partition_by_name_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partition_by_name failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions = function(db_name, tbl_name, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions(db_name, tbl_name, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions(db_name, tbl_name, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions = function(db_name, tbl_name, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_partitions_args(params);
  try {
    output.writeMessageBegin('get_partitions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_with_auth = function(db_name, tbl_name, max_parts, user_name, group_names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_with_auth = function(db_name, tbl_name, max_parts, user_name, group_names) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    max_parts: max_parts,
    user_name: user_name,
    group_names: group_names
  };
  var args = new ThriftHiveMetastore_get_partitions_with_auth_args(params);
  try {
    output.writeMessageBegin('get_partitions_with_auth', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_with_auth = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_with_auth_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_with_auth failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_pspec = function(db_name, tbl_name, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_pspec(db_name, tbl_name, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_pspec(db_name, tbl_name, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_pspec = function(db_name, tbl_name, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_partitions_pspec_args(params);
  try {
    output.writeMessageBegin('get_partitions_pspec', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_pspec = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_pspec_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_pspec failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partition_names = function(db_name, tbl_name, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partition_names(db_name, tbl_name, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partition_names(db_name, tbl_name, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partition_names = function(db_name, tbl_name, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_partition_names_args(params);
  try {
    output.writeMessageBegin('get_partition_names', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partition_names = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partition_names_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partition_names failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_ps = function(db_name, tbl_name, part_vals, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_ps = function(db_name, tbl_name, part_vals, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_partitions_ps_args(params);
  try {
    output.writeMessageBegin('get_partitions_ps', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_ps = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_ps_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_ps failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_ps_with_auth = function(db_name, tbl_name, part_vals, max_parts, user_name, group_names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_ps_with_auth = function(db_name, tbl_name, part_vals, max_parts, user_name, group_names) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    max_parts: max_parts,
    user_name: user_name,
    group_names: group_names
  };
  var args = new ThriftHiveMetastore_get_partitions_ps_with_auth_args(params);
  try {
    output.writeMessageBegin('get_partitions_ps_with_auth', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_ps_with_auth = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_ps_with_auth_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_ps_with_auth failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partition_names_ps = function(db_name, tbl_name, part_vals, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partition_names_ps = function(db_name, tbl_name, part_vals, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_partition_names_ps_args(params);
  try {
    output.writeMessageBegin('get_partition_names_ps', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partition_names_ps = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partition_names_ps_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partition_names_ps failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_by_filter = function(db_name, tbl_name, filter, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_by_filter = function(db_name, tbl_name, filter, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    filter: filter,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_partitions_by_filter_args(params);
  try {
    output.writeMessageBegin('get_partitions_by_filter', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_by_filter = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_by_filter_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_by_filter failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_part_specs_by_filter = function(db_name, tbl_name, filter, max_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_part_specs_by_filter = function(db_name, tbl_name, filter, max_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    filter: filter,
    max_parts: max_parts
  };
  var args = new ThriftHiveMetastore_get_part_specs_by_filter_args(params);
  try {
    output.writeMessageBegin('get_part_specs_by_filter', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_part_specs_by_filter = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_part_specs_by_filter_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_part_specs_by_filter failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_by_expr = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_by_expr(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_by_expr(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_by_expr = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_get_partitions_by_expr_args(params);
  try {
    output.writeMessageBegin('get_partitions_by_expr', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_by_expr = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_by_expr_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_by_expr failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_num_partitions_by_filter = function(db_name, tbl_name, filter, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_num_partitions_by_filter(db_name, tbl_name, filter);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_num_partitions_by_filter(db_name, tbl_name, filter);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_num_partitions_by_filter = function(db_name, tbl_name, filter) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    filter: filter
  };
  var args = new ThriftHiveMetastore_get_num_partitions_by_filter_args(params);
  try {
    output.writeMessageBegin('get_num_partitions_by_filter', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_num_partitions_by_filter = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_num_partitions_by_filter_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_num_partitions_by_filter failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_by_names = function(db_name, tbl_name, names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_by_names(db_name, tbl_name, names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_by_names(db_name, tbl_name, names);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_by_names = function(db_name, tbl_name, names) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    names: names
  };
  var args = new ThriftHiveMetastore_get_partitions_by_names_args(params);
  try {
    output.writeMessageBegin('get_partitions_by_names', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_by_names = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_by_names_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_by_names failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.alter_partition = function(db_name, tbl_name, new_part, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_partition(db_name, tbl_name, new_part);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_partition(db_name, tbl_name, new_part);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_partition = function(db_name, tbl_name, new_part) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    new_part: new_part
  };
  var args = new ThriftHiveMetastore_alter_partition_args(params);
  try {
    output.writeMessageBegin('alter_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.alter_partitions = function(db_name, tbl_name, new_parts, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_partitions(db_name, tbl_name, new_parts);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_partitions(db_name, tbl_name, new_parts);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_partitions = function(db_name, tbl_name, new_parts) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    new_parts: new_parts
  };
  var args = new ThriftHiveMetastore_alter_partitions_args(params);
  try {
    output.writeMessageBegin('alter_partitions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_partitions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_partitions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.alter_partitions_with_environment_context = function(db_name, tbl_name, new_parts, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_partitions_with_environment_context = function(db_name, tbl_name, new_parts, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    new_parts: new_parts,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_alter_partitions_with_environment_context_args(params);
  try {
    output.writeMessageBegin('alter_partitions_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_partitions_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_partitions_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.alter_partition_with_environment_context = function(db_name, tbl_name, new_part, environment_context, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_partition_with_environment_context = function(db_name, tbl_name, new_part, environment_context) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    new_part: new_part,
    environment_context: environment_context
  };
  var args = new ThriftHiveMetastore_alter_partition_with_environment_context_args(params);
  try {
    output.writeMessageBegin('alter_partition_with_environment_context', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_partition_with_environment_context = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_partition_with_environment_context_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.rename_partition = function(db_name, tbl_name, part_vals, new_part, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_rename_partition(db_name, tbl_name, part_vals, new_part);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_rename_partition(db_name, tbl_name, part_vals, new_part);
  }
};

ThriftHiveMetastoreClient.prototype.send_rename_partition = function(db_name, tbl_name, part_vals, new_part) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    new_part: new_part
  };
  var args = new ThriftHiveMetastore_rename_partition_args(params);
  try {
    output.writeMessageBegin('rename_partition', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_rename_partition = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_rename_partition_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.partition_name_has_valid_characters = function(part_vals, throw_exception, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_partition_name_has_valid_characters(part_vals, throw_exception);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_partition_name_has_valid_characters(part_vals, throw_exception);
  }
};

ThriftHiveMetastoreClient.prototype.send_partition_name_has_valid_characters = function(part_vals, throw_exception) {
  var output = new this.pClass(this.output);
  var params = {
    part_vals: part_vals,
    throw_exception: throw_exception
  };
  var args = new ThriftHiveMetastore_partition_name_has_valid_characters_args(params);
  try {
    output.writeMessageBegin('partition_name_has_valid_characters', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_partition_name_has_valid_characters = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_partition_name_has_valid_characters_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('partition_name_has_valid_characters failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_config_value = function(name, defaultValue, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_config_value(name, defaultValue);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_config_value(name, defaultValue);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_config_value = function(name, defaultValue) {
  var output = new this.pClass(this.output);
  var params = {
    name: name,
    defaultValue: defaultValue
  };
  var args = new ThriftHiveMetastore_get_config_value_args(params);
  try {
    output.writeMessageBegin('get_config_value', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_config_value = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_config_value_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_config_value failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.partition_name_to_vals = function(part_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_partition_name_to_vals(part_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_partition_name_to_vals(part_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_partition_name_to_vals = function(part_name) {
  var output = new this.pClass(this.output);
  var params = {
    part_name: part_name
  };
  var args = new ThriftHiveMetastore_partition_name_to_vals_args(params);
  try {
    output.writeMessageBegin('partition_name_to_vals', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_partition_name_to_vals = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_partition_name_to_vals_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('partition_name_to_vals failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.partition_name_to_spec = function(part_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_partition_name_to_spec(part_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_partition_name_to_spec(part_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_partition_name_to_spec = function(part_name) {
  var output = new this.pClass(this.output);
  var params = {
    part_name: part_name
  };
  var args = new ThriftHiveMetastore_partition_name_to_spec_args(params);
  try {
    output.writeMessageBegin('partition_name_to_spec', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_partition_name_to_spec = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_partition_name_to_spec_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('partition_name_to_spec failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.markPartitionForEvent = function(db_name, tbl_name, part_vals, eventType, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType);
  }
};

ThriftHiveMetastoreClient.prototype.send_markPartitionForEvent = function(db_name, tbl_name, part_vals, eventType) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    eventType: eventType
  };
  var args = new ThriftHiveMetastore_markPartitionForEvent_args(params);
  try {
    output.writeMessageBegin('markPartitionForEvent', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_markPartitionForEvent = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_markPartitionForEvent_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.o5) {
    return callback(result.o5);
  }
  if (null !== result.o6) {
    return callback(result.o6);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.isPartitionMarkedForEvent = function(db_name, tbl_name, part_vals, eventType, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType);
  }
};

ThriftHiveMetastoreClient.prototype.send_isPartitionMarkedForEvent = function(db_name, tbl_name, part_vals, eventType) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_vals: part_vals,
    eventType: eventType
  };
  var args = new ThriftHiveMetastore_isPartitionMarkedForEvent_args(params);
  try {
    output.writeMessageBegin('isPartitionMarkedForEvent', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_isPartitionMarkedForEvent = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_isPartitionMarkedForEvent_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.o5) {
    return callback(result.o5);
  }
  if (null !== result.o6) {
    return callback(result.o6);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('isPartitionMarkedForEvent failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_index = function(new_index, index_table, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_index(new_index, index_table);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_index(new_index, index_table);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_index = function(new_index, index_table) {
  var output = new this.pClass(this.output);
  var params = {
    new_index: new_index,
    index_table: index_table
  };
  var args = new ThriftHiveMetastore_add_index_args(params);
  try {
    output.writeMessageBegin('add_index', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_index = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_index_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_index failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.alter_index = function(dbname, base_tbl_name, idx_name, new_idx, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_index(dbname, base_tbl_name, idx_name, new_idx);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_index(dbname, base_tbl_name, idx_name, new_idx);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_index = function(dbname, base_tbl_name, idx_name, new_idx) {
  var output = new this.pClass(this.output);
  var params = {
    dbname: dbname,
    base_tbl_name: base_tbl_name,
    idx_name: idx_name,
    new_idx: new_idx
  };
  var args = new ThriftHiveMetastore_alter_index_args(params);
  try {
    output.writeMessageBegin('alter_index', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_index = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_index_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.drop_index_by_name = function(db_name, tbl_name, index_name, deleteData, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_index_by_name = function(db_name, tbl_name, index_name, deleteData) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    index_name: index_name,
    deleteData: deleteData
  };
  var args = new ThriftHiveMetastore_drop_index_by_name_args(params);
  try {
    output.writeMessageBegin('drop_index_by_name', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_index_by_name = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_index_by_name_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_index_by_name failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_index_by_name = function(db_name, tbl_name, index_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_index_by_name(db_name, tbl_name, index_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_index_by_name(db_name, tbl_name, index_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_index_by_name = function(db_name, tbl_name, index_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    index_name: index_name
  };
  var args = new ThriftHiveMetastore_get_index_by_name_args(params);
  try {
    output.writeMessageBegin('get_index_by_name', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_index_by_name = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_index_by_name_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_index_by_name failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_indexes = function(db_name, tbl_name, max_indexes, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_indexes(db_name, tbl_name, max_indexes);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_indexes(db_name, tbl_name, max_indexes);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_indexes = function(db_name, tbl_name, max_indexes) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    max_indexes: max_indexes
  };
  var args = new ThriftHiveMetastore_get_indexes_args(params);
  try {
    output.writeMessageBegin('get_indexes', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_indexes = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_indexes_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_indexes failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_index_names = function(db_name, tbl_name, max_indexes, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_index_names(db_name, tbl_name, max_indexes);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_index_names(db_name, tbl_name, max_indexes);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_index_names = function(db_name, tbl_name, max_indexes) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    max_indexes: max_indexes
  };
  var args = new ThriftHiveMetastore_get_index_names_args(params);
  try {
    output.writeMessageBegin('get_index_names', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_index_names = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_index_names_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_index_names failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_primary_keys = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_primary_keys(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_primary_keys(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_primary_keys = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_primary_keys_args(params);
  try {
    output.writeMessageBegin('get_primary_keys', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_primary_keys = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_primary_keys_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_primary_keys failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_foreign_keys = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_foreign_keys(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_foreign_keys(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_foreign_keys = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_foreign_keys_args(params);
  try {
    output.writeMessageBegin('get_foreign_keys', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_foreign_keys = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_foreign_keys_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_foreign_keys failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.update_table_column_statistics = function(stats_obj, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_update_table_column_statistics(stats_obj);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_update_table_column_statistics(stats_obj);
  }
};

ThriftHiveMetastoreClient.prototype.send_update_table_column_statistics = function(stats_obj) {
  var output = new this.pClass(this.output);
  var params = {
    stats_obj: stats_obj
  };
  var args = new ThriftHiveMetastore_update_table_column_statistics_args(params);
  try {
    output.writeMessageBegin('update_table_column_statistics', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_update_table_column_statistics = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_update_table_column_statistics_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('update_table_column_statistics failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.update_partition_column_statistics = function(stats_obj, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_update_partition_column_statistics(stats_obj);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_update_partition_column_statistics(stats_obj);
  }
};

ThriftHiveMetastoreClient.prototype.send_update_partition_column_statistics = function(stats_obj) {
  var output = new this.pClass(this.output);
  var params = {
    stats_obj: stats_obj
  };
  var args = new ThriftHiveMetastore_update_partition_column_statistics_args(params);
  try {
    output.writeMessageBegin('update_partition_column_statistics', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_update_partition_column_statistics = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_update_partition_column_statistics_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('update_partition_column_statistics failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_column_statistics = function(db_name, tbl_name, col_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_column_statistics(db_name, tbl_name, col_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_column_statistics(db_name, tbl_name, col_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_column_statistics = function(db_name, tbl_name, col_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    col_name: col_name
  };
  var args = new ThriftHiveMetastore_get_table_column_statistics_args(params);
  try {
    output.writeMessageBegin('get_table_column_statistics', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_column_statistics = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_column_statistics_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_column_statistics failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partition_column_statistics = function(db_name, tbl_name, part_name, col_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partition_column_statistics = function(db_name, tbl_name, part_name, col_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name,
    col_name: col_name
  };
  var args = new ThriftHiveMetastore_get_partition_column_statistics_args(params);
  try {
    output.writeMessageBegin('get_partition_column_statistics', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partition_column_statistics = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partition_column_statistics_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partition_column_statistics failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_table_statistics_req = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_table_statistics_req(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_table_statistics_req(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_table_statistics_req = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_table_statistics_req_args(params);
  try {
    output.writeMessageBegin('get_table_statistics_req', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_table_statistics_req = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_table_statistics_req_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_table_statistics_req failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_partitions_statistics_req = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_partitions_statistics_req(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_partitions_statistics_req(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_partitions_statistics_req = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_partitions_statistics_req_args(params);
  try {
    output.writeMessageBegin('get_partitions_statistics_req', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_partitions_statistics_req = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_partitions_statistics_req_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_partitions_statistics_req failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_aggr_stats_for = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_aggr_stats_for(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_aggr_stats_for(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_aggr_stats_for = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_aggr_stats_for_args(params);
  try {
    output.writeMessageBegin('get_aggr_stats_for', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_aggr_stats_for = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_aggr_stats_for_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_aggr_stats_for failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.set_aggr_stats_for = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_set_aggr_stats_for(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_set_aggr_stats_for(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_set_aggr_stats_for = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_set_aggr_stats_for_args(params);
  try {
    output.writeMessageBegin('set_aggr_stats_for', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_set_aggr_stats_for = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_set_aggr_stats_for_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('set_aggr_stats_for failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.delete_partition_column_statistics = function(db_name, tbl_name, part_name, col_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_delete_partition_column_statistics = function(db_name, tbl_name, part_name, col_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    part_name: part_name,
    col_name: col_name
  };
  var args = new ThriftHiveMetastore_delete_partition_column_statistics_args(params);
  try {
    output.writeMessageBegin('delete_partition_column_statistics', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_delete_partition_column_statistics = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_delete_partition_column_statistics_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('delete_partition_column_statistics failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.delete_table_column_statistics = function(db_name, tbl_name, col_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_delete_table_column_statistics(db_name, tbl_name, col_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_delete_table_column_statistics(db_name, tbl_name, col_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_delete_table_column_statistics = function(db_name, tbl_name, col_name) {
  var output = new this.pClass(this.output);
  var params = {
    db_name: db_name,
    tbl_name: tbl_name,
    col_name: col_name
  };
  var args = new ThriftHiveMetastore_delete_table_column_statistics_args(params);
  try {
    output.writeMessageBegin('delete_table_column_statistics', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_delete_table_column_statistics = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_delete_table_column_statistics_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('delete_table_column_statistics failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.create_function = function(func, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_function(func);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_function(func);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_function = function(func) {
  var output = new this.pClass(this.output);
  var params = {
    func: func
  };
  var args = new ThriftHiveMetastore_create_function_args(params);
  try {
    output.writeMessageBegin('create_function', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_function = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_function_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.o4) {
    return callback(result.o4);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.drop_function = function(dbName, funcName, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_function(dbName, funcName);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_function(dbName, funcName);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_function = function(dbName, funcName) {
  var output = new this.pClass(this.output);
  var params = {
    dbName: dbName,
    funcName: funcName
  };
  var args = new ThriftHiveMetastore_drop_function_args(params);
  try {
    output.writeMessageBegin('drop_function', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_function = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_function_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.alter_function = function(dbName, funcName, newFunc, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_alter_function(dbName, funcName, newFunc);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_alter_function(dbName, funcName, newFunc);
  }
};

ThriftHiveMetastoreClient.prototype.send_alter_function = function(dbName, funcName, newFunc) {
  var output = new this.pClass(this.output);
  var params = {
    dbName: dbName,
    funcName: funcName,
    newFunc: newFunc
  };
  var args = new ThriftHiveMetastore_alter_function_args(params);
  try {
    output.writeMessageBegin('alter_function', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_alter_function = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_alter_function_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_functions = function(dbName, pattern, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_functions(dbName, pattern);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_functions(dbName, pattern);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_functions = function(dbName, pattern) {
  var output = new this.pClass(this.output);
  var params = {
    dbName: dbName,
    pattern: pattern
  };
  var args = new ThriftHiveMetastore_get_functions_args(params);
  try {
    output.writeMessageBegin('get_functions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_functions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_functions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_functions failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_function = function(dbName, funcName, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_function(dbName, funcName);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_function(dbName, funcName);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_function = function(dbName, funcName) {
  var output = new this.pClass(this.output);
  var params = {
    dbName: dbName,
    funcName: funcName
  };
  var args = new ThriftHiveMetastore_get_function_args(params);
  try {
    output.writeMessageBegin('get_function', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_function = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_function_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_function failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_all_functions = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_all_functions();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_all_functions();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_all_functions = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_all_functions_args();
  try {
    output.writeMessageBegin('get_all_functions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_all_functions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_all_functions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_all_functions failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.create_role = function(role, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_create_role(role);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_create_role(role);
  }
};

ThriftHiveMetastoreClient.prototype.send_create_role = function(role) {
  var output = new this.pClass(this.output);
  var params = {
    role: role
  };
  var args = new ThriftHiveMetastore_create_role_args(params);
  try {
    output.writeMessageBegin('create_role', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_create_role = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_create_role_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('create_role failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.drop_role = function(role_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_drop_role(role_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_drop_role(role_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_drop_role = function(role_name) {
  var output = new this.pClass(this.output);
  var params = {
    role_name: role_name
  };
  var args = new ThriftHiveMetastore_drop_role_args(params);
  try {
    output.writeMessageBegin('drop_role', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_drop_role = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_drop_role_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('drop_role failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_role_names = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_role_names();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_role_names();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_role_names = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_role_names_args();
  try {
    output.writeMessageBegin('get_role_names', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_role_names = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_role_names_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_role_names failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.grant_role = function(role_name, principal_name, principal_type, grantor, grantorType, grant_option, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option);
  }
};

ThriftHiveMetastoreClient.prototype.send_grant_role = function(role_name, principal_name, principal_type, grantor, grantorType, grant_option) {
  var output = new this.pClass(this.output);
  var params = {
    role_name: role_name,
    principal_name: principal_name,
    principal_type: principal_type,
    grantor: grantor,
    grantorType: grantorType,
    grant_option: grant_option
  };
  var args = new ThriftHiveMetastore_grant_role_args(params);
  try {
    output.writeMessageBegin('grant_role', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_grant_role = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_grant_role_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('grant_role failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.revoke_role = function(role_name, principal_name, principal_type, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_revoke_role(role_name, principal_name, principal_type);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_revoke_role(role_name, principal_name, principal_type);
  }
};

ThriftHiveMetastoreClient.prototype.send_revoke_role = function(role_name, principal_name, principal_type) {
  var output = new this.pClass(this.output);
  var params = {
    role_name: role_name,
    principal_name: principal_name,
    principal_type: principal_type
  };
  var args = new ThriftHiveMetastore_revoke_role_args(params);
  try {
    output.writeMessageBegin('revoke_role', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_revoke_role = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_revoke_role_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('revoke_role failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.list_roles = function(principal_name, principal_type, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_list_roles(principal_name, principal_type);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_list_roles(principal_name, principal_type);
  }
};

ThriftHiveMetastoreClient.prototype.send_list_roles = function(principal_name, principal_type) {
  var output = new this.pClass(this.output);
  var params = {
    principal_name: principal_name,
    principal_type: principal_type
  };
  var args = new ThriftHiveMetastore_list_roles_args(params);
  try {
    output.writeMessageBegin('list_roles', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_list_roles = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_list_roles_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('list_roles failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.grant_revoke_role = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_grant_revoke_role(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_grant_revoke_role(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_grant_revoke_role = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_grant_revoke_role_args(params);
  try {
    output.writeMessageBegin('grant_revoke_role', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_grant_revoke_role = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_grant_revoke_role_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('grant_revoke_role failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_principals_in_role = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_principals_in_role(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_principals_in_role(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_principals_in_role = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_principals_in_role_args(params);
  try {
    output.writeMessageBegin('get_principals_in_role', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_principals_in_role = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_principals_in_role_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_principals_in_role failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_role_grants_for_principal = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_role_grants_for_principal(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_role_grants_for_principal(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_role_grants_for_principal = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_get_role_grants_for_principal_args(params);
  try {
    output.writeMessageBegin('get_role_grants_for_principal', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_role_grants_for_principal = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_role_grants_for_principal_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_role_grants_for_principal failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_privilege_set = function(hiveObject, user_name, group_names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_privilege_set(hiveObject, user_name, group_names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_privilege_set(hiveObject, user_name, group_names);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_privilege_set = function(hiveObject, user_name, group_names) {
  var output = new this.pClass(this.output);
  var params = {
    hiveObject: hiveObject,
    user_name: user_name,
    group_names: group_names
  };
  var args = new ThriftHiveMetastore_get_privilege_set_args(params);
  try {
    output.writeMessageBegin('get_privilege_set', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_privilege_set = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_privilege_set_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_privilege_set failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.list_privileges = function(principal_name, principal_type, hiveObject, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_list_privileges(principal_name, principal_type, hiveObject);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_list_privileges(principal_name, principal_type, hiveObject);
  }
};

ThriftHiveMetastoreClient.prototype.send_list_privileges = function(principal_name, principal_type, hiveObject) {
  var output = new this.pClass(this.output);
  var params = {
    principal_name: principal_name,
    principal_type: principal_type,
    hiveObject: hiveObject
  };
  var args = new ThriftHiveMetastore_list_privileges_args(params);
  try {
    output.writeMessageBegin('list_privileges', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_list_privileges = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_list_privileges_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('list_privileges failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.grant_privileges = function(privileges, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_grant_privileges(privileges);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_grant_privileges(privileges);
  }
};

ThriftHiveMetastoreClient.prototype.send_grant_privileges = function(privileges) {
  var output = new this.pClass(this.output);
  var params = {
    privileges: privileges
  };
  var args = new ThriftHiveMetastore_grant_privileges_args(params);
  try {
    output.writeMessageBegin('grant_privileges', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_grant_privileges = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_grant_privileges_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('grant_privileges failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.revoke_privileges = function(privileges, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_revoke_privileges(privileges);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_revoke_privileges(privileges);
  }
};

ThriftHiveMetastoreClient.prototype.send_revoke_privileges = function(privileges) {
  var output = new this.pClass(this.output);
  var params = {
    privileges: privileges
  };
  var args = new ThriftHiveMetastore_revoke_privileges_args(params);
  try {
    output.writeMessageBegin('revoke_privileges', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_revoke_privileges = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_revoke_privileges_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('revoke_privileges failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.grant_revoke_privileges = function(request, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_grant_revoke_privileges(request);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_grant_revoke_privileges(request);
  }
};

ThriftHiveMetastoreClient.prototype.send_grant_revoke_privileges = function(request) {
  var output = new this.pClass(this.output);
  var params = {
    request: request
  };
  var args = new ThriftHiveMetastore_grant_revoke_privileges_args(params);
  try {
    output.writeMessageBegin('grant_revoke_privileges', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_grant_revoke_privileges = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_grant_revoke_privileges_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('grant_revoke_privileges failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.set_ugi = function(user_name, group_names, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_set_ugi(user_name, group_names);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_set_ugi(user_name, group_names);
  }
};

ThriftHiveMetastoreClient.prototype.send_set_ugi = function(user_name, group_names) {
  var output = new this.pClass(this.output);
  var params = {
    user_name: user_name,
    group_names: group_names
  };
  var args = new ThriftHiveMetastore_set_ugi_args(params);
  try {
    output.writeMessageBegin('set_ugi', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_set_ugi = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_set_ugi_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('set_ugi failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_delegation_token = function(token_owner, renewer_kerberos_principal_name, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_delegation_token(token_owner, renewer_kerberos_principal_name);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_delegation_token(token_owner, renewer_kerberos_principal_name);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_delegation_token = function(token_owner, renewer_kerberos_principal_name) {
  var output = new this.pClass(this.output);
  var params = {
    token_owner: token_owner,
    renewer_kerberos_principal_name: renewer_kerberos_principal_name
  };
  var args = new ThriftHiveMetastore_get_delegation_token_args(params);
  try {
    output.writeMessageBegin('get_delegation_token', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_delegation_token = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_delegation_token_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_delegation_token failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.renew_delegation_token = function(token_str_form, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_renew_delegation_token(token_str_form);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_renew_delegation_token(token_str_form);
  }
};

ThriftHiveMetastoreClient.prototype.send_renew_delegation_token = function(token_str_form) {
  var output = new this.pClass(this.output);
  var params = {
    token_str_form: token_str_form
  };
  var args = new ThriftHiveMetastore_renew_delegation_token_args(params);
  try {
    output.writeMessageBegin('renew_delegation_token', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_renew_delegation_token = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_renew_delegation_token_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('renew_delegation_token failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.cancel_delegation_token = function(token_str_form, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_cancel_delegation_token(token_str_form);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_cancel_delegation_token(token_str_form);
  }
};

ThriftHiveMetastoreClient.prototype.send_cancel_delegation_token = function(token_str_form) {
  var output = new this.pClass(this.output);
  var params = {
    token_str_form: token_str_form
  };
  var args = new ThriftHiveMetastore_cancel_delegation_token_args(params);
  try {
    output.writeMessageBegin('cancel_delegation_token', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_cancel_delegation_token = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_cancel_delegation_token_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.add_token = function(token_identifier, delegation_token, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_token(token_identifier, delegation_token);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_token(token_identifier, delegation_token);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_token = function(token_identifier, delegation_token) {
  var output = new this.pClass(this.output);
  var params = {
    token_identifier: token_identifier,
    delegation_token: delegation_token
  };
  var args = new ThriftHiveMetastore_add_token_args(params);
  try {
    output.writeMessageBegin('add_token', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_token = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_token_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_token failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.remove_token = function(token_identifier, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_remove_token(token_identifier);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_remove_token(token_identifier);
  }
};

ThriftHiveMetastoreClient.prototype.send_remove_token = function(token_identifier) {
  var output = new this.pClass(this.output);
  var params = {
    token_identifier: token_identifier
  };
  var args = new ThriftHiveMetastore_remove_token_args(params);
  try {
    output.writeMessageBegin('remove_token', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_remove_token = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_remove_token_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('remove_token failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_token = function(token_identifier, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_token(token_identifier);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_token(token_identifier);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_token = function(token_identifier) {
  var output = new this.pClass(this.output);
  var params = {
    token_identifier: token_identifier
  };
  var args = new ThriftHiveMetastore_get_token_args(params);
  try {
    output.writeMessageBegin('get_token', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_token = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_token_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_token failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_all_token_identifiers = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_all_token_identifiers();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_all_token_identifiers();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_all_token_identifiers = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_all_token_identifiers_args();
  try {
    output.writeMessageBegin('get_all_token_identifiers', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_all_token_identifiers = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_all_token_identifiers_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_all_token_identifiers failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_master_key = function(key, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_master_key(key);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_master_key(key);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_master_key = function(key) {
  var output = new this.pClass(this.output);
  var params = {
    key: key
  };
  var args = new ThriftHiveMetastore_add_master_key_args(params);
  try {
    output.writeMessageBegin('add_master_key', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_master_key = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_master_key_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('add_master_key failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.update_master_key = function(seq_number, key, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_update_master_key(seq_number, key);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_update_master_key(seq_number, key);
  }
};

ThriftHiveMetastoreClient.prototype.send_update_master_key = function(seq_number, key) {
  var output = new this.pClass(this.output);
  var params = {
    seq_number: seq_number,
    key: key
  };
  var args = new ThriftHiveMetastore_update_master_key_args(params);
  try {
    output.writeMessageBegin('update_master_key', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_update_master_key = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_update_master_key_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.remove_master_key = function(key_seq, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_remove_master_key(key_seq);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_remove_master_key(key_seq);
  }
};

ThriftHiveMetastoreClient.prototype.send_remove_master_key = function(key_seq) {
  var output = new this.pClass(this.output);
  var params = {
    key_seq: key_seq
  };
  var args = new ThriftHiveMetastore_remove_master_key_args(params);
  try {
    output.writeMessageBegin('remove_master_key', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_remove_master_key = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_remove_master_key_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('remove_master_key failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_master_keys = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_master_keys();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_master_keys();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_master_keys = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_master_keys_args();
  try {
    output.writeMessageBegin('get_master_keys', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_master_keys = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_master_keys_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_master_keys failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_open_txns = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_open_txns();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_open_txns();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_open_txns = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_open_txns_args();
  try {
    output.writeMessageBegin('get_open_txns', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_open_txns = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_open_txns_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_open_txns failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_open_txns_info = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_open_txns_info();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_open_txns_info();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_open_txns_info = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_open_txns_info_args();
  try {
    output.writeMessageBegin('get_open_txns_info', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_open_txns_info = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_open_txns_info_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_open_txns_info failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.open_txns = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_open_txns(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_open_txns(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_open_txns = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_open_txns_args(params);
  try {
    output.writeMessageBegin('open_txns', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_open_txns = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_open_txns_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('open_txns failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.abort_txn = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_abort_txn(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_abort_txn(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_abort_txn = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_abort_txn_args(params);
  try {
    output.writeMessageBegin('abort_txn', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_abort_txn = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_abort_txn_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.abort_txns = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_abort_txns(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_abort_txns(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_abort_txns = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_abort_txns_args(params);
  try {
    output.writeMessageBegin('abort_txns', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_abort_txns = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_abort_txns_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.commit_txn = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_commit_txn(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_commit_txn(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_commit_txn = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_commit_txn_args(params);
  try {
    output.writeMessageBegin('commit_txn', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_commit_txn = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_commit_txn_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.lock = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_lock(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_lock(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_lock = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_lock_args(params);
  try {
    output.writeMessageBegin('lock', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_lock = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_lock_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('lock failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.check_lock = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_check_lock(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_check_lock(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_check_lock = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_check_lock_args(params);
  try {
    output.writeMessageBegin('check_lock', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_check_lock = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_check_lock_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('check_lock failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.unlock = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_unlock(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_unlock(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_unlock = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_unlock_args(params);
  try {
    output.writeMessageBegin('unlock', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_unlock = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_unlock_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.show_locks = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_show_locks(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_show_locks(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_show_locks = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_show_locks_args(params);
  try {
    output.writeMessageBegin('show_locks', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_show_locks = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_show_locks_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('show_locks failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.heartbeat = function(ids, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_heartbeat(ids);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_heartbeat(ids);
  }
};

ThriftHiveMetastoreClient.prototype.send_heartbeat = function(ids) {
  var output = new this.pClass(this.output);
  var params = {
    ids: ids
  };
  var args = new ThriftHiveMetastore_heartbeat_args(params);
  try {
    output.writeMessageBegin('heartbeat', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_heartbeat = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_heartbeat_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  if (null !== result.o3) {
    return callback(result.o3);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.heartbeat_txn_range = function(txns, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_heartbeat_txn_range(txns);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_heartbeat_txn_range(txns);
  }
};

ThriftHiveMetastoreClient.prototype.send_heartbeat_txn_range = function(txns) {
  var output = new this.pClass(this.output);
  var params = {
    txns: txns
  };
  var args = new ThriftHiveMetastore_heartbeat_txn_range_args(params);
  try {
    output.writeMessageBegin('heartbeat_txn_range', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_heartbeat_txn_range = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_heartbeat_txn_range_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('heartbeat_txn_range failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.compact = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_compact(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_compact(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_compact = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_compact_args(params);
  try {
    output.writeMessageBegin('compact', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_compact = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_compact_result();
  result.read(input);
  input.readMessageEnd();

  callback(null);
};

ThriftHiveMetastoreClient.prototype.compact2 = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_compact2(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_compact2(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_compact2 = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_compact2_args(params);
  try {
    output.writeMessageBegin('compact2', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_compact2 = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_compact2_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('compact2 failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.show_compact = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_show_compact(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_show_compact(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_show_compact = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_show_compact_args(params);
  try {
    output.writeMessageBegin('show_compact', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_show_compact = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_show_compact_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('show_compact failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.add_dynamic_partitions = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_add_dynamic_partitions(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_add_dynamic_partitions(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_add_dynamic_partitions = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_add_dynamic_partitions_args(params);
  try {
    output.writeMessageBegin('add_dynamic_partitions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_add_dynamic_partitions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_add_dynamic_partitions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.o1) {
    return callback(result.o1);
  }
  if (null !== result.o2) {
    return callback(result.o2);
  }
  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_next_notification = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_next_notification(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_next_notification(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_next_notification = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_get_next_notification_args(params);
  try {
    output.writeMessageBegin('get_next_notification', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_next_notification = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_next_notification_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_next_notification failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_current_notificationEventId = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_current_notificationEventId();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_current_notificationEventId();
  }
};

ThriftHiveMetastoreClient.prototype.send_get_current_notificationEventId = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_get_current_notificationEventId_args();
  try {
    output.writeMessageBegin('get_current_notificationEventId', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_current_notificationEventId = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_current_notificationEventId_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_current_notificationEventId failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.fire_listener_event = function(rqst, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_fire_listener_event(rqst);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_fire_listener_event(rqst);
  }
};

ThriftHiveMetastoreClient.prototype.send_fire_listener_event = function(rqst) {
  var output = new this.pClass(this.output);
  var params = {
    rqst: rqst
  };
  var args = new ThriftHiveMetastore_fire_listener_event_args(params);
  try {
    output.writeMessageBegin('fire_listener_event', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_fire_listener_event = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_fire_listener_event_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('fire_listener_event failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.flushCache = function(callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_flushCache();
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_flushCache();
  }
};

ThriftHiveMetastoreClient.prototype.send_flushCache = function() {
  var output = new this.pClass(this.output);
  var args = new ThriftHiveMetastore_flushCache_args();
  try {
    output.writeMessageBegin('flushCache', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_flushCache = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_flushCache_result();
  result.read(input);
  input.readMessageEnd();

  callback(null);
};

ThriftHiveMetastoreClient.prototype.get_file_metadata_by_expr = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_file_metadata_by_expr(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_file_metadata_by_expr(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_file_metadata_by_expr = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_get_file_metadata_by_expr_args(params);
  try {
    output.writeMessageBegin('get_file_metadata_by_expr', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_file_metadata_by_expr = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_file_metadata_by_expr_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_file_metadata_by_expr failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.get_file_metadata = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_get_file_metadata(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_get_file_metadata(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_get_file_metadata = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_get_file_metadata_args(params);
  try {
    output.writeMessageBegin('get_file_metadata', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_get_file_metadata = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_get_file_metadata_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('get_file_metadata failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.put_file_metadata = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_put_file_metadata(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_put_file_metadata(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_put_file_metadata = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_put_file_metadata_args(params);
  try {
    output.writeMessageBegin('put_file_metadata', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_put_file_metadata = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_put_file_metadata_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('put_file_metadata failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.clear_file_metadata = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_clear_file_metadata(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_clear_file_metadata(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_clear_file_metadata = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_clear_file_metadata_args(params);
  try {
    output.writeMessageBegin('clear_file_metadata', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_clear_file_metadata = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_clear_file_metadata_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('clear_file_metadata failed: unknown result');
};

ThriftHiveMetastoreClient.prototype.cache_file_metadata = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_cache_file_metadata(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_cache_file_metadata(req);
  }
};

ThriftHiveMetastoreClient.prototype.send_cache_file_metadata = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new ThriftHiveMetastore_cache_file_metadata_args(params);
  try {
    output.writeMessageBegin('cache_file_metadata', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

ThriftHiveMetastoreClient.prototype.recv_cache_file_metadata = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new ThriftHiveMetastore_cache_file_metadata_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('cache_file_metadata failed: unknown result');
};
var ThriftHiveMetastoreProcessor = exports.Processor = function(handler) {
  this._handler = handler;
};
Thrift.inherits(ThriftHiveMetastoreProcessor, FacebookServiceProcessor);
ThriftHiveMetastoreProcessor.prototype.process = function(input, output) {
  var r = input.readMessageBegin();
  if (this['process_' + r.fname]) {
    return this['process_' + r.fname].call(this, r.rseqid, input, output);
  } else {
    input.skip(Thrift.Type.STRUCT);
    input.readMessageEnd();
    var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
    output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
    x.write(output);
    output.writeMessageEnd();
    output.flush();
  }
};
ThriftHiveMetastoreProcessor.prototype.process_getMetaConf = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_getMetaConf_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.getMetaConf.length === 1) {
    Q.fcall(this._handler.getMetaConf.bind(this._handler),
      args.key
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_getMetaConf_result({success: result});
      output.writeMessageBegin("getMetaConf", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_getMetaConf_result(err);
        output.writeMessageBegin("getMetaConf", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("getMetaConf", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.getMetaConf(args.key, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_getMetaConf_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("getMetaConf", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("getMetaConf", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_setMetaConf = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_setMetaConf_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.setMetaConf.length === 2) {
    Q.fcall(this._handler.setMetaConf.bind(this._handler),
      args.key,
      args.value
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_setMetaConf_result({success: result});
      output.writeMessageBegin("setMetaConf", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_setMetaConf_result(err);
        output.writeMessageBegin("setMetaConf", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("setMetaConf", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.setMetaConf(args.key, args.value, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_setMetaConf_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("setMetaConf", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("setMetaConf", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_database = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_database_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_database.length === 1) {
    Q.fcall(this._handler.create_database.bind(this._handler),
      args.database
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_database_result({success: result});
      output.writeMessageBegin("create_database", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_create_database_result(err);
        output.writeMessageBegin("create_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_database(args.database, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_create_database_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_database = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_database_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_database.length === 1) {
    Q.fcall(this._handler.get_database.bind(this._handler),
      args.name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_database_result({success: result});
      output.writeMessageBegin("get_database", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_database_result(err);
        output.writeMessageBegin("get_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_database(args.name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_database_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_database = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_database_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_database.length === 3) {
    Q.fcall(this._handler.drop_database.bind(this._handler),
      args.name,
      args.deleteData,
      args.cascade
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_database_result({success: result});
      output.writeMessageBegin("drop_database", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_database_result(err);
        output.writeMessageBegin("drop_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_database(args.name, args.deleteData, args.cascade, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_database_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_databases = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_databases_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_databases.length === 1) {
    Q.fcall(this._handler.get_databases.bind(this._handler),
      args.pattern
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_databases_result({success: result});
      output.writeMessageBegin("get_databases", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_databases_result(err);
        output.writeMessageBegin("get_databases", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_databases", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_databases(args.pattern, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_databases_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_databases", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_databases", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_all_databases = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_all_databases_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_all_databases.length === 0) {
    Q.fcall(this._handler.get_all_databases.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_all_databases_result({success: result});
      output.writeMessageBegin("get_all_databases", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_all_databases_result(err);
        output.writeMessageBegin("get_all_databases", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_databases", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_all_databases(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_all_databases_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_all_databases", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_databases", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_database = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_database_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_database.length === 2) {
    Q.fcall(this._handler.alter_database.bind(this._handler),
      args.dbname,
      args.db
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_database_result({success: result});
      output.writeMessageBegin("alter_database", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_alter_database_result(err);
        output.writeMessageBegin("alter_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_database(args.dbname, args.db, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_alter_database_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_database", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_database", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_type = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_type_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_type.length === 1) {
    Q.fcall(this._handler.get_type.bind(this._handler),
      args.name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_type_result({success: result});
      output.writeMessageBegin("get_type", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_type_result(err);
        output.writeMessageBegin("get_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_type(args.name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_type_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_type = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_type_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_type.length === 1) {
    Q.fcall(this._handler.create_type.bind(this._handler),
      args.type
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_type_result({success: result});
      output.writeMessageBegin("create_type", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_create_type_result(err);
        output.writeMessageBegin("create_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_type(args.type, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_create_type_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_type = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_type_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_type.length === 1) {
    Q.fcall(this._handler.drop_type.bind(this._handler),
      args.type
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_type_result({success: result});
      output.writeMessageBegin("drop_type", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_drop_type_result(err);
        output.writeMessageBegin("drop_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_type(args.type, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_drop_type_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_type_all = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_type_all_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_type_all.length === 1) {
    Q.fcall(this._handler.get_type_all.bind(this._handler),
      args.name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_type_all_result({success: result});
      output.writeMessageBegin("get_type_all", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_type_all_result(err);
        output.writeMessageBegin("get_type_all", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_type_all", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_type_all(args.name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_type_all_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_type_all", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_type_all", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_fields = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_fields_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_fields.length === 2) {
    Q.fcall(this._handler.get_fields.bind(this._handler),
      args.db_name,
      args.table_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_fields_result({success: result});
      output.writeMessageBegin("get_fields", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result = new ThriftHiveMetastore_get_fields_result(err);
        output.writeMessageBegin("get_fields", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_fields", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_fields(args.db_name, args.table_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result_obj = new ThriftHiveMetastore_get_fields_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_fields", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_fields", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_fields_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_fields_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_fields_with_environment_context.length === 3) {
    Q.fcall(this._handler.get_fields_with_environment_context.bind(this._handler),
      args.db_name,
      args.table_name,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_fields_with_environment_context_result({success: result});
      output.writeMessageBegin("get_fields_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result = new ThriftHiveMetastore_get_fields_with_environment_context_result(err);
        output.writeMessageBegin("get_fields_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_fields_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result_obj = new ThriftHiveMetastore_get_fields_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_fields_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_fields_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_schema = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_schema_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_schema.length === 2) {
    Q.fcall(this._handler.get_schema.bind(this._handler),
      args.db_name,
      args.table_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_schema_result({success: result});
      output.writeMessageBegin("get_schema", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result = new ThriftHiveMetastore_get_schema_result(err);
        output.writeMessageBegin("get_schema", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_schema", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_schema(args.db_name, args.table_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result_obj = new ThriftHiveMetastore_get_schema_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_schema", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_schema", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_schema_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_schema_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_schema_with_environment_context.length === 3) {
    Q.fcall(this._handler.get_schema_with_environment_context.bind(this._handler),
      args.db_name,
      args.table_name,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_schema_with_environment_context_result({success: result});
      output.writeMessageBegin("get_schema_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result = new ThriftHiveMetastore_get_schema_with_environment_context_result(err);
        output.writeMessageBegin("get_schema_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_schema_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownDBException) {
        result_obj = new ThriftHiveMetastore_get_schema_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_schema_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_schema_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_table = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_table_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_table.length === 1) {
    Q.fcall(this._handler.create_table.bind(this._handler),
      args.tbl
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_table_result({success: result});
      output.writeMessageBegin("create_table", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_create_table_result(err);
        output.writeMessageBegin("create_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_table(args.tbl, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_create_table_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_table_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_table_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_table_with_environment_context.length === 2) {
    Q.fcall(this._handler.create_table_with_environment_context.bind(this._handler),
      args.tbl,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_table_with_environment_context_result({success: result});
      output.writeMessageBegin("create_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_create_table_with_environment_context_result(err);
        output.writeMessageBegin("create_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_table_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_table_with_environment_context(args.tbl, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_create_table_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_table_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_table_with_constraints = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_table_with_constraints_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_table_with_constraints.length === 3) {
    Q.fcall(this._handler.create_table_with_constraints.bind(this._handler),
      args.tbl,
      args.primaryKeys,
      args.foreignKeys
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_table_with_constraints_result({success: result});
      output.writeMessageBegin("create_table_with_constraints", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_create_table_with_constraints_result(err);
        output.writeMessageBegin("create_table_with_constraints", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_table_with_constraints", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_create_table_with_constraints_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_table_with_constraints", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_table_with_constraints", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_constraint = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_constraint_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_constraint.length === 1) {
    Q.fcall(this._handler.drop_constraint.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_constraint_result({success: result});
      output.writeMessageBegin("drop_constraint", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_constraint_result(err);
        output.writeMessageBegin("drop_constraint", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_constraint", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_constraint(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_constraint_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_constraint", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_constraint", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_primary_key = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_primary_key_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_primary_key.length === 1) {
    Q.fcall(this._handler.add_primary_key.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_primary_key_result({success: result});
      output.writeMessageBegin("add_primary_key", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_primary_key_result(err);
        output.writeMessageBegin("add_primary_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_primary_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_primary_key(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_primary_key_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_primary_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_primary_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_foreign_key = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_foreign_key_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_foreign_key.length === 1) {
    Q.fcall(this._handler.add_foreign_key.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_foreign_key_result({success: result});
      output.writeMessageBegin("add_foreign_key", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_foreign_key_result(err);
        output.writeMessageBegin("add_foreign_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_foreign_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_foreign_key(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_foreign_key_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_foreign_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_foreign_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_table = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_table_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_table.length === 3) {
    Q.fcall(this._handler.drop_table.bind(this._handler),
      args.dbname,
      args.name,
      args.deleteData
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_table_result({success: result});
      output.writeMessageBegin("drop_table", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_table_result(err);
        output.writeMessageBegin("drop_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_table(args.dbname, args.name, args.deleteData, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_table_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_table_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_table_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_table_with_environment_context.length === 4) {
    Q.fcall(this._handler.drop_table_with_environment_context.bind(this._handler),
      args.dbname,
      args.name,
      args.deleteData,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_table_with_environment_context_result({success: result});
      output.writeMessageBegin("drop_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_table_with_environment_context_result(err);
        output.writeMessageBegin("drop_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_table_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_table_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_table_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_tables = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_tables_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_tables.length === 2) {
    Q.fcall(this._handler.get_tables.bind(this._handler),
      args.db_name,
      args.pattern
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_tables_result({success: result});
      output.writeMessageBegin("get_tables", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_tables_result(err);
        output.writeMessageBegin("get_tables", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_tables", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_tables(args.db_name, args.pattern, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_tables_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_tables", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_tables", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_tables_by_type = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_tables_by_type_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_tables_by_type.length === 3) {
    Q.fcall(this._handler.get_tables_by_type.bind(this._handler),
      args.db_name,
      args.pattern,
      args.tableType
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_tables_by_type_result({success: result});
      output.writeMessageBegin("get_tables_by_type", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_tables_by_type_result(err);
        output.writeMessageBegin("get_tables_by_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_tables_by_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_tables_by_type(args.db_name, args.pattern, args.tableType, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_tables_by_type_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_tables_by_type", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_tables_by_type", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_meta = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_meta_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_meta.length === 3) {
    Q.fcall(this._handler.get_table_meta.bind(this._handler),
      args.db_patterns,
      args.tbl_patterns,
      args.tbl_types
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_meta_result({success: result});
      output.writeMessageBegin("get_table_meta", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_table_meta_result(err);
        output.writeMessageBegin("get_table_meta", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_meta", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_table_meta_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_meta", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_meta", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_all_tables = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_all_tables_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_all_tables.length === 1) {
    Q.fcall(this._handler.get_all_tables.bind(this._handler),
      args.db_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_all_tables_result({success: result});
      output.writeMessageBegin("get_all_tables", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_all_tables_result(err);
        output.writeMessageBegin("get_all_tables", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_tables", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_all_tables(args.db_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_all_tables_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_all_tables", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_tables", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table.length === 2) {
    Q.fcall(this._handler.get_table.bind(this._handler),
      args.dbname,
      args.tbl_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_result({success: result});
      output.writeMessageBegin("get_table", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_table_result(err);
        output.writeMessageBegin("get_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table(args.dbname, args.tbl_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_table_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_objects_by_name = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_objects_by_name_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_objects_by_name.length === 2) {
    Q.fcall(this._handler.get_table_objects_by_name.bind(this._handler),
      args.dbname,
      args.tbl_names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_objects_by_name_result({success: result});
      output.writeMessageBegin("get_table_objects_by_name", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_table_objects_by_name", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_objects_by_name(args.dbname, args.tbl_names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_table_objects_by_name_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_objects_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_objects_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_req = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_req_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_req.length === 1) {
    Q.fcall(this._handler.get_table_req.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_req_result({success: result});
      output.writeMessageBegin("get_table_req", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_table_req_result(err);
        output.writeMessageBegin("get_table_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_req(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_table_req_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_objects_by_name_req = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_objects_by_name_req_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_objects_by_name_req.length === 1) {
    Q.fcall(this._handler.get_table_objects_by_name_req.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_objects_by_name_req_result({success: result});
      output.writeMessageBegin("get_table_objects_by_name_req", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.UnknownDBException) {
        result = new ThriftHiveMetastore_get_table_objects_by_name_req_result(err);
        output.writeMessageBegin("get_table_objects_by_name_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_objects_by_name_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_objects_by_name_req(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.UnknownDBException) {
        result_obj = new ThriftHiveMetastore_get_table_objects_by_name_req_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_objects_by_name_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_objects_by_name_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_names_by_filter = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_names_by_filter_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_names_by_filter.length === 3) {
    Q.fcall(this._handler.get_table_names_by_filter.bind(this._handler),
      args.dbname,
      args.filter,
      args.max_tables
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_names_by_filter_result({success: result});
      output.writeMessageBegin("get_table_names_by_filter", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.UnknownDBException) {
        result = new ThriftHiveMetastore_get_table_names_by_filter_result(err);
        output.writeMessageBegin("get_table_names_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_names_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.UnknownDBException) {
        result_obj = new ThriftHiveMetastore_get_table_names_by_filter_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_names_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_names_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_table = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_table_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_table.length === 3) {
    Q.fcall(this._handler.alter_table.bind(this._handler),
      args.dbname,
      args.tbl_name,
      args.new_tbl
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_table_result({success: result});
      output.writeMessageBegin("alter_table", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_table_result(err);
        output.writeMessageBegin("alter_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_table_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_table", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_table", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_table_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_table_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_table_with_environment_context.length === 4) {
    Q.fcall(this._handler.alter_table_with_environment_context.bind(this._handler),
      args.dbname,
      args.tbl_name,
      args.new_tbl,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_table_with_environment_context_result({success: result});
      output.writeMessageBegin("alter_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_table_with_environment_context_result(err);
        output.writeMessageBegin("alter_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_table_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_table_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_table_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_table_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_table_with_cascade = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_table_with_cascade_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_table_with_cascade.length === 4) {
    Q.fcall(this._handler.alter_table_with_cascade.bind(this._handler),
      args.dbname,
      args.tbl_name,
      args.new_tbl,
      args.cascade
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_table_with_cascade_result({success: result});
      output.writeMessageBegin("alter_table_with_cascade", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_table_with_cascade_result(err);
        output.writeMessageBegin("alter_table_with_cascade", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_table_with_cascade", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_table_with_cascade_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_table_with_cascade", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_table_with_cascade", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_partition.length === 1) {
    Q.fcall(this._handler.add_partition.bind(this._handler),
      args.new_part
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_partition_result({success: result});
      output.writeMessageBegin("add_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_partition_result(err);
        output.writeMessageBegin("add_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_partition(args.new_part, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_partition_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_partition_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_partition_with_environment_context.length === 2) {
    Q.fcall(this._handler.add_partition_with_environment_context.bind(this._handler),
      args.new_part,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_partition_with_environment_context_result({success: result});
      output.writeMessageBegin("add_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_partition_with_environment_context_result(err);
        output.writeMessageBegin("add_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_partition_with_environment_context(args.new_part, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_partition_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_partitions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_partitions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_partitions.length === 1) {
    Q.fcall(this._handler.add_partitions.bind(this._handler),
      args.new_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_partitions_result({success: result});
      output.writeMessageBegin("add_partitions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_partitions_result(err);
        output.writeMessageBegin("add_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_partitions(args.new_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_partitions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_partitions_pspec = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_partitions_pspec_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_partitions_pspec.length === 1) {
    Q.fcall(this._handler.add_partitions_pspec.bind(this._handler),
      args.new_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_partitions_pspec_result({success: result});
      output.writeMessageBegin("add_partitions_pspec", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_partitions_pspec_result(err);
        output.writeMessageBegin("add_partitions_pspec", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partitions_pspec", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_partitions_pspec(args.new_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_partitions_pspec_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_partitions_pspec", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partitions_pspec", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_append_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_append_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.append_partition.length === 3) {
    Q.fcall(this._handler.append_partition.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_append_partition_result({success: result});
      output.writeMessageBegin("append_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_append_partition_result(err);
        output.writeMessageBegin("append_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.append_partition(args.db_name, args.tbl_name, args.part_vals, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_append_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("append_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_partitions_req = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_partitions_req_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_partitions_req.length === 1) {
    Q.fcall(this._handler.add_partitions_req.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_partitions_req_result({success: result});
      output.writeMessageBegin("add_partitions_req", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_partitions_req_result(err);
        output.writeMessageBegin("add_partitions_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partitions_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_partitions_req(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_partitions_req_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_partitions_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_partitions_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_append_partition_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_append_partition_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.append_partition_with_environment_context.length === 4) {
    Q.fcall(this._handler.append_partition_with_environment_context.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_append_partition_with_environment_context_result({success: result});
      output.writeMessageBegin("append_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_append_partition_with_environment_context_result(err);
        output.writeMessageBegin("append_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_append_partition_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("append_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_append_partition_by_name = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_append_partition_by_name_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.append_partition_by_name.length === 3) {
    Q.fcall(this._handler.append_partition_by_name.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_append_partition_by_name_result({success: result});
      output.writeMessageBegin("append_partition_by_name", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_append_partition_by_name_result(err);
        output.writeMessageBegin("append_partition_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_append_partition_by_name_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("append_partition_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_append_partition_by_name_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_append_partition_by_name_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.append_partition_by_name_with_environment_context.length === 4) {
    Q.fcall(this._handler.append_partition_by_name_with_environment_context.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_append_partition_by_name_with_environment_context_result({success: result});
      output.writeMessageBegin("append_partition_by_name_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_append_partition_by_name_with_environment_context_result(err);
        output.writeMessageBegin("append_partition_by_name_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition_by_name_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_append_partition_by_name_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("append_partition_by_name_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("append_partition_by_name_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_partition.length === 4) {
    Q.fcall(this._handler.drop_partition.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.deleteData
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_partition_result({success: result});
      output.writeMessageBegin("drop_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_partition_result(err);
        output.writeMessageBegin("drop_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_partition_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_partition_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_partition_with_environment_context.length === 5) {
    Q.fcall(this._handler.drop_partition_with_environment_context.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.deleteData,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_partition_with_environment_context_result({success: result});
      output.writeMessageBegin("drop_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_partition_with_environment_context_result(err);
        output.writeMessageBegin("drop_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_partition_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_partition_by_name = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_partition_by_name_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_partition_by_name.length === 4) {
    Q.fcall(this._handler.drop_partition_by_name.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name,
      args.deleteData
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_partition_by_name_result({success: result});
      output.writeMessageBegin("drop_partition_by_name", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_partition_by_name_result(err);
        output.writeMessageBegin("drop_partition_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_partition_by_name_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_partition_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_partition_by_name_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_partition_by_name_with_environment_context.length === 5) {
    Q.fcall(this._handler.drop_partition_by_name_with_environment_context.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name,
      args.deleteData,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result({success: result});
      output.writeMessageBegin("drop_partition_by_name_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result(err);
        output.writeMessageBegin("drop_partition_by_name_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition_by_name_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_partition_by_name_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partition_by_name_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_partitions_req = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_partitions_req_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_partitions_req.length === 1) {
    Q.fcall(this._handler.drop_partitions_req.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_partitions_req_result({success: result});
      output.writeMessageBegin("drop_partitions_req", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_partitions_req_result(err);
        output.writeMessageBegin("drop_partitions_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partitions_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_partitions_req(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_partitions_req_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_partitions_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_partitions_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partition.length === 3) {
    Q.fcall(this._handler.get_partition.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partition_result({success: result});
      output.writeMessageBegin("get_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partition_result(err);
        output.writeMessageBegin("get_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partition(args.db_name, args.tbl_name, args.part_vals, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_exchange_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_exchange_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.exchange_partition.length === 5) {
    Q.fcall(this._handler.exchange_partition.bind(this._handler),
      args.partitionSpecs,
      args.source_db,
      args.source_table_name,
      args.dest_db,
      args.dest_table_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_exchange_partition_result({success: result});
      output.writeMessageBegin("exchange_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_exchange_partition_result(err);
        output.writeMessageBegin("exchange_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("exchange_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_exchange_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("exchange_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("exchange_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_exchange_partitions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_exchange_partitions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.exchange_partitions.length === 5) {
    Q.fcall(this._handler.exchange_partitions.bind(this._handler),
      args.partitionSpecs,
      args.source_db,
      args.source_table_name,
      args.dest_db,
      args.dest_table_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_exchange_partitions_result({success: result});
      output.writeMessageBegin("exchange_partitions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_exchange_partitions_result(err);
        output.writeMessageBegin("exchange_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("exchange_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_exchange_partitions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("exchange_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("exchange_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partition_with_auth = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partition_with_auth_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partition_with_auth.length === 5) {
    Q.fcall(this._handler.get_partition_with_auth.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.user_name,
      args.group_names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partition_with_auth_result({success: result});
      output.writeMessageBegin("get_partition_with_auth", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partition_with_auth_result(err);
        output.writeMessageBegin("get_partition_with_auth", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_with_auth", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partition_with_auth_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partition_with_auth", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_with_auth", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partition_by_name = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partition_by_name_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partition_by_name.length === 3) {
    Q.fcall(this._handler.get_partition_by_name.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partition_by_name_result({success: result});
      output.writeMessageBegin("get_partition_by_name", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partition_by_name_result(err);
        output.writeMessageBegin("get_partition_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partition_by_name_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partition_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions.length === 3) {
    Q.fcall(this._handler.get_partitions.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_result({success: result});
      output.writeMessageBegin("get_partitions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_partitions_result(err);
        output.writeMessageBegin("get_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_partitions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_with_auth = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_with_auth_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_with_auth.length === 5) {
    Q.fcall(this._handler.get_partitions_with_auth.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.max_parts,
      args.user_name,
      args.group_names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_with_auth_result({success: result});
      output.writeMessageBegin("get_partitions_with_auth", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_partitions_with_auth_result(err);
        output.writeMessageBegin("get_partitions_with_auth", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_with_auth", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_partitions_with_auth_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_with_auth", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_with_auth", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_pspec = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_pspec_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_pspec.length === 3) {
    Q.fcall(this._handler.get_partitions_pspec.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_pspec_result({success: result});
      output.writeMessageBegin("get_partitions_pspec", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_partitions_pspec_result(err);
        output.writeMessageBegin("get_partitions_pspec", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_pspec", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_partitions_pspec_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_pspec", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_pspec", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partition_names = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partition_names_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partition_names.length === 3) {
    Q.fcall(this._handler.get_partition_names.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partition_names_result({success: result});
      output.writeMessageBegin("get_partition_names", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_partition_names_result(err);
        output.writeMessageBegin("get_partition_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_partition_names_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partition_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_ps = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_ps_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_ps.length === 4) {
    Q.fcall(this._handler.get_partitions_ps.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_ps_result({success: result});
      output.writeMessageBegin("get_partitions_ps", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partitions_ps_result(err);
        output.writeMessageBegin("get_partitions_ps", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_ps", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partitions_ps_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_ps", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_ps", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_ps_with_auth = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_ps_with_auth_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_ps_with_auth.length === 6) {
    Q.fcall(this._handler.get_partitions_ps_with_auth.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.max_parts,
      args.user_name,
      args.group_names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_ps_with_auth_result({success: result});
      output.writeMessageBegin("get_partitions_ps_with_auth", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_partitions_ps_with_auth_result(err);
        output.writeMessageBegin("get_partitions_ps_with_auth", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_ps_with_auth", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_partitions_ps_with_auth_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_ps_with_auth", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_ps_with_auth", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partition_names_ps = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partition_names_ps_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partition_names_ps.length === 4) {
    Q.fcall(this._handler.get_partition_names_ps.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partition_names_ps_result({success: result});
      output.writeMessageBegin("get_partition_names_ps", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partition_names_ps_result(err);
        output.writeMessageBegin("get_partition_names_ps", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_names_ps", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partition_names_ps_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partition_names_ps", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_names_ps", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_by_filter = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_by_filter_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_by_filter.length === 4) {
    Q.fcall(this._handler.get_partitions_by_filter.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.filter,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_by_filter_result({success: result});
      output.writeMessageBegin("get_partitions_by_filter", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partitions_by_filter_result(err);
        output.writeMessageBegin("get_partitions_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partitions_by_filter_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_part_specs_by_filter = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_part_specs_by_filter_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_part_specs_by_filter.length === 4) {
    Q.fcall(this._handler.get_part_specs_by_filter.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.filter,
      args.max_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_part_specs_by_filter_result({success: result});
      output.writeMessageBegin("get_part_specs_by_filter", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_part_specs_by_filter_result(err);
        output.writeMessageBegin("get_part_specs_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_part_specs_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_part_specs_by_filter_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_part_specs_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_part_specs_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_by_expr = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_by_expr_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_by_expr.length === 1) {
    Q.fcall(this._handler.get_partitions_by_expr.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_by_expr_result({success: result});
      output.writeMessageBegin("get_partitions_by_expr", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partitions_by_expr_result(err);
        output.writeMessageBegin("get_partitions_by_expr", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_by_expr", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_by_expr(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partitions_by_expr_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_by_expr", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_by_expr", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_num_partitions_by_filter = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_num_partitions_by_filter_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_num_partitions_by_filter.length === 3) {
    Q.fcall(this._handler.get_num_partitions_by_filter.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.filter
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_num_partitions_by_filter_result({success: result});
      output.writeMessageBegin("get_num_partitions_by_filter", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_num_partitions_by_filter_result(err);
        output.writeMessageBegin("get_num_partitions_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_num_partitions_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_num_partitions_by_filter_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_num_partitions_by_filter", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_num_partitions_by_filter", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_by_names = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_by_names_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_by_names.length === 3) {
    Q.fcall(this._handler.get_partitions_by_names.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_by_names_result({success: result});
      output.writeMessageBegin("get_partitions_by_names", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_partitions_by_names_result(err);
        output.writeMessageBegin("get_partitions_by_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_by_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_partitions_by_names_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_by_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_by_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_partition.length === 3) {
    Q.fcall(this._handler.alter_partition.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.new_part
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_partition_result({success: result});
      output.writeMessageBegin("alter_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_partition_result(err);
        output.writeMessageBegin("alter_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_partition(args.db_name, args.tbl_name, args.new_part, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_partitions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_partitions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_partitions.length === 3) {
    Q.fcall(this._handler.alter_partitions.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.new_parts
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_partitions_result({success: result});
      output.writeMessageBegin("alter_partitions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_partitions_result(err);
        output.writeMessageBegin("alter_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_partitions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_partitions_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_partitions_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_partitions_with_environment_context.length === 4) {
    Q.fcall(this._handler.alter_partitions_with_environment_context.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.new_parts,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_partitions_with_environment_context_result({success: result});
      output.writeMessageBegin("alter_partitions_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_partitions_with_environment_context_result(err);
        output.writeMessageBegin("alter_partitions_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partitions_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_partitions_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_partitions_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partitions_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_partition_with_environment_context = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_partition_with_environment_context_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_partition_with_environment_context.length === 4) {
    Q.fcall(this._handler.alter_partition_with_environment_context.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.new_part,
      args.environment_context
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_partition_with_environment_context_result({success: result});
      output.writeMessageBegin("alter_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_partition_with_environment_context_result(err);
        output.writeMessageBegin("alter_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_partition_with_environment_context_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_partition_with_environment_context", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_partition_with_environment_context", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_rename_partition = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_rename_partition_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.rename_partition.length === 4) {
    Q.fcall(this._handler.rename_partition.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.new_part
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_rename_partition_result({success: result});
      output.writeMessageBegin("rename_partition", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_rename_partition_result(err);
        output.writeMessageBegin("rename_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("rename_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_rename_partition_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("rename_partition", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("rename_partition", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_partition_name_has_valid_characters = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_partition_name_has_valid_characters_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.partition_name_has_valid_characters.length === 2) {
    Q.fcall(this._handler.partition_name_has_valid_characters.bind(this._handler),
      args.part_vals,
      args.throw_exception
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_partition_name_has_valid_characters_result({success: result});
      output.writeMessageBegin("partition_name_has_valid_characters", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_partition_name_has_valid_characters_result(err);
        output.writeMessageBegin("partition_name_has_valid_characters", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("partition_name_has_valid_characters", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.partition_name_has_valid_characters(args.part_vals, args.throw_exception, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_partition_name_has_valid_characters_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("partition_name_has_valid_characters", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("partition_name_has_valid_characters", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_config_value = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_config_value_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_config_value.length === 2) {
    Q.fcall(this._handler.get_config_value.bind(this._handler),
      args.name,
      args.defaultValue
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_config_value_result({success: result});
      output.writeMessageBegin("get_config_value", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.ConfigValSecurityException) {
        result = new ThriftHiveMetastore_get_config_value_result(err);
        output.writeMessageBegin("get_config_value", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_config_value", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_config_value(args.name, args.defaultValue, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.ConfigValSecurityException) {
        result_obj = new ThriftHiveMetastore_get_config_value_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_config_value", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_config_value", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_partition_name_to_vals = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_partition_name_to_vals_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.partition_name_to_vals.length === 1) {
    Q.fcall(this._handler.partition_name_to_vals.bind(this._handler),
      args.part_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_partition_name_to_vals_result({success: result});
      output.writeMessageBegin("partition_name_to_vals", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_partition_name_to_vals_result(err);
        output.writeMessageBegin("partition_name_to_vals", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("partition_name_to_vals", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.partition_name_to_vals(args.part_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_partition_name_to_vals_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("partition_name_to_vals", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("partition_name_to_vals", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_partition_name_to_spec = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_partition_name_to_spec_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.partition_name_to_spec.length === 1) {
    Q.fcall(this._handler.partition_name_to_spec.bind(this._handler),
      args.part_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_partition_name_to_spec_result({success: result});
      output.writeMessageBegin("partition_name_to_spec", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_partition_name_to_spec_result(err);
        output.writeMessageBegin("partition_name_to_spec", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("partition_name_to_spec", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.partition_name_to_spec(args.part_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_partition_name_to_spec_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("partition_name_to_spec", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("partition_name_to_spec", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_markPartitionForEvent = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_markPartitionForEvent_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.markPartitionForEvent.length === 4) {
    Q.fcall(this._handler.markPartitionForEvent.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.eventType
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_markPartitionForEvent_result({success: result});
      output.writeMessageBegin("markPartitionForEvent", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.UnknownDBException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownPartitionException || err instanceof ttypes.InvalidPartitionException) {
        result = new ThriftHiveMetastore_markPartitionForEvent_result(err);
        output.writeMessageBegin("markPartitionForEvent", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("markPartitionForEvent", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.UnknownDBException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownPartitionException || err instanceof ttypes.InvalidPartitionException) {
        result_obj = new ThriftHiveMetastore_markPartitionForEvent_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("markPartitionForEvent", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("markPartitionForEvent", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_isPartitionMarkedForEvent = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_isPartitionMarkedForEvent_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.isPartitionMarkedForEvent.length === 4) {
    Q.fcall(this._handler.isPartitionMarkedForEvent.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_vals,
      args.eventType
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_isPartitionMarkedForEvent_result({success: result});
      output.writeMessageBegin("isPartitionMarkedForEvent", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.UnknownDBException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownPartitionException || err instanceof ttypes.InvalidPartitionException) {
        result = new ThriftHiveMetastore_isPartitionMarkedForEvent_result(err);
        output.writeMessageBegin("isPartitionMarkedForEvent", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("isPartitionMarkedForEvent", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.UnknownDBException || err instanceof ttypes.UnknownTableException || err instanceof ttypes.UnknownPartitionException || err instanceof ttypes.InvalidPartitionException) {
        result_obj = new ThriftHiveMetastore_isPartitionMarkedForEvent_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("isPartitionMarkedForEvent", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("isPartitionMarkedForEvent", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_index = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_index_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_index.length === 2) {
    Q.fcall(this._handler.add_index.bind(this._handler),
      args.new_index,
      args.index_table
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_index_result({success: result});
      output.writeMessageBegin("add_index", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_index_result(err);
        output.writeMessageBegin("add_index", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_index", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_index(args.new_index, args.index_table, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_index_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_index", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_index", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_index = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_index_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_index.length === 4) {
    Q.fcall(this._handler.alter_index.bind(this._handler),
      args.dbname,
      args.base_tbl_name,
      args.idx_name,
      args.new_idx
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_index_result({success: result});
      output.writeMessageBegin("alter_index", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_index_result(err);
        output.writeMessageBegin("alter_index", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_index", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_index_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_index", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_index", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_index_by_name = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_index_by_name_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_index_by_name.length === 4) {
    Q.fcall(this._handler.drop_index_by_name.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.index_name,
      args.deleteData
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_index_by_name_result({success: result});
      output.writeMessageBegin("drop_index_by_name", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_index_by_name_result(err);
        output.writeMessageBegin("drop_index_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_index_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_index_by_name_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_index_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_index_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_index_by_name = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_index_by_name_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_index_by_name.length === 3) {
    Q.fcall(this._handler.get_index_by_name.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.index_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_index_by_name_result({success: result});
      output.writeMessageBegin("get_index_by_name", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_index_by_name_result(err);
        output.writeMessageBegin("get_index_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_index_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_index_by_name_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_index_by_name", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_index_by_name", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_indexes = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_indexes_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_indexes.length === 3) {
    Q.fcall(this._handler.get_indexes.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.max_indexes
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_indexes_result({success: result});
      output.writeMessageBegin("get_indexes", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_indexes_result(err);
        output.writeMessageBegin("get_indexes", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_indexes", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_indexes_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_indexes", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_indexes", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_index_names = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_index_names_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_index_names.length === 3) {
    Q.fcall(this._handler.get_index_names.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.max_indexes
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_index_names_result({success: result});
      output.writeMessageBegin("get_index_names", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_index_names_result(err);
        output.writeMessageBegin("get_index_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_index_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_index_names_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_index_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_index_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_primary_keys = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_primary_keys_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_primary_keys.length === 1) {
    Q.fcall(this._handler.get_primary_keys.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_primary_keys_result({success: result});
      output.writeMessageBegin("get_primary_keys", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_primary_keys_result(err);
        output.writeMessageBegin("get_primary_keys", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_primary_keys", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_primary_keys(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_primary_keys_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_primary_keys", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_primary_keys", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_foreign_keys = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_foreign_keys_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_foreign_keys.length === 1) {
    Q.fcall(this._handler.get_foreign_keys.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_foreign_keys_result({success: result});
      output.writeMessageBegin("get_foreign_keys", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_foreign_keys_result(err);
        output.writeMessageBegin("get_foreign_keys", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_foreign_keys", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_foreign_keys(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_foreign_keys_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_foreign_keys", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_foreign_keys", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_update_table_column_statistics = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_update_table_column_statistics_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.update_table_column_statistics.length === 1) {
    Q.fcall(this._handler.update_table_column_statistics.bind(this._handler),
      args.stats_obj
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_update_table_column_statistics_result({success: result});
      output.writeMessageBegin("update_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_update_table_column_statistics_result(err);
        output.writeMessageBegin("update_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("update_table_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.update_table_column_statistics(args.stats_obj, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_update_table_column_statistics_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("update_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("update_table_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_update_partition_column_statistics = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_update_partition_column_statistics_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.update_partition_column_statistics.length === 1) {
    Q.fcall(this._handler.update_partition_column_statistics.bind(this._handler),
      args.stats_obj
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_update_partition_column_statistics_result({success: result});
      output.writeMessageBegin("update_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_update_partition_column_statistics_result(err);
        output.writeMessageBegin("update_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("update_partition_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.update_partition_column_statistics(args.stats_obj, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_update_partition_column_statistics_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("update_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("update_partition_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_column_statistics = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_column_statistics_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_column_statistics.length === 3) {
    Q.fcall(this._handler.get_table_column_statistics.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.col_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_column_statistics_result({success: result});
      output.writeMessageBegin("get_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException || err instanceof ttypes.InvalidObjectException) {
        result = new ThriftHiveMetastore_get_table_column_statistics_result(err);
        output.writeMessageBegin("get_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException || err instanceof ttypes.InvalidObjectException) {
        result_obj = new ThriftHiveMetastore_get_table_column_statistics_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partition_column_statistics = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partition_column_statistics_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partition_column_statistics.length === 4) {
    Q.fcall(this._handler.get_partition_column_statistics.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name,
      args.col_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partition_column_statistics_result({success: result});
      output.writeMessageBegin("get_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException || err instanceof ttypes.InvalidObjectException) {
        result = new ThriftHiveMetastore_get_partition_column_statistics_result(err);
        output.writeMessageBegin("get_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException || err instanceof ttypes.InvalidObjectException) {
        result_obj = new ThriftHiveMetastore_get_partition_column_statistics_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partition_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_table_statistics_req = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_table_statistics_req_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_table_statistics_req.length === 1) {
    Q.fcall(this._handler.get_table_statistics_req.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_table_statistics_req_result({success: result});
      output.writeMessageBegin("get_table_statistics_req", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_table_statistics_req_result(err);
        output.writeMessageBegin("get_table_statistics_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_statistics_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_table_statistics_req(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_table_statistics_req_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_table_statistics_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_table_statistics_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_partitions_statistics_req = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_partitions_statistics_req_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_partitions_statistics_req.length === 1) {
    Q.fcall(this._handler.get_partitions_statistics_req.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_partitions_statistics_req_result({success: result});
      output.writeMessageBegin("get_partitions_statistics_req", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_partitions_statistics_req_result(err);
        output.writeMessageBegin("get_partitions_statistics_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_statistics_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_partitions_statistics_req(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_partitions_statistics_req_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_partitions_statistics_req", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_partitions_statistics_req", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_aggr_stats_for = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_aggr_stats_for_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_aggr_stats_for.length === 1) {
    Q.fcall(this._handler.get_aggr_stats_for.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_aggr_stats_for_result({success: result});
      output.writeMessageBegin("get_aggr_stats_for", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_aggr_stats_for_result(err);
        output.writeMessageBegin("get_aggr_stats_for", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_aggr_stats_for", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_aggr_stats_for(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_aggr_stats_for_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_aggr_stats_for", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_aggr_stats_for", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_set_aggr_stats_for = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_set_aggr_stats_for_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.set_aggr_stats_for.length === 1) {
    Q.fcall(this._handler.set_aggr_stats_for.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_set_aggr_stats_for_result({success: result});
      output.writeMessageBegin("set_aggr_stats_for", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_set_aggr_stats_for_result(err);
        output.writeMessageBegin("set_aggr_stats_for", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("set_aggr_stats_for", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.set_aggr_stats_for(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_set_aggr_stats_for_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("set_aggr_stats_for", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("set_aggr_stats_for", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_delete_partition_column_statistics = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_delete_partition_column_statistics_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.delete_partition_column_statistics.length === 4) {
    Q.fcall(this._handler.delete_partition_column_statistics.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.part_name,
      args.col_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_delete_partition_column_statistics_result({success: result});
      output.writeMessageBegin("delete_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_delete_partition_column_statistics_result(err);
        output.writeMessageBegin("delete_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("delete_partition_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_delete_partition_column_statistics_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("delete_partition_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("delete_partition_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_delete_table_column_statistics = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_delete_table_column_statistics_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.delete_table_column_statistics.length === 3) {
    Q.fcall(this._handler.delete_table_column_statistics.bind(this._handler),
      args.db_name,
      args.tbl_name,
      args.col_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_delete_table_column_statistics_result({success: result});
      output.writeMessageBegin("delete_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result = new ThriftHiveMetastore_delete_table_column_statistics_result(err);
        output.writeMessageBegin("delete_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("delete_table_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.InvalidInputException) {
        result_obj = new ThriftHiveMetastore_delete_table_column_statistics_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("delete_table_column_statistics", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("delete_table_column_statistics", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_function = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_function_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_function.length === 1) {
    Q.fcall(this._handler.create_function.bind(this._handler),
      args.func
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_function_result({success: result});
      output.writeMessageBegin("create_function", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_create_function_result(err);
        output.writeMessageBegin("create_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_function(args.func, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.AlreadyExistsException || err instanceof ttypes.InvalidObjectException || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_create_function_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_function = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_function_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_function.length === 2) {
    Q.fcall(this._handler.drop_function.bind(this._handler),
      args.dbName,
      args.funcName
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_function_result({success: result});
      output.writeMessageBegin("drop_function", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_function_result(err);
        output.writeMessageBegin("drop_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_function(args.dbName, args.funcName, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_function_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_alter_function = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_alter_function_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.alter_function.length === 3) {
    Q.fcall(this._handler.alter_function.bind(this._handler),
      args.dbName,
      args.funcName,
      args.newFunc
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_alter_function_result({success: result});
      output.writeMessageBegin("alter_function", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_alter_function_result(err);
        output.writeMessageBegin("alter_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.alter_function(args.dbName, args.funcName, args.newFunc, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.InvalidOperationException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_alter_function_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("alter_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("alter_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_functions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_functions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_functions.length === 2) {
    Q.fcall(this._handler.get_functions.bind(this._handler),
      args.dbName,
      args.pattern
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_functions_result({success: result});
      output.writeMessageBegin("get_functions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_functions_result(err);
        output.writeMessageBegin("get_functions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_functions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_functions(args.dbName, args.pattern, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_functions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_functions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_functions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_function = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_function_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_function.length === 2) {
    Q.fcall(this._handler.get_function.bind(this._handler),
      args.dbName,
      args.funcName
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_function_result({success: result});
      output.writeMessageBegin("get_function", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result = new ThriftHiveMetastore_get_function_result(err);
        output.writeMessageBegin("get_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_function(args.dbName, args.funcName, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException || err instanceof ttypes.NoSuchObjectException) {
        result_obj = new ThriftHiveMetastore_get_function_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_function", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_function", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_all_functions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_all_functions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_all_functions.length === 0) {
    Q.fcall(this._handler.get_all_functions.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_all_functions_result({success: result});
      output.writeMessageBegin("get_all_functions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_all_functions_result(err);
        output.writeMessageBegin("get_all_functions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_functions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_all_functions(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_all_functions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_all_functions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_functions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_create_role = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_create_role_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.create_role.length === 1) {
    Q.fcall(this._handler.create_role.bind(this._handler),
      args.role
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_create_role_result({success: result});
      output.writeMessageBegin("create_role", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_create_role_result(err);
        output.writeMessageBegin("create_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.create_role(args.role, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_create_role_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("create_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("create_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_drop_role = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_drop_role_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.drop_role.length === 1) {
    Q.fcall(this._handler.drop_role.bind(this._handler),
      args.role_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_drop_role_result({success: result});
      output.writeMessageBegin("drop_role", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_drop_role_result(err);
        output.writeMessageBegin("drop_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.drop_role(args.role_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_drop_role_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("drop_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("drop_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_role_names = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_role_names_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_role_names.length === 0) {
    Q.fcall(this._handler.get_role_names.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_role_names_result({success: result});
      output.writeMessageBegin("get_role_names", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_role_names_result(err);
        output.writeMessageBegin("get_role_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_role_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_role_names(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_role_names_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_role_names", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_role_names", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_grant_role = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_grant_role_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.grant_role.length === 6) {
    Q.fcall(this._handler.grant_role.bind(this._handler),
      args.role_name,
      args.principal_name,
      args.principal_type,
      args.grantor,
      args.grantorType,
      args.grant_option
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_grant_role_result({success: result});
      output.writeMessageBegin("grant_role", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_grant_role_result(err);
        output.writeMessageBegin("grant_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_grant_role_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("grant_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_revoke_role = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_revoke_role_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.revoke_role.length === 3) {
    Q.fcall(this._handler.revoke_role.bind(this._handler),
      args.role_name,
      args.principal_name,
      args.principal_type
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_revoke_role_result({success: result});
      output.writeMessageBegin("revoke_role", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_revoke_role_result(err);
        output.writeMessageBegin("revoke_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("revoke_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.revoke_role(args.role_name, args.principal_name, args.principal_type, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_revoke_role_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("revoke_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("revoke_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_list_roles = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_list_roles_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.list_roles.length === 2) {
    Q.fcall(this._handler.list_roles.bind(this._handler),
      args.principal_name,
      args.principal_type
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_list_roles_result({success: result});
      output.writeMessageBegin("list_roles", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_list_roles_result(err);
        output.writeMessageBegin("list_roles", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("list_roles", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.list_roles(args.principal_name, args.principal_type, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_list_roles_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("list_roles", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("list_roles", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_grant_revoke_role = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_grant_revoke_role_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.grant_revoke_role.length === 1) {
    Q.fcall(this._handler.grant_revoke_role.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_grant_revoke_role_result({success: result});
      output.writeMessageBegin("grant_revoke_role", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_grant_revoke_role_result(err);
        output.writeMessageBegin("grant_revoke_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_revoke_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.grant_revoke_role(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_grant_revoke_role_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("grant_revoke_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_revoke_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_principals_in_role = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_principals_in_role_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_principals_in_role.length === 1) {
    Q.fcall(this._handler.get_principals_in_role.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_principals_in_role_result({success: result});
      output.writeMessageBegin("get_principals_in_role", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_principals_in_role_result(err);
        output.writeMessageBegin("get_principals_in_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_principals_in_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_principals_in_role(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_principals_in_role_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_principals_in_role", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_principals_in_role", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_role_grants_for_principal = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_role_grants_for_principal_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_role_grants_for_principal.length === 1) {
    Q.fcall(this._handler.get_role_grants_for_principal.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_role_grants_for_principal_result({success: result});
      output.writeMessageBegin("get_role_grants_for_principal", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_role_grants_for_principal_result(err);
        output.writeMessageBegin("get_role_grants_for_principal", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_role_grants_for_principal", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_role_grants_for_principal(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_role_grants_for_principal_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_role_grants_for_principal", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_role_grants_for_principal", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_privilege_set = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_privilege_set_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_privilege_set.length === 3) {
    Q.fcall(this._handler.get_privilege_set.bind(this._handler),
      args.hiveObject,
      args.user_name,
      args.group_names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_privilege_set_result({success: result});
      output.writeMessageBegin("get_privilege_set", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_privilege_set_result(err);
        output.writeMessageBegin("get_privilege_set", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_privilege_set", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_privilege_set_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_privilege_set", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_privilege_set", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_list_privileges = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_list_privileges_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.list_privileges.length === 3) {
    Q.fcall(this._handler.list_privileges.bind(this._handler),
      args.principal_name,
      args.principal_type,
      args.hiveObject
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_list_privileges_result({success: result});
      output.writeMessageBegin("list_privileges", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_list_privileges_result(err);
        output.writeMessageBegin("list_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("list_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_list_privileges_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("list_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("list_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_grant_privileges = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_grant_privileges_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.grant_privileges.length === 1) {
    Q.fcall(this._handler.grant_privileges.bind(this._handler),
      args.privileges
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_grant_privileges_result({success: result});
      output.writeMessageBegin("grant_privileges", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_grant_privileges_result(err);
        output.writeMessageBegin("grant_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.grant_privileges(args.privileges, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_grant_privileges_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("grant_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_revoke_privileges = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_revoke_privileges_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.revoke_privileges.length === 1) {
    Q.fcall(this._handler.revoke_privileges.bind(this._handler),
      args.privileges
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_revoke_privileges_result({success: result});
      output.writeMessageBegin("revoke_privileges", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_revoke_privileges_result(err);
        output.writeMessageBegin("revoke_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("revoke_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.revoke_privileges(args.privileges, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_revoke_privileges_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("revoke_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("revoke_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_grant_revoke_privileges = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_grant_revoke_privileges_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.grant_revoke_privileges.length === 1) {
    Q.fcall(this._handler.grant_revoke_privileges.bind(this._handler),
      args.request
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_grant_revoke_privileges_result({success: result});
      output.writeMessageBegin("grant_revoke_privileges", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_grant_revoke_privileges_result(err);
        output.writeMessageBegin("grant_revoke_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_revoke_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.grant_revoke_privileges(args.request, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_grant_revoke_privileges_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("grant_revoke_privileges", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("grant_revoke_privileges", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_set_ugi = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_set_ugi_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.set_ugi.length === 2) {
    Q.fcall(this._handler.set_ugi.bind(this._handler),
      args.user_name,
      args.group_names
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_set_ugi_result({success: result});
      output.writeMessageBegin("set_ugi", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_set_ugi_result(err);
        output.writeMessageBegin("set_ugi", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("set_ugi", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.set_ugi(args.user_name, args.group_names, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_set_ugi_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("set_ugi", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("set_ugi", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_delegation_token = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_delegation_token_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_delegation_token.length === 2) {
    Q.fcall(this._handler.get_delegation_token.bind(this._handler),
      args.token_owner,
      args.renewer_kerberos_principal_name
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_delegation_token_result({success: result});
      output.writeMessageBegin("get_delegation_token", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_get_delegation_token_result(err);
        output.writeMessageBegin("get_delegation_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_delegation_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_get_delegation_token_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_delegation_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_delegation_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_renew_delegation_token = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_renew_delegation_token_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.renew_delegation_token.length === 1) {
    Q.fcall(this._handler.renew_delegation_token.bind(this._handler),
      args.token_str_form
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_renew_delegation_token_result({success: result});
      output.writeMessageBegin("renew_delegation_token", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_renew_delegation_token_result(err);
        output.writeMessageBegin("renew_delegation_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("renew_delegation_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.renew_delegation_token(args.token_str_form, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_renew_delegation_token_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("renew_delegation_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("renew_delegation_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_cancel_delegation_token = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_cancel_delegation_token_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.cancel_delegation_token.length === 1) {
    Q.fcall(this._handler.cancel_delegation_token.bind(this._handler),
      args.token_str_form
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_cancel_delegation_token_result({success: result});
      output.writeMessageBegin("cancel_delegation_token", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_cancel_delegation_token_result(err);
        output.writeMessageBegin("cancel_delegation_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("cancel_delegation_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.cancel_delegation_token(args.token_str_form, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_cancel_delegation_token_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("cancel_delegation_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("cancel_delegation_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_token = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_token_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_token.length === 2) {
    Q.fcall(this._handler.add_token.bind(this._handler),
      args.token_identifier,
      args.delegation_token
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_token_result({success: result});
      output.writeMessageBegin("add_token", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("add_token", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_token(args.token_identifier, args.delegation_token, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_add_token_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_remove_token = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_remove_token_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.remove_token.length === 1) {
    Q.fcall(this._handler.remove_token.bind(this._handler),
      args.token_identifier
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_remove_token_result({success: result});
      output.writeMessageBegin("remove_token", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("remove_token", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.remove_token(args.token_identifier, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_remove_token_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("remove_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("remove_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_token = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_token_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_token.length === 1) {
    Q.fcall(this._handler.get_token.bind(this._handler),
      args.token_identifier
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_token_result({success: result});
      output.writeMessageBegin("get_token", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_token", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_token(args.token_identifier, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_token_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_token", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_token", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_all_token_identifiers = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_all_token_identifiers_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_all_token_identifiers.length === 0) {
    Q.fcall(this._handler.get_all_token_identifiers.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_all_token_identifiers_result({success: result});
      output.writeMessageBegin("get_all_token_identifiers", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_all_token_identifiers", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_all_token_identifiers(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_all_token_identifiers_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_all_token_identifiers", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_all_token_identifiers", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_master_key = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_master_key_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_master_key.length === 1) {
    Q.fcall(this._handler.add_master_key.bind(this._handler),
      args.key
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_master_key_result({success: result});
      output.writeMessageBegin("add_master_key", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_add_master_key_result(err);
        output.writeMessageBegin("add_master_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_master_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_master_key(args.key, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_add_master_key_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_master_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_master_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_update_master_key = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_update_master_key_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.update_master_key.length === 2) {
    Q.fcall(this._handler.update_master_key.bind(this._handler),
      args.seq_number,
      args.key
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_update_master_key_result({success: result});
      output.writeMessageBegin("update_master_key", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result = new ThriftHiveMetastore_update_master_key_result(err);
        output.writeMessageBegin("update_master_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("update_master_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.update_master_key(args.seq_number, args.key, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchObjectException || err instanceof ttypes.MetaException) {
        result_obj = new ThriftHiveMetastore_update_master_key_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("update_master_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("update_master_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_remove_master_key = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_remove_master_key_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.remove_master_key.length === 1) {
    Q.fcall(this._handler.remove_master_key.bind(this._handler),
      args.key_seq
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_remove_master_key_result({success: result});
      output.writeMessageBegin("remove_master_key", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("remove_master_key", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.remove_master_key(args.key_seq, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_remove_master_key_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("remove_master_key", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("remove_master_key", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_master_keys = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_master_keys_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_master_keys.length === 0) {
    Q.fcall(this._handler.get_master_keys.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_master_keys_result({success: result});
      output.writeMessageBegin("get_master_keys", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_master_keys", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_master_keys(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_master_keys_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_master_keys", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_master_keys", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_open_txns = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_open_txns_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_open_txns.length === 0) {
    Q.fcall(this._handler.get_open_txns.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_open_txns_result({success: result});
      output.writeMessageBegin("get_open_txns", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_open_txns", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_open_txns(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_open_txns_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_open_txns", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_open_txns", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_open_txns_info = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_open_txns_info_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_open_txns_info.length === 0) {
    Q.fcall(this._handler.get_open_txns_info.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_open_txns_info_result({success: result});
      output.writeMessageBegin("get_open_txns_info", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_open_txns_info", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_open_txns_info(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_open_txns_info_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_open_txns_info", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_open_txns_info", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_open_txns = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_open_txns_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.open_txns.length === 1) {
    Q.fcall(this._handler.open_txns.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_open_txns_result({success: result});
      output.writeMessageBegin("open_txns", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("open_txns", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.open_txns(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_open_txns_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("open_txns", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("open_txns", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_abort_txn = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_abort_txn_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.abort_txn.length === 1) {
    Q.fcall(this._handler.abort_txn.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_abort_txn_result({success: result});
      output.writeMessageBegin("abort_txn", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchTxnException) {
        result = new ThriftHiveMetastore_abort_txn_result(err);
        output.writeMessageBegin("abort_txn", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("abort_txn", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.abort_txn(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchTxnException) {
        result_obj = new ThriftHiveMetastore_abort_txn_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("abort_txn", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("abort_txn", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_abort_txns = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_abort_txns_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.abort_txns.length === 1) {
    Q.fcall(this._handler.abort_txns.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_abort_txns_result({success: result});
      output.writeMessageBegin("abort_txns", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchTxnException) {
        result = new ThriftHiveMetastore_abort_txns_result(err);
        output.writeMessageBegin("abort_txns", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("abort_txns", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.abort_txns(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchTxnException) {
        result_obj = new ThriftHiveMetastore_abort_txns_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("abort_txns", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("abort_txns", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_commit_txn = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_commit_txn_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.commit_txn.length === 1) {
    Q.fcall(this._handler.commit_txn.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_commit_txn_result({success: result});
      output.writeMessageBegin("commit_txn", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result = new ThriftHiveMetastore_commit_txn_result(err);
        output.writeMessageBegin("commit_txn", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("commit_txn", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.commit_txn(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result_obj = new ThriftHiveMetastore_commit_txn_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("commit_txn", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("commit_txn", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_lock = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_lock_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.lock.length === 1) {
    Q.fcall(this._handler.lock.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_lock_result({success: result});
      output.writeMessageBegin("lock", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result = new ThriftHiveMetastore_lock_result(err);
        output.writeMessageBegin("lock", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("lock", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.lock(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result_obj = new ThriftHiveMetastore_lock_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("lock", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("lock", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_check_lock = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_check_lock_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.check_lock.length === 1) {
    Q.fcall(this._handler.check_lock.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_check_lock_result({success: result});
      output.writeMessageBegin("check_lock", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException || err instanceof ttypes.NoSuchLockException) {
        result = new ThriftHiveMetastore_check_lock_result(err);
        output.writeMessageBegin("check_lock", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("check_lock", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.check_lock(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException || err instanceof ttypes.NoSuchLockException) {
        result_obj = new ThriftHiveMetastore_check_lock_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("check_lock", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("check_lock", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_unlock = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_unlock_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.unlock.length === 1) {
    Q.fcall(this._handler.unlock.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_unlock_result({success: result});
      output.writeMessageBegin("unlock", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchLockException || err instanceof ttypes.TxnOpenException) {
        result = new ThriftHiveMetastore_unlock_result(err);
        output.writeMessageBegin("unlock", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("unlock", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.unlock(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchLockException || err instanceof ttypes.TxnOpenException) {
        result_obj = new ThriftHiveMetastore_unlock_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("unlock", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("unlock", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_show_locks = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_show_locks_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.show_locks.length === 1) {
    Q.fcall(this._handler.show_locks.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_show_locks_result({success: result});
      output.writeMessageBegin("show_locks", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("show_locks", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.show_locks(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_show_locks_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("show_locks", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("show_locks", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_heartbeat = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_heartbeat_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.heartbeat.length === 1) {
    Q.fcall(this._handler.heartbeat.bind(this._handler),
      args.ids
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_heartbeat_result({success: result});
      output.writeMessageBegin("heartbeat", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchLockException || err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result = new ThriftHiveMetastore_heartbeat_result(err);
        output.writeMessageBegin("heartbeat", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("heartbeat", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.heartbeat(args.ids, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchLockException || err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result_obj = new ThriftHiveMetastore_heartbeat_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("heartbeat", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("heartbeat", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_heartbeat_txn_range = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_heartbeat_txn_range_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.heartbeat_txn_range.length === 1) {
    Q.fcall(this._handler.heartbeat_txn_range.bind(this._handler),
      args.txns
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_heartbeat_txn_range_result({success: result});
      output.writeMessageBegin("heartbeat_txn_range", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("heartbeat_txn_range", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.heartbeat_txn_range(args.txns, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_heartbeat_txn_range_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("heartbeat_txn_range", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("heartbeat_txn_range", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_compact = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_compact_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.compact.length === 1) {
    Q.fcall(this._handler.compact.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_compact_result({success: result});
      output.writeMessageBegin("compact", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("compact", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.compact(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_compact_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("compact", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("compact", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_compact2 = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_compact2_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.compact2.length === 1) {
    Q.fcall(this._handler.compact2.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_compact2_result({success: result});
      output.writeMessageBegin("compact2", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("compact2", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.compact2(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_compact2_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("compact2", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("compact2", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_show_compact = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_show_compact_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.show_compact.length === 1) {
    Q.fcall(this._handler.show_compact.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_show_compact_result({success: result});
      output.writeMessageBegin("show_compact", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("show_compact", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.show_compact(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_show_compact_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("show_compact", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("show_compact", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_add_dynamic_partitions = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_add_dynamic_partitions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.add_dynamic_partitions.length === 1) {
    Q.fcall(this._handler.add_dynamic_partitions.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_add_dynamic_partitions_result({success: result});
      output.writeMessageBegin("add_dynamic_partitions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      if (err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result = new ThriftHiveMetastore_add_dynamic_partitions_result(err);
        output.writeMessageBegin("add_dynamic_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_dynamic_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.add_dynamic_partitions(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined') || err instanceof ttypes.NoSuchTxnException || err instanceof ttypes.TxnAbortedException) {
        result_obj = new ThriftHiveMetastore_add_dynamic_partitions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("add_dynamic_partitions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("add_dynamic_partitions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_next_notification = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_next_notification_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_next_notification.length === 1) {
    Q.fcall(this._handler.get_next_notification.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_next_notification_result({success: result});
      output.writeMessageBegin("get_next_notification", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_next_notification", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_next_notification(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_next_notification_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_next_notification", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_next_notification", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_current_notificationEventId = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_current_notificationEventId_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_current_notificationEventId.length === 0) {
    Q.fcall(this._handler.get_current_notificationEventId.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_current_notificationEventId_result({success: result});
      output.writeMessageBegin("get_current_notificationEventId", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_current_notificationEventId", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_current_notificationEventId(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_current_notificationEventId_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_current_notificationEventId", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_current_notificationEventId", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_fire_listener_event = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_fire_listener_event_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.fire_listener_event.length === 1) {
    Q.fcall(this._handler.fire_listener_event.bind(this._handler),
      args.rqst
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_fire_listener_event_result({success: result});
      output.writeMessageBegin("fire_listener_event", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("fire_listener_event", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.fire_listener_event(args.rqst, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_fire_listener_event_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("fire_listener_event", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("fire_listener_event", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_flushCache = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_flushCache_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.flushCache.length === 0) {
    Q.fcall(this._handler.flushCache.bind(this._handler)
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_flushCache_result({success: result});
      output.writeMessageBegin("flushCache", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("flushCache", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.flushCache(function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_flushCache_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("flushCache", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("flushCache", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_file_metadata_by_expr = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_file_metadata_by_expr_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_file_metadata_by_expr.length === 1) {
    Q.fcall(this._handler.get_file_metadata_by_expr.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_file_metadata_by_expr_result({success: result});
      output.writeMessageBegin("get_file_metadata_by_expr", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_file_metadata_by_expr", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_file_metadata_by_expr(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_file_metadata_by_expr_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_file_metadata_by_expr", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_file_metadata_by_expr", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_get_file_metadata = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_get_file_metadata_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.get_file_metadata.length === 1) {
    Q.fcall(this._handler.get_file_metadata.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_get_file_metadata_result({success: result});
      output.writeMessageBegin("get_file_metadata", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("get_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.get_file_metadata(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_get_file_metadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("get_file_metadata", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("get_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_put_file_metadata = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_put_file_metadata_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.put_file_metadata.length === 1) {
    Q.fcall(this._handler.put_file_metadata.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_put_file_metadata_result({success: result});
      output.writeMessageBegin("put_file_metadata", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("put_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.put_file_metadata(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_put_file_metadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("put_file_metadata", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("put_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_clear_file_metadata = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_clear_file_metadata_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.clear_file_metadata.length === 1) {
    Q.fcall(this._handler.clear_file_metadata.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_clear_file_metadata_result({success: result});
      output.writeMessageBegin("clear_file_metadata", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("clear_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.clear_file_metadata(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_clear_file_metadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("clear_file_metadata", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("clear_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
ThriftHiveMetastoreProcessor.prototype.process_cache_file_metadata = function(seqid, input, output) {
  var args = new ThriftHiveMetastore_cache_file_metadata_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.cache_file_metadata.length === 1) {
    Q.fcall(this._handler.cache_file_metadata.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new ThriftHiveMetastore_cache_file_metadata_result({success: result});
      output.writeMessageBegin("cache_file_metadata", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("cache_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.cache_file_metadata(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new ThriftHiveMetastore_cache_file_metadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("cache_file_metadata", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("cache_file_metadata", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};