Index: metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java =================================================================== --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (revision 1403799) +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java (working copy) @@ -1528,12 +1528,12 @@ assertEquals(client.getConfigValue("hive.key4", val), "0"); assertEquals(client.getConfigValue("hive.key5", val), val); assertEquals(client.getConfigValue(null, val), val); - } catch (TException e) { - e.printStackTrace(); - assert (false); } catch (ConfigValSecurityException e) { e.printStackTrace(); assert (false); + } catch (TException e) { + e.printStackTrace(); + assert (false); } } @@ -1541,12 +1541,12 @@ try { // Attempting to get the password should throw an exception client.getConfigValue("javax.jdo.option.ConnectionPassword", "password"); + } catch (ConfigValSecurityException e) { + threwException = true; } catch (TException e) { e.printStackTrace(); assert (false); - } catch (ConfigValSecurityException e) { - threwException = true; - } + } assert (threwException); } Index: metastore/src/gen/thrift/gen-py/__init__.py =================================================================== Index: metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (revision 1403799) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import fb303.ttypes @@ -2303,7 +2305,7 @@ def __ne__(self, other): return not (self == other) -class MetaException(Exception): +class MetaException(TException): """ Attributes: - message @@ -2366,7 +2368,7 @@ def __ne__(self, other): return not (self == other) -class UnknownTableException(Exception): +class UnknownTableException(TException): """ Attributes: - message @@ -2429,7 +2431,7 @@ def __ne__(self, other): return not (self == other) -class UnknownDBException(Exception): +class UnknownDBException(TException): """ Attributes: - message @@ -2492,7 +2494,7 @@ def __ne__(self, other): return not (self == other) -class AlreadyExistsException(Exception): +class AlreadyExistsException(TException): """ Attributes: - message @@ -2555,7 +2557,7 @@ def __ne__(self, other): return not (self == other) -class InvalidPartitionException(Exception): +class InvalidPartitionException(TException): """ Attributes: - message @@ -2618,7 +2620,7 @@ def __ne__(self, other): return not (self == other) -class UnknownPartitionException(Exception): +class UnknownPartitionException(TException): """ Attributes: - message @@ -2681,7 +2683,7 @@ def __ne__(self, other): return not (self == other) -class InvalidObjectException(Exception): +class InvalidObjectException(TException): """ Attributes: - message @@ -2744,7 +2746,7 @@ def __ne__(self, other): return not (self == other) -class NoSuchObjectException(Exception): +class NoSuchObjectException(TException): """ Attributes: - message @@ -2807,7 +2809,7 @@ def __ne__(self, other): return not (self == other) -class IndexAlreadyExistsException(Exception): +class IndexAlreadyExistsException(TException): """ Attributes: - message @@ -2870,7 +2872,7 @@ def __ne__(self, other): return not (self == other) -class InvalidOperationException(Exception): +class InvalidOperationException(TException): """ Attributes: - message @@ -2933,7 +2935,7 @@ def __ne__(self, other): return not (self == other) -class ConfigValSecurityException(Exception): +class ConfigValSecurityException(TException): """ Attributes: - message Index: metastore/src/gen/thrift/gen-py/hive_metastore/constants.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/constants.py (revision 1403799) +++ metastore/src/gen/thrift/gen-py/hive_metastore/constants.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * DDL_TIME = "transient_lastDdlTime" Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (revision 1403799) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import fb303.FacebookService from ttypes import * from thrift.Thrift import TProcessor @@ -3222,11 +3224,11 @@ result = create_database_result() try: self._handler.create_database(args.database) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3240,9 +3242,9 @@ result = get_database_result() try: result.success = self._handler.get_database(args.name) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3256,11 +3258,11 @@ result = drop_database_result() try: self._handler.drop_database(args.name, args.deleteData, args.cascade) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except InvalidOperationException, o2: + except InvalidOperationException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3274,7 +3276,7 @@ result = get_databases_result() try: result.success = self._handler.get_databases(args.pattern) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) result.write(oprot) @@ -3288,7 +3290,7 @@ result = get_all_databases_result() try: result.success = self._handler.get_all_databases() - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) result.write(oprot) @@ -3302,9 +3304,9 @@ result = alter_database_result() try: self._handler.alter_database(args.dbname, args.db) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_database", TMessageType.REPLY, seqid) result.write(oprot) @@ -3318,9 +3320,9 @@ result = get_type_result() try: result.success = self._handler.get_type(args.name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) result.write(oprot) @@ -3334,11 +3336,11 @@ result = create_type_result() try: result.success = self._handler.create_type(args.type) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) result.write(oprot) @@ -3352,9 +3354,9 @@ result = drop_type_result() try: result.success = self._handler.drop_type(args.type) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) result.write(oprot) @@ -3368,7 +3370,7 @@ result = get_type_all_result() try: result.success = self._handler.get_type_all(args.name) - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) result.write(oprot) @@ -3382,11 +3384,11 @@ result = get_fields_result() try: result.success = self._handler.get_fields(args.db_name, args.table_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except UnknownTableException, o2: + except UnknownTableException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) result.write(oprot) @@ -3400,11 +3402,11 @@ result = get_schema_result() try: result.success = self._handler.get_schema(args.db_name, args.table_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except UnknownTableException, o2: + except UnknownTableException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) result.write(oprot) @@ -3418,13 +3420,13 @@ result = create_table_result() try: self._handler.create_table(args.tbl) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 - except NoSuchObjectException, o4: + except NoSuchObjectException as o4: result.o4 = o4 oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3438,13 +3440,13 @@ result = create_table_with_environment_context_result() try: self._handler.create_table_with_environment_context(args.tbl, args.environment_context) - except AlreadyExistsException, o1: + except AlreadyExistsException as o1: result.o1 = o1 - except InvalidObjectException, o2: + except InvalidObjectException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 - except NoSuchObjectException, o4: + except NoSuchObjectException as o4: result.o4 = o4 oprot.writeMessageBegin("create_table_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3458,9 +3460,9 @@ result = drop_table_result() try: self._handler.drop_table(args.dbname, args.name, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3474,7 +3476,7 @@ result = get_tables_result() try: result.success = self._handler.get_tables(args.db_name, args.pattern) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) result.write(oprot) @@ -3488,7 +3490,7 @@ result = get_all_tables_result() try: result.success = self._handler.get_all_tables(args.db_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) result.write(oprot) @@ -3502,9 +3504,9 @@ result = get_table_result() try: result.success = self._handler.get_table(args.dbname, args.tbl_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3518,11 +3520,11 @@ result = get_table_objects_by_name_result() try: result.success = self._handler.get_table_objects_by_name(args.dbname, args.tbl_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except InvalidOperationException, o2: + except InvalidOperationException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_table_objects_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -3536,11 +3538,11 @@ result = get_table_names_by_filter_result() try: result.success = self._handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except InvalidOperationException, o2: + except InvalidOperationException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 oprot.writeMessageBegin("get_table_names_by_filter", TMessageType.REPLY, seqid) result.write(oprot) @@ -3554,9 +3556,9 @@ result = alter_table_result() try: self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) result.write(oprot) @@ -3570,9 +3572,9 @@ result = alter_table_with_environment_context_result() try: self._handler.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_table_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3586,11 +3588,11 @@ result = add_partition_result() try: result.success = self._handler.add_partition(args.new_part) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3604,11 +3606,11 @@ result = add_partition_with_environment_context_result() try: result.success = self._handler.add_partition_with_environment_context(args.new_part, args.environment_context) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_partition_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3622,11 +3624,11 @@ result = add_partitions_result() try: result.success = self._handler.add_partitions(args.new_parts) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_partitions", TMessageType.REPLY, seqid) result.write(oprot) @@ -3640,11 +3642,11 @@ result = append_partition_result() try: result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3658,11 +3660,11 @@ result = append_partition_by_name_result() try: result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -3676,9 +3678,9 @@ result = drop_partition_result() try: result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3692,9 +3694,9 @@ result = drop_partition_by_name_result() try: result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -3708,9 +3710,9 @@ result = get_partition_result() try: result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3724,9 +3726,9 @@ result = get_partition_with_auth_result() try: result.success = self._handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_with_auth", TMessageType.REPLY, seqid) result.write(oprot) @@ -3740,9 +3742,9 @@ result = get_partition_by_name_result() try: result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -3756,9 +3758,9 @@ result = get_partitions_result() try: result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) result.write(oprot) @@ -3772,9 +3774,9 @@ result = get_partitions_with_auth_result() try: result.success = self._handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_with_auth", TMessageType.REPLY, seqid) result.write(oprot) @@ -3788,7 +3790,7 @@ result = get_partition_names_result() try: result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -3802,9 +3804,9 @@ result = get_partitions_ps_result() try: result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) result.write(oprot) @@ -3818,9 +3820,9 @@ result = get_partitions_ps_with_auth_result() try: result.success = self._handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_ps_with_auth", TMessageType.REPLY, seqid) result.write(oprot) @@ -3834,9 +3836,9 @@ result = get_partition_names_ps_result() try: result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) result.write(oprot) @@ -3850,9 +3852,9 @@ result = get_partitions_by_filter_result() try: result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) result.write(oprot) @@ -3866,9 +3868,9 @@ result = get_partitions_by_names_result() try: result.success = self._handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_partitions_by_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -3882,9 +3884,9 @@ result = alter_partition_result() try: self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3898,9 +3900,9 @@ result = alter_partitions_result() try: self._handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_partitions", TMessageType.REPLY, seqid) result.write(oprot) @@ -3914,9 +3916,9 @@ result = alter_partition_with_environment_context_result() try: self._handler.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_partition_with_environment_context", TMessageType.REPLY, seqid) result.write(oprot) @@ -3930,9 +3932,9 @@ result = rename_partition_result() try: self._handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("rename_partition", TMessageType.REPLY, seqid) result.write(oprot) @@ -3946,7 +3948,7 @@ result = get_config_value_result() try: result.success = self._handler.get_config_value(args.name, args.defaultValue) - except ConfigValSecurityException, o1: + except ConfigValSecurityException as o1: result.o1 = o1 oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) result.write(oprot) @@ -3960,7 +3962,7 @@ result = partition_name_to_vals_result() try: result.success = self._handler.partition_name_to_vals(args.part_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) result.write(oprot) @@ -3974,7 +3976,7 @@ result = partition_name_to_spec_result() try: result.success = self._handler.partition_name_to_spec(args.part_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) result.write(oprot) @@ -3988,17 +3990,17 @@ result = markPartitionForEvent_result() try: self._handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 - except UnknownTableException, o4: + except UnknownTableException as o4: result.o4 = o4 - except UnknownPartitionException, o5: + except UnknownPartitionException as o5: result.o5 = o5 - except InvalidPartitionException, o6: + except InvalidPartitionException as o6: result.o6 = o6 oprot.writeMessageBegin("markPartitionForEvent", TMessageType.REPLY, seqid) result.write(oprot) @@ -4012,17 +4014,17 @@ result = isPartitionMarkedForEvent_result() try: result.success = self._handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 - except UnknownDBException, o3: + except UnknownDBException as o3: result.o3 = o3 - except UnknownTableException, o4: + except UnknownTableException as o4: result.o4 = o4 - except UnknownPartitionException, o5: + except UnknownPartitionException as o5: result.o5 = o5 - except InvalidPartitionException, o6: + except InvalidPartitionException as o6: result.o6 = o6 oprot.writeMessageBegin("isPartitionMarkedForEvent", TMessageType.REPLY, seqid) result.write(oprot) @@ -4036,11 +4038,11 @@ result = add_index_result() try: result.success = self._handler.add_index(args.new_index, args.index_table) - except InvalidObjectException, o1: + except InvalidObjectException as o1: result.o1 = o1 - except AlreadyExistsException, o2: + except AlreadyExistsException as o2: result.o2 = o2 - except MetaException, o3: + except MetaException as o3: result.o3 = o3 oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) result.write(oprot) @@ -4054,9 +4056,9 @@ result = alter_index_result() try: self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - except InvalidOperationException, o1: + except InvalidOperationException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) result.write(oprot) @@ -4070,9 +4072,9 @@ result = drop_index_by_name_result() try: result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -4086,9 +4088,9 @@ result = get_index_by_name_result() try: result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 - except NoSuchObjectException, o2: + except NoSuchObjectException as o2: result.o2 = o2 oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) result.write(oprot) @@ -4102,9 +4104,9 @@ result = get_indexes_result() try: result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - except NoSuchObjectException, o1: + except NoSuchObjectException as o1: result.o1 = o1 - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) result.write(oprot) @@ -4118,7 +4120,7 @@ result = get_index_names_result() try: result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - except MetaException, o2: + except MetaException as o2: result.o2 = o2 oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -4132,7 +4134,7 @@ result = create_role_result() try: result.success = self._handler.create_role(args.role) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4146,7 +4148,7 @@ result = drop_role_result() try: result.success = self._handler.drop_role(args.role_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4160,7 +4162,7 @@ result = get_role_names_result() try: result.success = self._handler.get_role_names() - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_role_names", TMessageType.REPLY, seqid) result.write(oprot) @@ -4174,7 +4176,7 @@ result = grant_role_result() try: result.success = self._handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("grant_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4188,7 +4190,7 @@ result = revoke_role_result() try: result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("revoke_role", TMessageType.REPLY, seqid) result.write(oprot) @@ -4202,7 +4204,7 @@ result = list_roles_result() try: result.success = self._handler.list_roles(args.principal_name, args.principal_type) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("list_roles", TMessageType.REPLY, seqid) result.write(oprot) @@ -4216,7 +4218,7 @@ result = get_privilege_set_result() try: result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_privilege_set", TMessageType.REPLY, seqid) result.write(oprot) @@ -4230,7 +4232,7 @@ result = list_privileges_result() try: result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("list_privileges", TMessageType.REPLY, seqid) result.write(oprot) @@ -4244,7 +4246,7 @@ result = grant_privileges_result() try: result.success = self._handler.grant_privileges(args.privileges) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("grant_privileges", TMessageType.REPLY, seqid) result.write(oprot) @@ -4258,7 +4260,7 @@ result = revoke_privileges_result() try: result.success = self._handler.revoke_privileges(args.privileges) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("revoke_privileges", TMessageType.REPLY, seqid) result.write(oprot) @@ -4272,7 +4274,7 @@ result = set_ugi_result() try: result.success = self._handler.set_ugi(args.user_name, args.group_names) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("set_ugi", TMessageType.REPLY, seqid) result.write(oprot) @@ -4286,7 +4288,7 @@ result = get_delegation_token_result() try: result.success = self._handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("get_delegation_token", TMessageType.REPLY, seqid) result.write(oprot) @@ -4300,7 +4302,7 @@ result = renew_delegation_token_result() try: result.success = self._handler.renew_delegation_token(args.token_str_form) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("renew_delegation_token", TMessageType.REPLY, seqid) result.write(oprot) @@ -4314,7 +4316,7 @@ result = cancel_delegation_token_result() try: self._handler.cancel_delegation_token(args.token_str_form) - except MetaException, o1: + except MetaException as o1: result.o1 = o1 oprot.writeMessageBegin("cancel_delegation_token", TMessageType.REPLY, seqid) result.write(oprot) Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (revision 1403799) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -1,9 +1,11 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# import sys import pprint @@ -18,7 +20,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print '' - print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' + print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' print ' void create_database(Database database)' @@ -104,7 +106,8 @@ if sys.argv[argi] == '-h': parts = sys.argv[argi+1].split(':') host = parts[0] - port = int(parts[1]) + if len(parts) > 1: + port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_metastore_CONSTANTS_H #define hive_metastore_CONSTANTS_H Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "ThriftHiveMetastore.h" @@ -50,9 +51,11 @@ uint32_t ThriftHiveMetastore_create_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_args"); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->database.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -61,9 +64,11 @@ uint32_t ThriftHiveMetastore_create_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_pargs"); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->database)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -248,9 +253,11 @@ uint32_t ThriftHiveMetastore_get_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -259,9 +266,11 @@ uint32_t ThriftHiveMetastore_get_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -462,15 +471,19 @@ uint32_t ThriftHiveMetastore_drop_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("cascade", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->cascade); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -479,15 +492,19 @@ uint32_t ThriftHiveMetastore_drop_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("cascade", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool((*(this->cascade))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -672,9 +689,11 @@ uint32_t ThriftHiveMetastore_get_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_args"); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -683,9 +702,11 @@ uint32_t ThriftHiveMetastore_get_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_pargs"); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -717,14 +738,14 @@ this->success.clear(); uint32_t _size195; ::apache::thrift::protocol::TType _etype198; - iprot->readListBegin(_etype198, _size195); + xfer += iprot->readListBegin(_etype198, _size195); this->success.resize(_size195); uint32_t _i199; for (_i199 = 0; _i199 < _size195; ++_i199) { xfer += iprot->readString(this->success[_i199]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -805,14 +826,14 @@ (*(this->success)).clear(); uint32_t _size201; ::apache::thrift::protocol::TType _etype204; - iprot->readListBegin(_etype204, _size201); + xfer += iprot->readListBegin(_etype204, _size201); (*(this->success)).resize(_size201); uint32_t _i205; for (_i205 = 0; _i205 < _size201; ++_i205) { xfer += iprot->readString((*(this->success))[_i205]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -857,12 +878,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -874,6 +890,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -882,6 +899,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -913,14 +931,14 @@ this->success.clear(); uint32_t _size206; ::apache::thrift::protocol::TType _etype209; - iprot->readListBegin(_etype209, _size206); + xfer += iprot->readListBegin(_etype209, _size206); this->success.resize(_size206); uint32_t _i210; for (_i210 = 0; _i210 < _size206; ++_i210) { xfer += iprot->readString(this->success[_i210]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -1001,14 +1019,14 @@ (*(this->success)).clear(); uint32_t _size212; ::apache::thrift::protocol::TType _etype215; - iprot->readListBegin(_etype215, _size212); + xfer += iprot->readListBegin(_etype215, _size212); (*(this->success)).resize(_size212); uint32_t _i216; for (_i216 = 0; _i216 < _size212; ++_i216) { xfer += iprot->readString((*(this->success))[_i216]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -1086,12 +1104,15 @@ uint32_t ThriftHiveMetastore_alter_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_database_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->db.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1100,12 +1121,15 @@ uint32_t ThriftHiveMetastore_alter_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_database_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->db)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1270,9 +1294,11 @@ uint32_t ThriftHiveMetastore_get_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1281,9 +1307,11 @@ uint32_t ThriftHiveMetastore_get_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1468,9 +1496,11 @@ uint32_t ThriftHiveMetastore_create_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_args"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->type.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1479,9 +1509,11 @@ uint32_t ThriftHiveMetastore_create_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_pargs"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->type)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1686,9 +1718,11 @@ uint32_t ThriftHiveMetastore_drop_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_args"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1697,9 +1731,11 @@ uint32_t ThriftHiveMetastore_drop_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_pargs"); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1884,9 +1920,11 @@ uint32_t ThriftHiveMetastore_get_type_all_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1895,9 +1933,11 @@ uint32_t ThriftHiveMetastore_get_type_all_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1930,7 +1970,7 @@ uint32_t _size217; ::apache::thrift::protocol::TType _ktype218; ::apache::thrift::protocol::TType _vtype219; - iprot->readMapBegin(_ktype218, _vtype219, _size217); + xfer += iprot->readMapBegin(_ktype218, _vtype219, _size217); uint32_t _i221; for (_i221 = 0; _i221 < _size217; ++_i221) { @@ -1939,7 +1979,7 @@ Type& _val223 = this->success[_key222]; xfer += _val223.read(iprot); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -2022,7 +2062,7 @@ uint32_t _size225; ::apache::thrift::protocol::TType _ktype226; ::apache::thrift::protocol::TType _vtype227; - iprot->readMapBegin(_ktype226, _vtype227, _size225); + xfer += iprot->readMapBegin(_ktype226, _vtype227, _size225); uint32_t _i229; for (_i229 = 0; _i229 < _size225; ++_i229) { @@ -2031,7 +2071,7 @@ Type& _val231 = (*(this->success))[_key230]; xfer += _val231.read(iprot); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -2109,12 +2149,15 @@ uint32_t ThriftHiveMetastore_get_fields_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->table_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2123,12 +2166,15 @@ uint32_t ThriftHiveMetastore_get_fields_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->table_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2160,14 +2206,14 @@ this->success.clear(); uint32_t _size232; ::apache::thrift::protocol::TType _etype235; - iprot->readListBegin(_etype235, _size232); + xfer += iprot->readListBegin(_etype235, _size232); this->success.resize(_size232); uint32_t _i236; for (_i236 = 0; _i236 < _size232; ++_i236) { xfer += this->success[_i236].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2272,14 +2318,14 @@ (*(this->success)).clear(); uint32_t _size238; ::apache::thrift::protocol::TType _etype241; - iprot->readListBegin(_etype241, _size238); + xfer += iprot->readListBegin(_etype241, _size238); (*(this->success)).resize(_size238); uint32_t _i242; for (_i242 = 0; _i242 < _size238; ++_i242) { xfer += (*(this->success))[_i242].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2373,12 +2419,15 @@ uint32_t ThriftHiveMetastore_get_schema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->table_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2387,12 +2436,15 @@ uint32_t ThriftHiveMetastore_get_schema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->table_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2424,14 +2476,14 @@ this->success.clear(); uint32_t _size243; ::apache::thrift::protocol::TType _etype246; - iprot->readListBegin(_etype246, _size243); + xfer += iprot->readListBegin(_etype246, _size243); this->success.resize(_size243); uint32_t _i247; for (_i247 = 0; _i247 < _size243; ++_i247) { xfer += this->success[_i247].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2536,14 +2588,14 @@ (*(this->success)).clear(); uint32_t _size249; ::apache::thrift::protocol::TType _etype252; - iprot->readListBegin(_etype252, _size249); + xfer += iprot->readListBegin(_etype252, _size249); (*(this->success)).resize(_size249); uint32_t _i253; for (_i253 = 0; _i253 < _size249; ++_i253) { xfer += (*(this->success))[_i253].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -2629,9 +2681,11 @@ uint32_t ThriftHiveMetastore_create_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_args"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2640,9 +2694,11 @@ uint32_t ThriftHiveMetastore_create_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_pargs"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2855,12 +2911,15 @@ uint32_t ThriftHiveMetastore_create_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_environment_context_args"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -2869,12 +2928,15 @@ uint32_t ThriftHiveMetastore_create_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3095,15 +3157,19 @@ uint32_t ThriftHiveMetastore_drop_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3112,15 +3178,19 @@ uint32_t ThriftHiveMetastore_drop_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3293,12 +3363,15 @@ uint32_t ThriftHiveMetastore_get_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3307,12 +3380,15 @@ uint32_t ThriftHiveMetastore_get_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3344,14 +3420,14 @@ this->success.clear(); uint32_t _size254; ::apache::thrift::protocol::TType _etype257; - iprot->readListBegin(_etype257, _size254); + xfer += iprot->readListBegin(_etype257, _size254); this->success.resize(_size254); uint32_t _i258; for (_i258 = 0; _i258 < _size254; ++_i258) { xfer += iprot->readString(this->success[_i258]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3432,14 +3508,14 @@ (*(this->success)).clear(); uint32_t _size260; ::apache::thrift::protocol::TType _etype263; - iprot->readListBegin(_etype263, _size260); + xfer += iprot->readListBegin(_etype263, _size260); (*(this->success)).resize(_size260); uint32_t _i264; for (_i264 = 0; _i264 < _size260; ++_i264) { xfer += iprot->readString((*(this->success))[_i264]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3509,9 +3585,11 @@ uint32_t ThriftHiveMetastore_get_all_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3520,9 +3598,11 @@ uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3554,14 +3634,14 @@ this->success.clear(); uint32_t _size265; ::apache::thrift::protocol::TType _etype268; - iprot->readListBegin(_etype268, _size265); + xfer += iprot->readListBegin(_etype268, _size265); this->success.resize(_size265); uint32_t _i269; for (_i269 = 0; _i269 < _size265; ++_i269) { xfer += iprot->readString(this->success[_i269]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3642,14 +3722,14 @@ (*(this->success)).clear(); uint32_t _size271; ::apache::thrift::protocol::TType _etype274; - iprot->readListBegin(_etype274, _size271); + xfer += iprot->readListBegin(_etype274, _size271); (*(this->success)).resize(_size271); uint32_t _i275; for (_i275 = 0; _i275 < _size271; ++_i275) { xfer += iprot->readString((*(this->success))[_i275]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -3727,12 +3807,15 @@ uint32_t ThriftHiveMetastore_get_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3741,12 +3824,15 @@ uint32_t ThriftHiveMetastore_get_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3922,14 +4008,14 @@ this->tbl_names.clear(); uint32_t _size276; ::apache::thrift::protocol::TType _etype279; - iprot->readListBegin(_etype279, _size276); + xfer += iprot->readListBegin(_etype279, _size276); this->tbl_names.resize(_size276); uint32_t _i280; for (_i280 = 0; _i280 < _size276; ++_i280) { xfer += iprot->readString(this->tbl_names[_i280]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.tbl_names = true; } else { @@ -3951,9 +4037,11 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tbl_names.size())); @@ -3965,6 +4053,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -3973,9 +4062,11 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tbl_names)).size())); @@ -3987,6 +4078,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4018,14 +4110,14 @@ this->success.clear(); uint32_t _size283; ::apache::thrift::protocol::TType _etype286; - iprot->readListBegin(_etype286, _size283); + xfer += iprot->readListBegin(_etype286, _size283); this->success.resize(_size283); uint32_t _i287; for (_i287 = 0; _i287 < _size283; ++_i287) { xfer += this->success[_i287].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4130,14 +4222,14 @@ (*(this->success)).clear(); uint32_t _size289; ::apache::thrift::protocol::TType _etype292; - iprot->readListBegin(_etype292, _size289); + xfer += iprot->readListBegin(_etype292, _size289); (*(this->success)).resize(_size289); uint32_t _i293; for (_i293 = 0; _i293 < _size289; ++_i293) { xfer += (*(this->success))[_i293].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4239,15 +4331,19 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->filter); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_tables", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_tables); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4256,15 +4352,19 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->filter))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_tables", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_tables))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4296,14 +4396,14 @@ this->success.clear(); uint32_t _size294; ::apache::thrift::protocol::TType _etype297; - iprot->readListBegin(_etype297, _size294); + xfer += iprot->readListBegin(_etype297, _size294); this->success.resize(_size294); uint32_t _i298; for (_i298 = 0; _i298 < _size294; ++_i298) { xfer += iprot->readString(this->success[_i298]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4408,14 +4508,14 @@ (*(this->success)).clear(); uint32_t _size300; ::apache::thrift::protocol::TType _etype303; - iprot->readListBegin(_etype303, _size300); + xfer += iprot->readListBegin(_etype303, _size300); (*(this->success)).resize(_size300); uint32_t _i304; for (_i304 = 0; _i304 < _size300; ++_i304) { xfer += iprot->readString((*(this->success))[_i304]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -4517,15 +4617,19 @@ uint32_t ThriftHiveMetastore_alter_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4534,15 +4638,19 @@ uint32_t ThriftHiveMetastore_alter_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4731,18 +4839,23 @@ uint32_t ThriftHiveMetastore_alter_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_environment_context_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_tbl.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4751,18 +4864,23 @@ uint32_t ThriftHiveMetastore_alter_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_tbl)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4927,9 +5045,11 @@ uint32_t ThriftHiveMetastore_add_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_args"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -4938,9 +5058,11 @@ uint32_t ThriftHiveMetastore_add_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_pargs"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5153,12 +5275,15 @@ uint32_t ThriftHiveMetastore_add_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_with_environment_context_args"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5167,12 +5292,15 @@ uint32_t ThriftHiveMetastore_add_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5360,14 +5488,14 @@ this->new_parts.clear(); uint32_t _size305; ::apache::thrift::protocol::TType _etype308; - iprot->readListBegin(_etype308, _size305); + xfer += iprot->readListBegin(_etype308, _size305); this->new_parts.resize(_size305); uint32_t _i309; for (_i309 = 0; _i309 < _size305; ++_i309) { xfer += this->new_parts[_i309].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.new_parts = true; } else { @@ -5389,6 +5517,7 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_args"); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); @@ -5400,6 +5529,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5408,6 +5538,7 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pargs"); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); @@ -5419,6 +5550,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5622,14 +5754,14 @@ this->part_vals.clear(); uint32_t _size312; ::apache::thrift::protocol::TType _etype315; - iprot->readListBegin(_etype315, _size312); + xfer += iprot->readListBegin(_etype315, _size312); this->part_vals.resize(_size312); uint32_t _i316; for (_i316 = 0; _i316 < _size312; ++_i316) { xfer += iprot->readString(this->part_vals[_i316]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -5651,12 +5783,15 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -5668,6 +5803,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5676,12 +5812,15 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -5693,6 +5832,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5913,15 +6053,19 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -5930,15 +6074,19 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6142,14 +6290,14 @@ this->part_vals.clear(); uint32_t _size319; ::apache::thrift::protocol::TType _etype322; - iprot->readListBegin(_etype322, _size319); + xfer += iprot->readListBegin(_etype322, _size319); this->part_vals.resize(_size319); uint32_t _i323; for (_i323 = 0; _i323 < _size319; ++_i323) { xfer += iprot->readString(this->part_vals[_i323]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -6179,12 +6327,15 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -6196,9 +6347,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6207,12 +6360,15 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -6224,9 +6380,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6435,18 +6593,23 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6455,18 +6618,23 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6650,14 +6818,14 @@ this->part_vals.clear(); uint32_t _size326; ::apache::thrift::protocol::TType _etype329; - iprot->readListBegin(_etype329, _size326); + xfer += iprot->readListBegin(_etype329, _size326); this->part_vals.resize(_size326); uint32_t _i330; for (_i330 = 0; _i330 < _size326; ++_i330) { xfer += iprot->readString(this->part_vals[_i330]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -6679,12 +6847,15 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -6696,6 +6867,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6704,12 +6876,15 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -6721,6 +6896,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -6904,14 +7080,14 @@ this->part_vals.clear(); uint32_t _size333; ::apache::thrift::protocol::TType _etype336; - iprot->readListBegin(_etype336, _size333); + xfer += iprot->readListBegin(_etype336, _size333); this->part_vals.resize(_size333); uint32_t _i337; for (_i337 = 0; _i337 < _size333; ++_i337) { xfer += iprot->readString(this->part_vals[_i337]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -6932,14 +7108,14 @@ this->group_names.clear(); uint32_t _size338; ::apache::thrift::protocol::TType _etype341; - iprot->readListBegin(_etype341, _size338); + xfer += iprot->readListBegin(_etype341, _size338); this->group_names.resize(_size338); uint32_t _i342; for (_i342 = 0; _i342 < _size338; ++_i342) { xfer += iprot->readString(this->group_names[_i342]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -6961,12 +7137,15 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -6978,9 +7157,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -6992,6 +7173,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7000,12 +7182,15 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -7017,9 +7202,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -7031,6 +7218,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7231,15 +7419,19 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7248,15 +7440,19 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7457,15 +7653,19 @@ uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7474,15 +7674,19 @@ uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7514,14 +7718,14 @@ this->success.clear(); uint32_t _size347; ::apache::thrift::protocol::TType _etype350; - iprot->readListBegin(_etype350, _size347); + xfer += iprot->readListBegin(_etype350, _size347); this->success.resize(_size347); uint32_t _i351; for (_i351 = 0; _i351 < _size347; ++_i351) { xfer += this->success[_i351].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -7614,14 +7818,14 @@ (*(this->success)).clear(); uint32_t _size353; ::apache::thrift::protocol::TType _etype356; - iprot->readListBegin(_etype356, _size353); + xfer += iprot->readListBegin(_etype356, _size353); (*(this->success)).resize(_size353); uint32_t _i357; for (_i357 = 0; _i357 < _size353; ++_i357) { xfer += (*(this->success))[_i357].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -7714,14 +7918,14 @@ this->group_names.clear(); uint32_t _size358; ::apache::thrift::protocol::TType _etype361; - iprot->readListBegin(_etype361, _size358); + xfer += iprot->readListBegin(_etype361, _size358); this->group_names.resize(_size358); uint32_t _i362; for (_i362 = 0; _i362 < _size358; ++_i362) { xfer += iprot->readString(this->group_names[_i362]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -7743,18 +7947,23 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -7766,6 +7975,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7774,18 +7984,23 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -7797,6 +8012,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -7828,14 +8044,14 @@ this->success.clear(); uint32_t _size365; ::apache::thrift::protocol::TType _etype368; - iprot->readListBegin(_etype368, _size365); + xfer += iprot->readListBegin(_etype368, _size365); this->success.resize(_size365); uint32_t _i369; for (_i369 = 0; _i369 < _size365; ++_i369) { xfer += this->success[_i369].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -7928,14 +8144,14 @@ (*(this->success)).clear(); uint32_t _size371; ::apache::thrift::protocol::TType _etype374; - iprot->readListBegin(_etype374, _size371); + xfer += iprot->readListBegin(_etype374, _size371); (*(this->success)).resize(_size371); uint32_t _i375; for (_i375 = 0; _i375 < _size371; ++_i375) { xfer += (*(this->success))[_i375].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8029,15 +8245,19 @@ uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8046,15 +8266,19 @@ uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8086,14 +8310,14 @@ this->success.clear(); uint32_t _size376; ::apache::thrift::protocol::TType _etype379; - iprot->readListBegin(_etype379, _size376); + xfer += iprot->readListBegin(_etype379, _size376); this->success.resize(_size376); uint32_t _i380; for (_i380 = 0; _i380 < _size376; ++_i380) { xfer += iprot->readString(this->success[_i380]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8174,14 +8398,14 @@ (*(this->success)).clear(); uint32_t _size382; ::apache::thrift::protocol::TType _etype385; - iprot->readListBegin(_etype385, _size382); + xfer += iprot->readListBegin(_etype385, _size382); (*(this->success)).resize(_size382); uint32_t _i386; for (_i386 = 0; _i386 < _size382; ++_i386) { xfer += iprot->readString((*(this->success))[_i386]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8250,14 +8474,14 @@ this->part_vals.clear(); uint32_t _size387; ::apache::thrift::protocol::TType _etype390; - iprot->readListBegin(_etype390, _size387); + xfer += iprot->readListBegin(_etype390, _size387); this->part_vals.resize(_size387); uint32_t _i391; for (_i391 = 0; _i391 < _size387; ++_i391) { xfer += iprot->readString(this->part_vals[_i391]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -8287,12 +8511,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -8304,9 +8531,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8315,12 +8544,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -8332,9 +8564,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8366,14 +8600,14 @@ this->success.clear(); uint32_t _size394; ::apache::thrift::protocol::TType _etype397; - iprot->readListBegin(_etype397, _size394); + xfer += iprot->readListBegin(_etype397, _size394); this->success.resize(_size394); uint32_t _i398; for (_i398 = 0; _i398 < _size394; ++_i398) { xfer += this->success[_i398].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8466,14 +8700,14 @@ (*(this->success)).clear(); uint32_t _size400; ::apache::thrift::protocol::TType _etype403; - iprot->readListBegin(_etype403, _size400); + xfer += iprot->readListBegin(_etype403, _size400); (*(this->success)).resize(_size400); uint32_t _i404; for (_i404 = 0; _i404 < _size400; ++_i404) { xfer += (*(this->success))[_i404].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8550,14 +8784,14 @@ this->part_vals.clear(); uint32_t _size405; ::apache::thrift::protocol::TType _etype408; - iprot->readListBegin(_etype408, _size405); + xfer += iprot->readListBegin(_etype408, _size405); this->part_vals.resize(_size405); uint32_t _i409; for (_i409 = 0; _i409 < _size405; ++_i409) { xfer += iprot->readString(this->part_vals[_i409]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -8586,14 +8820,14 @@ this->group_names.clear(); uint32_t _size410; ::apache::thrift::protocol::TType _etype413; - iprot->readListBegin(_etype413, _size410); + xfer += iprot->readListBegin(_etype413, _size410); this->group_names.resize(_size410); uint32_t _i414; for (_i414 = 0; _i414 < _size410; ++_i414) { xfer += iprot->readString(this->group_names[_i414]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -8615,12 +8849,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -8632,12 +8869,15 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -8649,6 +8889,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8657,12 +8898,15 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -8674,12 +8918,15 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -8691,6 +8938,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8722,14 +8970,14 @@ this->success.clear(); uint32_t _size419; ::apache::thrift::protocol::TType _etype422; - iprot->readListBegin(_etype422, _size419); + xfer += iprot->readListBegin(_etype422, _size419); this->success.resize(_size419); uint32_t _i423; for (_i423 = 0; _i423 < _size419; ++_i423) { xfer += this->success[_i423].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8822,14 +9070,14 @@ (*(this->success)).clear(); uint32_t _size425; ::apache::thrift::protocol::TType _etype428; - iprot->readListBegin(_etype428, _size425); + xfer += iprot->readListBegin(_etype428, _size425); (*(this->success)).resize(_size425); uint32_t _i429; for (_i429 = 0; _i429 < _size425; ++_i429) { xfer += (*(this->success))[_i429].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -8906,14 +9154,14 @@ this->part_vals.clear(); uint32_t _size430; ::apache::thrift::protocol::TType _etype433; - iprot->readListBegin(_etype433, _size430); + xfer += iprot->readListBegin(_etype433, _size430); this->part_vals.resize(_size430); uint32_t _i434; for (_i434 = 0; _i434 < _size430; ++_i434) { xfer += iprot->readString(this->part_vals[_i434]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -8943,12 +9191,15 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -8960,9 +9211,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -8971,12 +9224,15 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -8988,9 +9244,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9022,14 +9280,14 @@ this->success.clear(); uint32_t _size437; ::apache::thrift::protocol::TType _etype440; - iprot->readListBegin(_etype440, _size437); + xfer += iprot->readListBegin(_etype440, _size437); this->success.resize(_size437); uint32_t _i441; for (_i441 = 0; _i441 < _size437; ++_i441) { xfer += iprot->readString(this->success[_i441]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9122,14 +9380,14 @@ (*(this->success)).clear(); uint32_t _size443; ::apache::thrift::protocol::TType _etype446; - iprot->readListBegin(_etype446, _size443); + xfer += iprot->readListBegin(_etype446, _size443); (*(this->success)).resize(_size443); uint32_t _i447; for (_i447 = 0; _i447 < _size443; ++_i447) { xfer += iprot->readString((*(this->success))[_i447]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9231,18 +9489,23 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->filter); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9251,18 +9514,23 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->filter))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9294,14 +9562,14 @@ this->success.clear(); uint32_t _size448; ::apache::thrift::protocol::TType _etype451; - iprot->readListBegin(_etype451, _size448); + xfer += iprot->readListBegin(_etype451, _size448); this->success.resize(_size448); uint32_t _i452; for (_i452 = 0; _i452 < _size448; ++_i452) { xfer += this->success[_i452].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9394,14 +9662,14 @@ (*(this->success)).clear(); uint32_t _size454; ::apache::thrift::protocol::TType _etype457; - iprot->readListBegin(_etype457, _size454); + xfer += iprot->readListBegin(_etype457, _size454); (*(this->success)).resize(_size454); uint32_t _i458; for (_i458 = 0; _i458 < _size454; ++_i458) { xfer += (*(this->success))[_i458].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9478,14 +9746,14 @@ this->names.clear(); uint32_t _size459; ::apache::thrift::protocol::TType _etype462; - iprot->readListBegin(_etype462, _size459); + xfer += iprot->readListBegin(_etype462, _size459); this->names.resize(_size459); uint32_t _i463; for (_i463 = 0; _i463 < _size459; ++_i463) { xfer += iprot->readString(this->names[_i463]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.names = true; } else { @@ -9507,12 +9775,15 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); @@ -9524,6 +9795,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9532,12 +9804,15 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->names)).size())); @@ -9549,6 +9824,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9580,14 +9856,14 @@ this->success.clear(); uint32_t _size466; ::apache::thrift::protocol::TType _etype469; - iprot->readListBegin(_etype469, _size466); + xfer += iprot->readListBegin(_etype469, _size466); this->success.resize(_size466); uint32_t _i470; for (_i470 = 0; _i470 < _size466; ++_i470) { xfer += this->success[_i470].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9680,14 +9956,14 @@ (*(this->success)).clear(); uint32_t _size472; ::apache::thrift::protocol::TType _etype475; - iprot->readListBegin(_etype475, _size472); + xfer += iprot->readListBegin(_etype475, _size472); (*(this->success)).resize(_size472); uint32_t _i476; for (_i476 = 0; _i476 < _size472; ++_i476) { xfer += (*(this->success))[_i476].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -9781,15 +10057,19 @@ uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9798,15 +10078,19 @@ uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9970,14 +10254,14 @@ this->new_parts.clear(); uint32_t _size477; ::apache::thrift::protocol::TType _etype480; - iprot->readListBegin(_etype480, _size477); + xfer += iprot->readListBegin(_etype480, _size477); this->new_parts.resize(_size477); uint32_t _i481; for (_i481 = 0; _i481 < _size477; ++_i481) { xfer += this->new_parts[_i481].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.new_parts = true; } else { @@ -9999,12 +10283,15 @@ uint32_t ThriftHiveMetastore_alter_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); @@ -10016,6 +10303,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10024,12 +10312,15 @@ uint32_t ThriftHiveMetastore_alter_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); @@ -10041,6 +10332,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10229,18 +10521,23 @@ uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_with_environment_context_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->environment_context.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10249,18 +10546,23 @@ uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_with_environment_context_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->environment_context)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10424,14 +10726,14 @@ this->part_vals.clear(); uint32_t _size484; ::apache::thrift::protocol::TType _etype487; - iprot->readListBegin(_etype487, _size484); + xfer += iprot->readListBegin(_etype487, _size484); this->part_vals.resize(_size484); uint32_t _i488; for (_i488 = 0; _i488 < _size484; ++_i488) { xfer += iprot->readString(this->part_vals[_i488]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.part_vals = true; } else { @@ -10461,12 +10763,15 @@ uint32_t ThriftHiveMetastore_rename_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_rename_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -10478,9 +10783,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10489,12 +10796,15 @@ uint32_t ThriftHiveMetastore_rename_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_rename_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -10506,9 +10816,11 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10681,12 +10993,15 @@ uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->defaultValue); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10695,12 +11010,15 @@ uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->defaultValue))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10865,9 +11183,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_args"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10876,9 +11196,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_pargs"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10910,14 +11232,14 @@ this->success.clear(); uint32_t _size491; ::apache::thrift::protocol::TType _etype494; - iprot->readListBegin(_etype494, _size491); + xfer += iprot->readListBegin(_etype494, _size491); this->success.resize(_size491); uint32_t _i495; for (_i495 = 0; _i495 < _size491; ++_i495) { xfer += iprot->readString(this->success[_i495]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -10998,14 +11320,14 @@ (*(this->success)).clear(); uint32_t _size497; ::apache::thrift::protocol::TType _etype500; - iprot->readListBegin(_etype500, _size497); + xfer += iprot->readListBegin(_etype500, _size497); (*(this->success)).resize(_size497); uint32_t _i501; for (_i501 = 0; _i501 < _size497; ++_i501) { xfer += iprot->readString((*(this->success))[_i501]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -11075,9 +11397,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11086,9 +11410,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11121,7 +11447,7 @@ uint32_t _size502; ::apache::thrift::protocol::TType _ktype503; ::apache::thrift::protocol::TType _vtype504; - iprot->readMapBegin(_ktype503, _vtype504, _size502); + xfer += iprot->readMapBegin(_ktype503, _vtype504, _size502); uint32_t _i506; for (_i506 = 0; _i506 < _size502; ++_i506) { @@ -11130,7 +11456,7 @@ std::string& _val508 = this->success[_key507]; xfer += iprot->readString(_val508); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -11213,7 +11539,7 @@ uint32_t _size510; ::apache::thrift::protocol::TType _ktype511; ::apache::thrift::protocol::TType _vtype512; - iprot->readMapBegin(_ktype511, _vtype512, _size510); + xfer += iprot->readMapBegin(_ktype511, _vtype512, _size510); uint32_t _i514; for (_i514 = 0; _i514 < _size510; ++_i514) { @@ -11222,7 +11548,7 @@ std::string& _val516 = (*(this->success))[_key515]; xfer += iprot->readString(_val516); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.success = true; } else { @@ -11292,7 +11618,7 @@ uint32_t _size517; ::apache::thrift::protocol::TType _ktype518; ::apache::thrift::protocol::TType _vtype519; - iprot->readMapBegin(_ktype518, _vtype519, _size517); + xfer += iprot->readMapBegin(_ktype518, _vtype519, _size517); uint32_t _i521; for (_i521 = 0; _i521 < _size517; ++_i521) { @@ -11301,7 +11627,7 @@ std::string& _val523 = this->part_vals[_key522]; xfer += iprot->readString(_val523); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.part_vals = true; } else { @@ -11333,12 +11659,15 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_markPartitionForEvent_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -11351,9 +11680,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->eventType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11362,12 +11693,15 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_markPartitionForEvent_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -11380,9 +11714,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)(*(this->eventType))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11627,7 +11963,7 @@ uint32_t _size527; ::apache::thrift::protocol::TType _ktype528; ::apache::thrift::protocol::TType _vtype529; - iprot->readMapBegin(_ktype528, _vtype529, _size527); + xfer += iprot->readMapBegin(_ktype528, _vtype529, _size527); uint32_t _i531; for (_i531 = 0; _i531 < _size527; ++_i531) { @@ -11636,7 +11972,7 @@ std::string& _val533 = this->part_vals[_key532]; xfer += iprot->readString(_val533); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.part_vals = true; } else { @@ -11668,12 +12004,15 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_isPartitionMarkedForEvent_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); @@ -11686,9 +12025,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->eventType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11697,12 +12038,15 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_isPartitionMarkedForEvent_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); @@ -11715,9 +12059,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)(*(this->eventType))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -11990,12 +12336,15 @@ uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_index.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->index_table.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12004,12 +12353,15 @@ uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_pargs"); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_index)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->index_table)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12238,18 +12590,23 @@ uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->base_tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->idx_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->new_idx.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12258,18 +12615,23 @@ uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->base_tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->idx_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); xfer += (*(this->new_idx)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12458,18 +12820,23 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->index_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12478,18 +12845,23 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->index_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12690,15 +13062,19 @@ uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->index_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12707,15 +13083,19 @@ uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->index_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12916,15 +13296,19 @@ uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_indexes); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12933,15 +13317,19 @@ uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_indexes))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12973,14 +13361,14 @@ this->success.clear(); uint32_t _size537; ::apache::thrift::protocol::TType _etype540; - iprot->readListBegin(_etype540, _size537); + xfer += iprot->readListBegin(_etype540, _size537); this->success.resize(_size537); uint32_t _i541; for (_i541 = 0; _i541 < _size537; ++_i541) { xfer += this->success[_i541].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13073,14 +13461,14 @@ (*(this->success)).clear(); uint32_t _size543; ::apache::thrift::protocol::TType _etype546; - iprot->readListBegin(_etype546, _size543); + xfer += iprot->readListBegin(_etype546, _size543); (*(this->success)).resize(_size543); uint32_t _i547; for (_i547 = 0; _i547 < _size543; ++_i547) { xfer += (*(this->success))[_i547].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13174,15 +13562,19 @@ uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_indexes); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13191,15 +13583,19 @@ uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_indexes))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13231,14 +13627,14 @@ this->success.clear(); uint32_t _size548; ::apache::thrift::protocol::TType _etype551; - iprot->readListBegin(_etype551, _size548); + xfer += iprot->readListBegin(_etype551, _size548); this->success.resize(_size548); uint32_t _i552; for (_i552 = 0; _i552 < _size548; ++_i552) { xfer += iprot->readString(this->success[_i552]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13319,14 +13715,14 @@ (*(this->success)).clear(); uint32_t _size554; ::apache::thrift::protocol::TType _etype557; - iprot->readListBegin(_etype557, _size554); + xfer += iprot->readListBegin(_etype557, _size554); (*(this->success)).resize(_size554); uint32_t _i558; for (_i558 = 0; _i558 < _size554; ++_i558) { xfer += iprot->readString((*(this->success))[_i558]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13396,9 +13792,11 @@ uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->role.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13407,9 +13805,11 @@ uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->role)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13574,9 +13974,11 @@ uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13585,9 +13987,11 @@ uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13727,12 +14131,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -13744,6 +14143,7 @@ uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13752,6 +14152,7 @@ uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -13783,14 +14184,14 @@ this->success.clear(); uint32_t _size559; ::apache::thrift::protocol::TType _etype562; - iprot->readListBegin(_etype562, _size559); + xfer += iprot->readListBegin(_etype562, _size559); this->success.resize(_size559); uint32_t _i563; for (_i563 = 0; _i563 < _size559; ++_i563) { xfer += iprot->readString(this->success[_i563]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13871,14 +14272,14 @@ (*(this->success)).clear(); uint32_t _size565; ::apache::thrift::protocol::TType _etype568; - iprot->readListBegin(_etype568, _size565); + xfer += iprot->readListBegin(_etype568, _size565); (*(this->success)).resize(_size565); uint32_t _i569; for (_i569 = 0; _i569 < _size565; ++_i569) { xfer += iprot->readString((*(this->success))[_i569]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -13992,24 +14393,31 @@ uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->grantor); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32((int32_t)this->grantorType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool(this->grant_option); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14018,24 +14426,31 @@ uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString((*(this->grantor))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32((int32_t)(*(this->grantorType))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool((*(this->grant_option))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14218,15 +14633,19 @@ uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14235,15 +14654,19 @@ uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14418,12 +14841,15 @@ uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14432,12 +14858,15 @@ uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14469,14 +14898,14 @@ this->success.clear(); uint32_t _size574; ::apache::thrift::protocol::TType _etype577; - iprot->readListBegin(_etype577, _size574); + xfer += iprot->readListBegin(_etype577, _size574); this->success.resize(_size574); uint32_t _i578; for (_i578 = 0; _i578 < _size574; ++_i578) { xfer += this->success[_i578].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -14557,14 +14986,14 @@ (*(this->success)).clear(); uint32_t _size580; ::apache::thrift::protocol::TType _etype583; - iprot->readListBegin(_etype583, _size580); + xfer += iprot->readListBegin(_etype583, _size580); (*(this->success)).resize(_size580); uint32_t _i584; for (_i584 = 0; _i584 < _size580; ++_i584) { xfer += (*(this->success))[_i584].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -14633,14 +15062,14 @@ this->group_names.clear(); uint32_t _size585; ::apache::thrift::protocol::TType _etype588; - iprot->readListBegin(_etype588, _size585); + xfer += iprot->readListBegin(_etype588, _size585); this->group_names.resize(_size585); uint32_t _i589; for (_i589 = 0; _i589 < _size585; ++_i589) { xfer += iprot->readString(this->group_names[_i589]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -14662,12 +15091,15 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_args"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->hiveObject.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -14679,6 +15111,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14687,12 +15120,15 @@ uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->hiveObject)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -14704,6 +15140,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14886,15 +15323,19 @@ uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->hiveObject.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14903,15 +15344,19 @@ uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->hiveObject)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14943,14 +15388,14 @@ this->success.clear(); uint32_t _size593; ::apache::thrift::protocol::TType _etype596; - iprot->readListBegin(_etype596, _size593); + xfer += iprot->readListBegin(_etype596, _size593); this->success.resize(_size593); uint32_t _i597; for (_i597 = 0; _i597 < _size593; ++_i597) { xfer += this->success[_i597].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -15031,14 +15476,14 @@ (*(this->success)).clear(); uint32_t _size599; ::apache::thrift::protocol::TType _etype602; - iprot->readListBegin(_etype602, _size599); + xfer += iprot->readListBegin(_etype602, _size599); (*(this->success)).resize(_size599); uint32_t _i603; for (_i603 = 0; _i603 < _size599; ++_i603) { xfer += (*(this->success))[_i603].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -15108,9 +15553,11 @@ uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->privileges.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15119,9 +15566,11 @@ uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_pargs"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->privileges)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15286,9 +15735,11 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->privileges.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15297,9 +15748,11 @@ uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->privileges)).write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15455,14 +15908,14 @@ this->group_names.clear(); uint32_t _size604; ::apache::thrift::protocol::TType _etype607; - iprot->readListBegin(_etype607, _size604); + xfer += iprot->readListBegin(_etype607, _size604); this->group_names.resize(_size604); uint32_t _i608; for (_i608 = 0; _i608 < _size604; ++_i608) { xfer += iprot->readString(this->group_names[_i608]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.group_names = true; } else { @@ -15484,9 +15937,11 @@ uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->user_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); @@ -15498,6 +15953,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15506,9 +15962,11 @@ uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->user_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); @@ -15520,6 +15978,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15551,14 +16010,14 @@ this->success.clear(); uint32_t _size611; ::apache::thrift::protocol::TType _etype614; - iprot->readListBegin(_etype614, _size611); + xfer += iprot->readListBegin(_etype614, _size611); this->success.resize(_size611); uint32_t _i615; for (_i615 = 0; _i615 < _size611; ++_i615) { xfer += iprot->readString(this->success[_i615]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -15639,14 +16098,14 @@ (*(this->success)).clear(); uint32_t _size617; ::apache::thrift::protocol::TType _etype620; - iprot->readListBegin(_etype620, _size617); + xfer += iprot->readListBegin(_etype620, _size617); (*(this->success)).resize(_size617); uint32_t _i621; for (_i621 = 0; _i621 < _size617; ++_i621) { xfer += iprot->readString((*(this->success))[_i621]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -15724,12 +16183,15 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->token_owner); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->renewer_kerberos_principal_name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15738,12 +16200,15 @@ uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->token_owner))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->renewer_kerberos_principal_name))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15908,9 +16373,11 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->token_str_form); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -15919,9 +16386,11 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->token_str_form))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16086,9 +16555,11 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->token_str_form); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -16097,9 +16568,11 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->token_str_form))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -20648,37 +21121,11 @@ return; } -bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) { - - ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); - ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - iprot->readMessageBegin(fname, mtype, seqid); - - if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { - iprot->skip(::apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return false; - } - - return process_fn(iprot, oprot, fname, seqid, callContext); -} - -bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { - std::map::iterator pfn; +bool ThriftHiveMetastoreProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; pfn = processMap_.find(fname); if (pfn == processMap_.end()) { - return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid, callContext); + return ::facebook::fb303::FacebookServiceProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext); } (this->*(pfn->second))(seqid, iprot, oprot, callContext); return true; @@ -20687,13 +21134,13 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); } ThriftHiveMetastore_create_database_args args; @@ -20701,8 +21148,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); } ThriftHiveMetastore_create_database_result result; @@ -20718,8 +21165,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -20731,8 +21178,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); } oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -20741,21 +21188,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); } } void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); } ThriftHiveMetastore_get_database_args args; @@ -20763,8 +21210,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); } ThriftHiveMetastore_get_database_result result; @@ -20778,8 +21225,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -20791,8 +21238,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); } oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -20801,21 +21248,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); } ThriftHiveMetastore_drop_database_args args; @@ -20823,8 +21270,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); } ThriftHiveMetastore_drop_database_result result; @@ -20840,8 +21287,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -20853,8 +21300,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); } oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -20863,21 +21310,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); } } void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); } ThriftHiveMetastore_get_databases_args args; @@ -20885,8 +21332,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); } ThriftHiveMetastore_get_databases_result result; @@ -20897,8 +21344,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); } ::apache::thrift::TApplicationException x(e.what()); @@ -20910,8 +21357,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); } oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); @@ -20920,21 +21367,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); } } void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); } ThriftHiveMetastore_get_all_databases_args args; @@ -20942,8 +21389,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); } ThriftHiveMetastore_get_all_databases_result result; @@ -20954,8 +21401,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); } ::apache::thrift::TApplicationException x(e.what()); @@ -20967,8 +21414,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); } oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); @@ -20977,21 +21424,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); } ThriftHiveMetastore_alter_database_args args; @@ -20999,8 +21446,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); } ThriftHiveMetastore_alter_database_result result; @@ -21013,8 +21460,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21026,8 +21473,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); } oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21036,21 +21483,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); } } void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); } ThriftHiveMetastore_get_type_args args; @@ -21058,8 +21505,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); } ThriftHiveMetastore_get_type_result result; @@ -21073,8 +21520,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21086,8 +21533,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); } oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21096,21 +21543,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); } } void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); } ThriftHiveMetastore_create_type_args args; @@ -21118,8 +21565,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); } ThriftHiveMetastore_create_type_result result; @@ -21136,8 +21583,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21149,8 +21596,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); } oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21159,21 +21606,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); } ThriftHiveMetastore_drop_type_args args; @@ -21181,8 +21628,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); } ThriftHiveMetastore_drop_type_result result; @@ -21196,8 +21643,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21209,8 +21656,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); } oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21219,21 +21666,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); } } void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); } ThriftHiveMetastore_get_type_all_args args; @@ -21241,8 +21688,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); } ThriftHiveMetastore_get_type_all_result result; @@ -21253,8 +21700,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21266,8 +21713,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); } oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21276,21 +21723,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); } } void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); } ThriftHiveMetastore_get_fields_args args; @@ -21298,8 +21745,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); } ThriftHiveMetastore_get_fields_result result; @@ -21316,8 +21763,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21329,8 +21776,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); } oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21339,21 +21786,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); } } void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); } ThriftHiveMetastore_get_schema_args args; @@ -21361,8 +21808,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); } ThriftHiveMetastore_get_schema_result result; @@ -21379,8 +21826,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21392,8 +21839,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); } oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21402,21 +21849,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); } } void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); } ThriftHiveMetastore_create_table_args args; @@ -21424,8 +21871,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); } ThriftHiveMetastore_create_table_result result; @@ -21444,8 +21891,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21457,8 +21904,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); } oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21467,21 +21914,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); } } void ThriftHiveMetastoreProcessor::process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } ThriftHiveMetastore_create_table_with_environment_context_args args; @@ -21489,8 +21936,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } ThriftHiveMetastore_create_table_with_environment_context_result result; @@ -21509,8 +21956,8 @@ result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21522,8 +21969,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21532,21 +21979,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); } ThriftHiveMetastore_drop_table_args args; @@ -21554,8 +22001,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); } ThriftHiveMetastore_drop_table_result result; @@ -21568,8 +22015,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21581,8 +22028,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); } oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21591,21 +22038,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); } } void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); } ThriftHiveMetastore_get_tables_args args; @@ -21613,8 +22060,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); } ThriftHiveMetastore_get_tables_result result; @@ -21625,8 +22072,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21638,8 +22085,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); } oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21648,21 +22095,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); } } void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); } ThriftHiveMetastore_get_all_tables_args args; @@ -21670,8 +22117,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } ThriftHiveMetastore_get_all_tables_result result; @@ -21682,8 +22129,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21695,8 +22142,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); } oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21705,21 +22152,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); } ThriftHiveMetastore_get_table_args args; @@ -21727,8 +22174,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); } ThriftHiveMetastore_get_table_result result; @@ -21742,8 +22189,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21755,8 +22202,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); } oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21765,21 +22212,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } ThriftHiveMetastore_get_table_objects_by_name_args args; @@ -21787,8 +22234,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } ThriftHiveMetastore_get_table_objects_by_name_result result; @@ -21805,8 +22252,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21818,8 +22265,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21828,21 +22275,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } ThriftHiveMetastore_get_table_names_by_filter_args args; @@ -21850,8 +22297,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } ThriftHiveMetastore_get_table_names_by_filter_result result; @@ -21868,8 +22315,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21881,8 +22328,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21891,21 +22338,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); } ThriftHiveMetastore_alter_table_args args; @@ -21913,8 +22360,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); } ThriftHiveMetastore_alter_table_result result; @@ -21927,8 +22374,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21940,8 +22387,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); } oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); @@ -21950,21 +22397,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } ThriftHiveMetastore_alter_table_with_environment_context_args args; @@ -21972,8 +22419,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } ThriftHiveMetastore_alter_table_with_environment_context_result result; @@ -21986,8 +22433,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -21999,8 +22446,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22009,21 +22456,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); } ThriftHiveMetastore_add_partition_args args; @@ -22031,8 +22478,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); } ThriftHiveMetastore_add_partition_result result; @@ -22049,8 +22496,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22062,8 +22509,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); } oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22072,21 +22519,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } ThriftHiveMetastore_add_partition_with_environment_context_args args; @@ -22094,8 +22541,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } ThriftHiveMetastore_add_partition_with_environment_context_result result; @@ -22112,8 +22559,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22125,8 +22572,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22135,21 +22582,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); } ThriftHiveMetastore_add_partitions_args args; @@ -22157,8 +22604,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); } ThriftHiveMetastore_add_partitions_result result; @@ -22175,8 +22622,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22188,8 +22635,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); } oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22198,21 +22645,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); } } void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); } ThriftHiveMetastore_append_partition_args args; @@ -22220,8 +22667,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); } ThriftHiveMetastore_append_partition_result result; @@ -22238,8 +22685,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22251,8 +22698,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); } oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22261,21 +22708,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); } ThriftHiveMetastore_append_partition_by_name_args args; @@ -22283,8 +22730,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } ThriftHiveMetastore_append_partition_by_name_result result; @@ -22301,8 +22748,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22314,8 +22761,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); } oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22324,21 +22771,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); } ThriftHiveMetastore_drop_partition_args args; @@ -22346,8 +22793,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); } ThriftHiveMetastore_drop_partition_result result; @@ -22361,8 +22808,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22374,8 +22821,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); } oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22384,21 +22831,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } ThriftHiveMetastore_drop_partition_by_name_args args; @@ -22406,8 +22853,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } ThriftHiveMetastore_drop_partition_by_name_result result; @@ -22421,8 +22868,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22434,8 +22881,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22444,21 +22891,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); } ThriftHiveMetastore_get_partition_args args; @@ -22466,8 +22913,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); } ThriftHiveMetastore_get_partition_result result; @@ -22481,8 +22928,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22494,8 +22941,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); } oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22504,21 +22951,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } ThriftHiveMetastore_get_partition_with_auth_args args; @@ -22526,8 +22973,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } ThriftHiveMetastore_get_partition_with_auth_result result; @@ -22541,8 +22988,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22554,8 +23001,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22564,21 +23011,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); } ThriftHiveMetastore_get_partition_by_name_args args; @@ -22586,8 +23033,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } ThriftHiveMetastore_get_partition_by_name_result result; @@ -22601,8 +23048,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22614,8 +23061,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); } oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22624,21 +23071,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); } ThriftHiveMetastore_get_partitions_args args; @@ -22646,8 +23093,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); } ThriftHiveMetastore_get_partitions_result result; @@ -22661,8 +23108,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22674,8 +23121,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); } oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22684,21 +23131,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } ThriftHiveMetastore_get_partitions_with_auth_args args; @@ -22706,8 +23153,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } ThriftHiveMetastore_get_partitions_with_auth_result result; @@ -22721,8 +23168,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22734,8 +23181,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22744,21 +23191,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); } ThriftHiveMetastore_get_partition_names_args args; @@ -22766,8 +23213,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } ThriftHiveMetastore_get_partition_names_result result; @@ -22778,8 +23225,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22791,8 +23238,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); } oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22801,21 +23248,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); } ThriftHiveMetastore_get_partitions_ps_args args; @@ -22823,8 +23270,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } ThriftHiveMetastore_get_partitions_ps_result result; @@ -22838,8 +23285,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22851,8 +23298,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); } oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22861,21 +23308,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } ThriftHiveMetastore_get_partitions_ps_with_auth_args args; @@ -22883,8 +23330,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } ThriftHiveMetastore_get_partitions_ps_with_auth_result result; @@ -22898,8 +23345,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22911,8 +23358,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22921,21 +23368,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } ThriftHiveMetastore_get_partition_names_ps_args args; @@ -22943,8 +23390,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } ThriftHiveMetastore_get_partition_names_ps_result result; @@ -22958,8 +23405,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } ::apache::thrift::TApplicationException x(e.what()); @@ -22971,8 +23418,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); @@ -22981,21 +23428,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } ThriftHiveMetastore_get_partitions_by_filter_args args; @@ -23003,8 +23450,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } ThriftHiveMetastore_get_partitions_by_filter_result result; @@ -23018,8 +23465,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23031,8 +23478,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23041,21 +23488,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } } void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } ThriftHiveMetastore_get_partitions_by_names_args args; @@ -23063,8 +23510,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } ThriftHiveMetastore_get_partitions_by_names_result result; @@ -23078,8 +23525,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23091,8 +23538,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23101,21 +23548,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); } ThriftHiveMetastore_alter_partition_args args; @@ -23123,8 +23570,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); } ThriftHiveMetastore_alter_partition_result result; @@ -23137,8 +23584,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23150,8 +23597,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); } oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23160,21 +23607,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); } ThriftHiveMetastore_alter_partitions_args args; @@ -23182,8 +23629,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } ThriftHiveMetastore_alter_partitions_result result; @@ -23196,8 +23643,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23209,8 +23656,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); } oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23219,21 +23666,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } ThriftHiveMetastore_alter_partition_with_environment_context_args args; @@ -23241,8 +23688,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } ThriftHiveMetastore_alter_partition_with_environment_context_result result; @@ -23255,8 +23702,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23268,8 +23715,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23278,21 +23725,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } } void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); } ThriftHiveMetastore_rename_partition_args args; @@ -23300,8 +23747,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); } ThriftHiveMetastore_rename_partition_result result; @@ -23314,8 +23761,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23327,8 +23774,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); } oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23337,21 +23784,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); } } void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); } ThriftHiveMetastore_get_config_value_args args; @@ -23359,8 +23806,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); } ThriftHiveMetastore_get_config_value_result result; @@ -23371,8 +23818,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23384,8 +23831,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); } oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23394,21 +23841,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); } } void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } ThriftHiveMetastore_partition_name_to_vals_args args; @@ -23416,8 +23863,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } ThriftHiveMetastore_partition_name_to_vals_result result; @@ -23428,8 +23875,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23441,8 +23888,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23451,21 +23898,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } } void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } ThriftHiveMetastore_partition_name_to_spec_args args; @@ -23473,8 +23920,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } ThriftHiveMetastore_partition_name_to_spec_result result; @@ -23485,8 +23932,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23498,8 +23945,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23508,21 +23955,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } } void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } ThriftHiveMetastore_markPartitionForEvent_args args; @@ -23530,8 +23977,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } ThriftHiveMetastore_markPartitionForEvent_result result; @@ -23556,8 +24003,8 @@ result.o6 = o6; result.__isset.o6 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23569,8 +24016,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23579,21 +24026,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } } void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } ThriftHiveMetastore_isPartitionMarkedForEvent_args args; @@ -23601,8 +24048,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } ThriftHiveMetastore_isPartitionMarkedForEvent_result result; @@ -23628,8 +24075,8 @@ result.o6 = o6; result.__isset.o6 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23641,8 +24088,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23651,21 +24098,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } } void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); } ThriftHiveMetastore_add_index_args args; @@ -23673,8 +24120,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); } ThriftHiveMetastore_add_index_result result; @@ -23691,8 +24138,8 @@ result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23704,8 +24151,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); } oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23714,21 +24161,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); } } void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); } ThriftHiveMetastore_alter_index_args args; @@ -23736,8 +24183,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); } ThriftHiveMetastore_alter_index_result result; @@ -23750,8 +24197,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23763,8 +24210,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); } oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23773,21 +24220,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); } ThriftHiveMetastore_drop_index_by_name_args args; @@ -23795,8 +24242,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } ThriftHiveMetastore_drop_index_by_name_result result; @@ -23810,8 +24257,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23823,8 +24270,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); } oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23833,21 +24280,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); } ThriftHiveMetastore_get_index_by_name_args args; @@ -23855,8 +24302,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } ThriftHiveMetastore_get_index_by_name_result result; @@ -23870,8 +24317,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23883,8 +24330,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); } oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23893,21 +24340,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } } void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); } ThriftHiveMetastore_get_indexes_args args; @@ -23915,8 +24362,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); } ThriftHiveMetastore_get_indexes_result result; @@ -23930,8 +24377,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); } ::apache::thrift::TApplicationException x(e.what()); @@ -23943,8 +24390,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); } oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); @@ -23953,21 +24400,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); } } void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); } ThriftHiveMetastore_get_index_names_args args; @@ -23975,8 +24422,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); } ThriftHiveMetastore_get_index_names_result result; @@ -23987,8 +24434,8 @@ result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24000,8 +24447,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); } oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24010,21 +24457,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); } } void ThriftHiveMetastoreProcessor::process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_role"); } ThriftHiveMetastore_create_role_args args; @@ -24032,8 +24479,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_role", bytes); } ThriftHiveMetastore_create_role_result result; @@ -24044,8 +24491,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24057,8 +24504,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_role"); } oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24067,21 +24514,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_role", bytes); } } void ThriftHiveMetastoreProcessor::process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_role"); } ThriftHiveMetastore_drop_role_args args; @@ -24089,8 +24536,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_role", bytes); } ThriftHiveMetastore_drop_role_result result; @@ -24101,8 +24548,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24114,8 +24561,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_role"); } oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24124,21 +24571,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_role", bytes); } } void ThriftHiveMetastoreProcessor::process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_role_names", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_role_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_names"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_names"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_names"); } ThriftHiveMetastore_get_role_names_args args; @@ -24146,8 +24593,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_names", bytes); } ThriftHiveMetastore_get_role_names_result result; @@ -24158,8 +24605,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_names"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24171,8 +24618,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_names"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_names"); } oprot->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24181,21 +24628,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_role_names", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_role_names", bytes); } } void ThriftHiveMetastoreProcessor::process_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.grant_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_role"); } ThriftHiveMetastore_grant_role_args args; @@ -24203,8 +24650,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_role", bytes); } ThriftHiveMetastore_grant_role_result result; @@ -24215,8 +24662,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24228,8 +24675,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_role"); } oprot->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24238,21 +24685,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_role", bytes); } } void ThriftHiveMetastoreProcessor::process_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.revoke_role", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_role", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_role"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_role"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_role"); } ThriftHiveMetastore_revoke_role_args args; @@ -24260,8 +24707,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_role", bytes); } ThriftHiveMetastore_revoke_role_result result; @@ -24272,8 +24719,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_role"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24285,8 +24732,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_role"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_role"); } oprot->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24295,21 +24742,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_role", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_role", bytes); } } void ThriftHiveMetastoreProcessor::process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.list_roles", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_roles", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.list_roles"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_roles"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_roles"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_roles"); } ThriftHiveMetastore_list_roles_args args; @@ -24317,8 +24764,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_roles", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_roles", bytes); } ThriftHiveMetastore_list_roles_result result; @@ -24329,8 +24776,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_roles"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_roles"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24342,8 +24789,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_roles"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_roles"); } oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24352,21 +24799,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_roles", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_roles", bytes); } } void ThriftHiveMetastoreProcessor::process_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_privilege_set", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_privilege_set", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_privilege_set"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_privilege_set"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_privilege_set"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_privilege_set"); } ThriftHiveMetastore_get_privilege_set_args args; @@ -24374,8 +24821,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); } ThriftHiveMetastore_get_privilege_set_result result; @@ -24386,8 +24833,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_privilege_set"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_privilege_set"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24399,8 +24846,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_privilege_set"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_privilege_set"); } oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24409,21 +24856,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); } } void ThriftHiveMetastoreProcessor::process_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.list_privileges", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_privileges", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.list_privileges"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_privileges"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_privileges"); } ThriftHiveMetastore_list_privileges_args args; @@ -24431,8 +24878,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_privileges", bytes); } ThriftHiveMetastore_list_privileges_result result; @@ -24443,8 +24890,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_privileges"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24456,8 +24903,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_privileges"); } oprot->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24466,21 +24913,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_privileges", bytes); } } void ThriftHiveMetastoreProcessor::process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.grant_privileges", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_privileges", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_privileges"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_privileges"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_privileges"); } ThriftHiveMetastore_grant_privileges_args args; @@ -24488,8 +24935,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_privileges", bytes); } ThriftHiveMetastore_grant_privileges_result result; @@ -24500,8 +24947,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_privileges"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24513,8 +24960,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_privileges"); } oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24523,21 +24970,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_privileges", bytes); } } void ThriftHiveMetastoreProcessor::process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.revoke_privileges", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_privileges", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_privileges"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_privileges"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_privileges"); } ThriftHiveMetastore_revoke_privileges_args args; @@ -24545,8 +24992,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); } ThriftHiveMetastore_revoke_privileges_result result; @@ -24557,8 +25004,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_privileges"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24570,8 +25017,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_privileges"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_privileges"); } oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24580,21 +25027,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); } } void ThriftHiveMetastoreProcessor::process_set_ugi(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.set_ugi", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.set_ugi", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.set_ugi"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.set_ugi"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_ugi"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_ugi"); } ThriftHiveMetastore_set_ugi_args args; @@ -24602,8 +25049,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_ugi", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_ugi", bytes); } ThriftHiveMetastore_set_ugi_result result; @@ -24614,8 +25061,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_ugi"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_ugi"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24627,8 +25074,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_ugi"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_ugi"); } oprot->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24637,21 +25084,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.set_ugi", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.set_ugi", bytes); } } void ThriftHiveMetastoreProcessor::process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_delegation_token", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_delegation_token", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_delegation_token"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_delegation_token"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_delegation_token"); } ThriftHiveMetastore_get_delegation_token_args args; @@ -24659,8 +25106,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); } ThriftHiveMetastore_get_delegation_token_result result; @@ -24671,8 +25118,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_delegation_token"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24684,8 +25131,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_delegation_token"); } oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24694,21 +25141,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); } } void ThriftHiveMetastoreProcessor::process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.renew_delegation_token", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.renew_delegation_token", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.renew_delegation_token"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.renew_delegation_token"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.renew_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.renew_delegation_token"); } ThriftHiveMetastore_renew_delegation_token_args args; @@ -24716,8 +25163,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); } ThriftHiveMetastore_renew_delegation_token_result result; @@ -24728,8 +25175,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.renew_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.renew_delegation_token"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24741,8 +25188,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.renew_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.renew_delegation_token"); } oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24751,21 +25198,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); } } void ThriftHiveMetastoreProcessor::process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.cancel_delegation_token", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cancel_delegation_token", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.cancel_delegation_token"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cancel_delegation_token"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cancel_delegation_token"); } ThriftHiveMetastore_cancel_delegation_token_args args; @@ -24773,8 +25220,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); } ThriftHiveMetastore_cancel_delegation_token_result result; @@ -24784,8 +25231,8 @@ result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cancel_delegation_token"); } ::apache::thrift::TApplicationException x(e.what()); @@ -24797,8 +25244,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token"); } oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); @@ -24807,10 +25254,16 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); } } +::boost::shared_ptr< ::apache::thrift::TProcessor > ThriftHiveMetastoreProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ThriftHiveMetastoreIfFactory > cleanup(handlerFactory_); + ::boost::shared_ptr< ThriftHiveMetastoreIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new ThriftHiveMetastoreProcessor(handler)); + return processor; +} }}} // namespace Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_metastore_types.h" +#include + namespace Apache { namespace Hadoop { namespace Hive { int _kHiveObjectTypeValues[] = { @@ -97,17 +100,27 @@ uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Version"); + xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->version); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->comments); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Version &a, Version &b) { + using ::std::swap; + swap(a.version, b.version); + swap(a.comments, b.comments); + swap(a.__isset, b.__isset); +} + const char* FieldSchema::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271"; const uint8_t FieldSchema::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; @@ -170,20 +183,32 @@ uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("FieldSchema"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->type); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("comment", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->comment); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(FieldSchema &a, FieldSchema &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.type, b.type); + swap(a.comment, b.comment); + swap(a.__isset, b.__isset); +} + const char* Type::ascii_fingerprint = "20DF02DE523C27F7066C7BD4D9120842"; const uint8_t Type::binary_fingerprint[16] = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; @@ -237,14 +262,14 @@ this->fields.clear(); uint32_t _size0; ::apache::thrift::protocol::TType _etype3; - iprot->readListBegin(_etype3, _size0); + xfer += iprot->readListBegin(_etype3, _size0); this->fields.resize(_size0); uint32_t _i4; for (_i4 = 0; _i4 < _size0; ++_i4) { xfer += this->fields[_i4].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.fields = true; } else { @@ -266,9 +291,11 @@ uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Type"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + if (this->__isset.type1) { xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->type1); @@ -297,6 +324,15 @@ return xfer; } +void swap(Type &a, Type &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.type1, b.type1); + swap(a.type2, b.type2); + swap(a.fields, b.fields); + swap(a.__isset, b.__isset); +} + const char* HiveObjectRef::ascii_fingerprint = "205CD8311CF3AA9EC161BAEF8D7C933C"; const uint8_t HiveObjectRef::binary_fingerprint[16] = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C}; @@ -352,14 +388,14 @@ this->partValues.clear(); uint32_t _size7; ::apache::thrift::protocol::TType _etype10; - iprot->readListBegin(_etype10, _size7); + xfer += iprot->readListBegin(_etype10, _size7); this->partValues.resize(_size7); uint32_t _i11; for (_i11 = 0; _i11 < _size7; ++_i11) { xfer += iprot->readString(this->partValues[_i11]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.partValues = true; } else { @@ -389,15 +425,19 @@ uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveObjectRef"); + xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->objectType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->objectName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partValues.size())); @@ -409,14 +449,26 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString(this->columnName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveObjectRef &a, HiveObjectRef &b) { + using ::std::swap; + swap(a.objectType, b.objectType); + swap(a.dbName, b.dbName); + swap(a.objectName, b.objectName); + swap(a.partValues, b.partValues); + swap(a.columnName, b.columnName); + swap(a.__isset, b.__isset); +} + const char* PrivilegeGrantInfo::ascii_fingerprint = "A58923AF7294BE492D6F90E07E8CEE1F"; const uint8_t PrivilegeGrantInfo::binary_fingerprint[16] = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F}; @@ -497,26 +549,42 @@ uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("PrivilegeGrantInfo"); + xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->privilege); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->grantor); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->grantorType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->grantOption); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b) { + using ::std::swap; + swap(a.privilege, b.privilege); + swap(a.createTime, b.createTime); + swap(a.grantor, b.grantor); + swap(a.grantorType, b.grantorType); + swap(a.grantOption, b.grantOption); + swap(a.__isset, b.__isset); +} + const char* HiveObjectPrivilege::ascii_fingerprint = "83D71969B23BD853E29DBA9D43B29AF8"; const uint8_t HiveObjectPrivilege::binary_fingerprint[16] = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8}; @@ -589,23 +657,37 @@ uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveObjectPrivilege"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->hiveObject.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->principalName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->principalType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->grantInfo.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b) { + using ::std::swap; + swap(a.hiveObject, b.hiveObject); + swap(a.principalName, b.principalName); + swap(a.principalType, b.principalType); + swap(a.grantInfo, b.grantInfo); + swap(a.__isset, b.__isset); +} + const char* PrivilegeBag::ascii_fingerprint = "BB89E4701B7B709B046A74C90B1147F2"; const uint8_t PrivilegeBag::binary_fingerprint[16] = {0xBB,0x89,0xE4,0x70,0x1B,0x7B,0x70,0x9B,0x04,0x6A,0x74,0xC9,0x0B,0x11,0x47,0xF2}; @@ -635,14 +717,14 @@ this->privileges.clear(); uint32_t _size15; ::apache::thrift::protocol::TType _etype18; - iprot->readListBegin(_etype18, _size15); + xfer += iprot->readListBegin(_etype18, _size15); this->privileges.resize(_size15); uint32_t _i19; for (_i19 = 0; _i19 < _size15; ++_i19) { xfer += this->privileges[_i19].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.privileges = true; } else { @@ -664,6 +746,7 @@ uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("PrivilegeBag"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->privileges.size())); @@ -675,11 +758,18 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(PrivilegeBag &a, PrivilegeBag &b) { + using ::std::swap; + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* PrincipalPrivilegeSet::ascii_fingerprint = "08F75D2533906EA87BE34EA640856683"; const uint8_t PrincipalPrivilegeSet::binary_fingerprint[16] = {0x08,0xF7,0x5D,0x25,0x33,0x90,0x6E,0xA8,0x7B,0xE3,0x4E,0xA6,0x40,0x85,0x66,0x83}; @@ -710,7 +800,7 @@ uint32_t _size21; ::apache::thrift::protocol::TType _ktype22; ::apache::thrift::protocol::TType _vtype23; - iprot->readMapBegin(_ktype22, _vtype23, _size21); + xfer += iprot->readMapBegin(_ktype22, _vtype23, _size21); uint32_t _i25; for (_i25 = 0; _i25 < _size21; ++_i25) { @@ -721,17 +811,17 @@ _val27.clear(); uint32_t _size28; ::apache::thrift::protocol::TType _etype31; - iprot->readListBegin(_etype31, _size28); + xfer += iprot->readListBegin(_etype31, _size28); _val27.resize(_size28); uint32_t _i32; for (_i32 = 0; _i32 < _size28; ++_i32) { xfer += _val27[_i32].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.userPrivileges = true; } else { @@ -745,7 +835,7 @@ uint32_t _size33; ::apache::thrift::protocol::TType _ktype34; ::apache::thrift::protocol::TType _vtype35; - iprot->readMapBegin(_ktype34, _vtype35, _size33); + xfer += iprot->readMapBegin(_ktype34, _vtype35, _size33); uint32_t _i37; for (_i37 = 0; _i37 < _size33; ++_i37) { @@ -756,17 +846,17 @@ _val39.clear(); uint32_t _size40; ::apache::thrift::protocol::TType _etype43; - iprot->readListBegin(_etype43, _size40); + xfer += iprot->readListBegin(_etype43, _size40); _val39.resize(_size40); uint32_t _i44; for (_i44 = 0; _i44 < _size40; ++_i44) { xfer += _val39[_i44].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.groupPrivileges = true; } else { @@ -780,7 +870,7 @@ uint32_t _size45; ::apache::thrift::protocol::TType _ktype46; ::apache::thrift::protocol::TType _vtype47; - iprot->readMapBegin(_ktype46, _vtype47, _size45); + xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45); uint32_t _i49; for (_i49 = 0; _i49 < _size45; ++_i49) { @@ -791,17 +881,17 @@ _val51.clear(); uint32_t _size52; ::apache::thrift::protocol::TType _etype55; - iprot->readListBegin(_etype55, _size52); + xfer += iprot->readListBegin(_etype55, _size52); _val51.resize(_size52); uint32_t _i56; for (_i56 = 0; _i56 < _size52; ++_i56) { xfer += _val51[_i56].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.rolePrivileges = true; } else { @@ -823,6 +913,7 @@ uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("PrincipalPrivilegeSet"); + xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->userPrivileges.size())); @@ -843,6 +934,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->groupPrivileges.size())); @@ -863,6 +955,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->rolePrivileges.size())); @@ -883,11 +976,20 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b) { + using ::std::swap; + swap(a.userPrivileges, b.userPrivileges); + swap(a.groupPrivileges, b.groupPrivileges); + swap(a.rolePrivileges, b.rolePrivileges); + swap(a.__isset, b.__isset); +} + const char* Role::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; const uint8_t Role::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; @@ -950,20 +1052,32 @@ uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Role"); + xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->roleName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->ownerName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Role &a, Role &b) { + using ::std::swap; + swap(a.roleName, b.roleName); + swap(a.createTime, b.createTime); + swap(a.ownerName, b.ownerName); + swap(a.__isset, b.__isset); +} + const char* Database::ascii_fingerprint = "213967572143E49C9F1A23F7A866E2F5"; const uint8_t Database::binary_fingerprint[16] = {0x21,0x39,0x67,0x57,0x21,0x43,0xE4,0x9C,0x9F,0x1A,0x23,0xF7,0xA8,0x66,0xE2,0xF5}; @@ -1018,7 +1132,7 @@ uint32_t _size63; ::apache::thrift::protocol::TType _ktype64; ::apache::thrift::protocol::TType _vtype65; - iprot->readMapBegin(_ktype64, _vtype65, _size63); + xfer += iprot->readMapBegin(_ktype64, _vtype65, _size63); uint32_t _i67; for (_i67 = 0; _i67 < _size63; ++_i67) { @@ -1027,7 +1141,7 @@ std::string& _val69 = this->parameters[_key68]; xfer += iprot->readString(_val69); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1057,15 +1171,19 @@ uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Database"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->description); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("locationUri", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->locationUri); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1078,6 +1196,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->privileges.write(oprot); @@ -1088,6 +1207,16 @@ return xfer; } +void swap(Database &a, Database &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.description, b.description); + swap(a.locationUri, b.locationUri); + swap(a.parameters, b.parameters); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* SerDeInfo::ascii_fingerprint = "B1021C32A35A2AEFCD2F57A5424159A7"; const uint8_t SerDeInfo::binary_fingerprint[16] = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; @@ -1134,7 +1263,7 @@ uint32_t _size71; ::apache::thrift::protocol::TType _ktype72; ::apache::thrift::protocol::TType _vtype73; - iprot->readMapBegin(_ktype72, _vtype73, _size71); + xfer += iprot->readMapBegin(_ktype72, _vtype73, _size71); uint32_t _i75; for (_i75 = 0; _i75 < _size71; ++_i75) { @@ -1143,7 +1272,7 @@ std::string& _val77 = this->parameters[_key76]; xfer += iprot->readString(_val77); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1165,12 +1294,15 @@ uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("SerDeInfo"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("serializationLib", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->serializationLib); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1183,11 +1315,20 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(SerDeInfo &a, SerDeInfo &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.serializationLib, b.serializationLib); + swap(a.parameters, b.parameters); + swap(a.__isset, b.__isset); +} + const char* Order::ascii_fingerprint = "EEBC915CE44901401D881E6091423036"; const uint8_t Order::binary_fingerprint[16] = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; @@ -1242,17 +1383,27 @@ uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Order"); + xfer += oprot->writeFieldBegin("col", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->col); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("order", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->order); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Order &a, Order &b) { + using ::std::swap; + swap(a.col, b.col); + swap(a.order, b.order); + swap(a.__isset, b.__isset); +} + const char* SkewedInfo::ascii_fingerprint = "4BF2ED84BC3C3EB297A2AE2FA8427EB1"; const uint8_t SkewedInfo::binary_fingerprint[16] = {0x4B,0xF2,0xED,0x84,0xBC,0x3C,0x3E,0xB2,0x97,0xA2,0xAE,0x2F,0xA8,0x42,0x7E,0xB1}; @@ -1282,14 +1433,14 @@ this->skewedColNames.clear(); uint32_t _size79; ::apache::thrift::protocol::TType _etype82; - iprot->readListBegin(_etype82, _size79); + xfer += iprot->readListBegin(_etype82, _size79); this->skewedColNames.resize(_size79); uint32_t _i83; for (_i83 = 0; _i83 < _size79; ++_i83) { xfer += iprot->readString(this->skewedColNames[_i83]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.skewedColNames = true; } else { @@ -1302,7 +1453,7 @@ this->skewedColValues.clear(); uint32_t _size84; ::apache::thrift::protocol::TType _etype87; - iprot->readListBegin(_etype87, _size84); + xfer += iprot->readListBegin(_etype87, _size84); this->skewedColValues.resize(_size84); uint32_t _i88; for (_i88 = 0; _i88 < _size84; ++_i88) @@ -1311,17 +1462,17 @@ this->skewedColValues[_i88].clear(); uint32_t _size89; ::apache::thrift::protocol::TType _etype92; - iprot->readListBegin(_etype92, _size89); + xfer += iprot->readListBegin(_etype92, _size89); this->skewedColValues[_i88].resize(_size89); uint32_t _i93; for (_i93 = 0; _i93 < _size89; ++_i93) { xfer += iprot->readString(this->skewedColValues[_i88][_i93]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.skewedColValues = true; } else { @@ -1335,7 +1486,7 @@ uint32_t _size94; ::apache::thrift::protocol::TType _ktype95; ::apache::thrift::protocol::TType _vtype96; - iprot->readMapBegin(_ktype95, _vtype96, _size94); + xfer += iprot->readMapBegin(_ktype95, _vtype96, _size94); uint32_t _i98; for (_i98 = 0; _i98 < _size94; ++_i98) { @@ -1344,19 +1495,19 @@ _key99.clear(); uint32_t _size101; ::apache::thrift::protocol::TType _etype104; - iprot->readListBegin(_etype104, _size101); + xfer += iprot->readListBegin(_etype104, _size101); _key99.resize(_size101); uint32_t _i105; for (_i105 = 0; _i105 < _size101; ++_i105) { xfer += iprot->readString(_key99[_i105]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } std::string& _val100 = this->skewedColValueLocationMaps[_key99]; xfer += iprot->readString(_val100); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.skewedColValueLocationMaps = true; } else { @@ -1378,6 +1529,7 @@ uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("SkewedInfo"); + xfer += oprot->writeFieldBegin("skewedColNames", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->skewedColNames.size())); @@ -1389,6 +1541,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("skewedColValues", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->skewedColValues.size())); @@ -1408,6 +1561,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("skewedColValueLocationMaps", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_LIST, ::apache::thrift::protocol::T_STRING, static_cast(this->skewedColValueLocationMaps.size())); @@ -1428,11 +1582,20 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(SkewedInfo &a, SkewedInfo &b) { + using ::std::swap; + swap(a.skewedColNames, b.skewedColNames); + swap(a.skewedColValues, b.skewedColValues); + swap(a.skewedColValueLocationMaps, b.skewedColValueLocationMaps); + swap(a.__isset, b.__isset); +} + const char* StorageDescriptor::ascii_fingerprint = "BDC4DB93B74677CE1C04198D60E6CB80"; const uint8_t StorageDescriptor::binary_fingerprint[16] = {0xBD,0xC4,0xDB,0x93,0xB7,0x46,0x77,0xCE,0x1C,0x04,0x19,0x8D,0x60,0xE6,0xCB,0x80}; @@ -1462,14 +1625,14 @@ this->cols.clear(); uint32_t _size111; ::apache::thrift::protocol::TType _etype114; - iprot->readListBegin(_etype114, _size111); + xfer += iprot->readListBegin(_etype114, _size111); this->cols.resize(_size111); uint32_t _i115; for (_i115 = 0; _i115 < _size111; ++_i115) { xfer += this->cols[_i115].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.cols = true; } else { @@ -1530,14 +1693,14 @@ this->bucketCols.clear(); uint32_t _size116; ::apache::thrift::protocol::TType _etype119; - iprot->readListBegin(_etype119, _size116); + xfer += iprot->readListBegin(_etype119, _size116); this->bucketCols.resize(_size116); uint32_t _i120; for (_i120 = 0; _i120 < _size116; ++_i120) { xfer += iprot->readString(this->bucketCols[_i120]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.bucketCols = true; } else { @@ -1550,14 +1713,14 @@ this->sortCols.clear(); uint32_t _size121; ::apache::thrift::protocol::TType _etype124; - iprot->readListBegin(_etype124, _size121); + xfer += iprot->readListBegin(_etype124, _size121); this->sortCols.resize(_size121); uint32_t _i125; for (_i125 = 0; _i125 < _size121; ++_i125) { xfer += this->sortCols[_i125].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.sortCols = true; } else { @@ -1571,7 +1734,7 @@ uint32_t _size126; ::apache::thrift::protocol::TType _ktype127; ::apache::thrift::protocol::TType _vtype128; - iprot->readMapBegin(_ktype127, _vtype128, _size126); + xfer += iprot->readMapBegin(_ktype127, _vtype128, _size126); uint32_t _i130; for (_i130 = 0; _i130 < _size126; ++_i130) { @@ -1580,7 +1743,7 @@ std::string& _val132 = this->parameters[_key131]; xfer += iprot->readString(_val132); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1610,6 +1773,7 @@ uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("StorageDescriptor"); + xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->cols.size())); @@ -1621,24 +1785,31 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("location", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->location); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("inputFormat", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->inputFormat); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("outputFormat", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->outputFormat); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("compressed", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->compressed); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numBuckets", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->numBuckets); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("serdeInfo", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->serdeInfo.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->bucketCols.size())); @@ -1650,6 +1821,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->sortCols.size())); @@ -1661,6 +1833,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1673,6 +1846,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.skewedInfo) { xfer += oprot->writeFieldBegin("skewedInfo", ::apache::thrift::protocol::T_STRUCT, 11); xfer += this->skewedInfo.write(oprot); @@ -1683,6 +1857,22 @@ return xfer; } +void swap(StorageDescriptor &a, StorageDescriptor &b) { + using ::std::swap; + swap(a.cols, b.cols); + swap(a.location, b.location); + swap(a.inputFormat, b.inputFormat); + swap(a.outputFormat, b.outputFormat); + swap(a.compressed, b.compressed); + swap(a.numBuckets, b.numBuckets); + swap(a.serdeInfo, b.serdeInfo); + swap(a.bucketCols, b.bucketCols); + swap(a.sortCols, b.sortCols); + swap(a.parameters, b.parameters); + swap(a.skewedInfo, b.skewedInfo); + swap(a.__isset, b.__isset); +} + const char* Table::ascii_fingerprint = "F21F7F0ACA98ECCFC83F6605440D007F"; const uint8_t Table::binary_fingerprint[16] = {0xF2,0x1F,0x7F,0x0A,0xCA,0x98,0xEC,0xCF,0xC8,0x3F,0x66,0x05,0x44,0x0D,0x00,0x7F}; @@ -1768,14 +1958,14 @@ this->partitionKeys.clear(); uint32_t _size137; ::apache::thrift::protocol::TType _etype140; - iprot->readListBegin(_etype140, _size137); + xfer += iprot->readListBegin(_etype140, _size137); this->partitionKeys.resize(_size137); uint32_t _i141; for (_i141 = 0; _i141 < _size137; ++_i141) { xfer += this->partitionKeys[_i141].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.partitionKeys = true; } else { @@ -1789,7 +1979,7 @@ uint32_t _size142; ::apache::thrift::protocol::TType _ktype143; ::apache::thrift::protocol::TType _vtype144; - iprot->readMapBegin(_ktype143, _vtype144, _size142); + xfer += iprot->readMapBegin(_ktype143, _vtype144, _size142); uint32_t _i146; for (_i146 = 0; _i146 < _size142; ++_i146) { @@ -1798,7 +1988,7 @@ std::string& _val148 = this->parameters[_key147]; xfer += iprot->readString(_val148); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -1852,27 +2042,35 @@ uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Table"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->owner); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("retention", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->retention); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitionKeys.size())); @@ -1884,6 +2082,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -1896,15 +2095,19 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("viewOriginalText", ::apache::thrift::protocol::T_STRING, 10); xfer += oprot->writeString(this->viewOriginalText); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("viewExpandedText", ::apache::thrift::protocol::T_STRING, 11); xfer += oprot->writeString(this->viewExpandedText); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12); xfer += oprot->writeString(this->tableType); xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 13); xfer += this->privileges.write(oprot); @@ -1915,6 +2118,24 @@ return xfer; } +void swap(Table &a, Table &b) { + using ::std::swap; + swap(a.tableName, b.tableName); + swap(a.dbName, b.dbName); + swap(a.owner, b.owner); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.retention, b.retention); + swap(a.sd, b.sd); + swap(a.partitionKeys, b.partitionKeys); + swap(a.parameters, b.parameters); + swap(a.viewOriginalText, b.viewOriginalText); + swap(a.viewExpandedText, b.viewExpandedText); + swap(a.tableType, b.tableType); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* Partition::ascii_fingerprint = "E5EF1F030CF964C052658DD22257D025"; const uint8_t Partition::binary_fingerprint[16] = {0xE5,0xEF,0x1F,0x03,0x0C,0xF9,0x64,0xC0,0x52,0x65,0x8D,0xD2,0x22,0x57,0xD0,0x25}; @@ -1944,14 +2165,14 @@ this->values.clear(); uint32_t _size151; ::apache::thrift::protocol::TType _etype154; - iprot->readListBegin(_etype154, _size151); + xfer += iprot->readListBegin(_etype154, _size151); this->values.resize(_size151); uint32_t _i155; for (_i155 = 0; _i155 < _size151; ++_i155) { xfer += iprot->readString(this->values[_i155]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.values = true; } else { @@ -2005,7 +2226,7 @@ uint32_t _size156; ::apache::thrift::protocol::TType _ktype157; ::apache::thrift::protocol::TType _vtype158; - iprot->readMapBegin(_ktype157, _vtype158, _size156); + xfer += iprot->readMapBegin(_ktype157, _vtype158, _size156); uint32_t _i160; for (_i160 = 0; _i160 < _size156; ++_i160) { @@ -2014,7 +2235,7 @@ std::string& _val162 = this->parameters[_key161]; xfer += iprot->readString(_val162); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -2044,6 +2265,7 @@ uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Partition"); + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); @@ -2055,21 +2277,27 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 6); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -2082,6 +2310,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->privileges.write(oprot); @@ -2092,6 +2321,19 @@ return xfer; } +void swap(Partition &a, Partition &b) { + using ::std::swap; + swap(a.values, b.values); + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.sd, b.sd); + swap(a.parameters, b.parameters); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + const char* Index::ascii_fingerprint = "BA1090E838C806A4F8D8D137C5085EDD"; const uint8_t Index::binary_fingerprint[16] = {0xBA,0x10,0x90,0xE8,0x38,0xC8,0x06,0xA4,0xF8,0xD8,0xD1,0x37,0xC5,0x08,0x5E,0xDD}; @@ -2186,7 +2428,7 @@ uint32_t _size165; ::apache::thrift::protocol::TType _ktype166; ::apache::thrift::protocol::TType _vtype167; - iprot->readMapBegin(_ktype166, _vtype167, _size165); + xfer += iprot->readMapBegin(_ktype166, _vtype167, _size165); uint32_t _i169; for (_i169 = 0; _i169 < _size165; ++_i169) { @@ -2195,7 +2437,7 @@ std::string& _val171 = this->parameters[_key170]; xfer += iprot->readString(_val171); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.parameters = true; } else { @@ -2225,30 +2467,39 @@ uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Index"); + xfer += oprot->writeFieldBegin("indexName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->indexName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("indexHandlerClass", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->indexHandlerClass); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("origTableName", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->origTableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("indexTableName", ::apache::thrift::protocol::T_STRING, 7); xfer += oprot->writeString(this->indexTableName); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); @@ -2261,14 +2512,31 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deferredRebuild", ::apache::thrift::protocol::T_BOOL, 10); xfer += oprot->writeBool(this->deferredRebuild); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Index &a, Index &b) { + using ::std::swap; + swap(a.indexName, b.indexName); + swap(a.indexHandlerClass, b.indexHandlerClass); + swap(a.dbName, b.dbName); + swap(a.origTableName, b.origTableName); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.indexTableName, b.indexTableName); + swap(a.sd, b.sd); + swap(a.parameters, b.parameters); + swap(a.deferredRebuild, b.deferredRebuild); + swap(a.__isset, b.__isset); +} + const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; @@ -2298,14 +2566,14 @@ this->fieldSchemas.clear(); uint32_t _size173; ::apache::thrift::protocol::TType _etype176; - iprot->readListBegin(_etype176, _size173); + xfer += iprot->readListBegin(_etype176, _size173); this->fieldSchemas.resize(_size173); uint32_t _i177; for (_i177 = 0; _i177 < _size173; ++_i177) { xfer += this->fieldSchemas[_i177].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.fieldSchemas = true; } else { @@ -2319,7 +2587,7 @@ uint32_t _size178; ::apache::thrift::protocol::TType _ktype179; ::apache::thrift::protocol::TType _vtype180; - iprot->readMapBegin(_ktype179, _vtype180, _size178); + xfer += iprot->readMapBegin(_ktype179, _vtype180, _size178); uint32_t _i182; for (_i182 = 0; _i182 < _size178; ++_i182) { @@ -2328,7 +2596,7 @@ std::string& _val184 = this->properties[_key183]; xfer += iprot->readString(_val184); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.properties = true; } else { @@ -2350,6 +2618,7 @@ uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Schema"); + xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fieldSchemas.size())); @@ -2361,6 +2630,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); @@ -2373,11 +2643,19 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Schema &a, Schema &b) { + using ::std::swap; + swap(a.fieldSchemas, b.fieldSchemas); + swap(a.properties, b.properties); + swap(a.__isset, b.__isset); +} + const char* EnvironmentContext::ascii_fingerprint = "5EA2D527ECA3BA20C77AFC023EE8C05F"; const uint8_t EnvironmentContext::binary_fingerprint[16] = {0x5E,0xA2,0xD5,0x27,0xEC,0xA3,0xBA,0x20,0xC7,0x7A,0xFC,0x02,0x3E,0xE8,0xC0,0x5F}; @@ -2408,7 +2686,7 @@ uint32_t _size187; ::apache::thrift::protocol::TType _ktype188; ::apache::thrift::protocol::TType _vtype189; - iprot->readMapBegin(_ktype188, _vtype189, _size187); + xfer += iprot->readMapBegin(_ktype188, _vtype189, _size187); uint32_t _i191; for (_i191 = 0; _i191 < _size187; ++_i191) { @@ -2417,7 +2695,7 @@ std::string& _val193 = this->properties[_key192]; xfer += iprot->readString(_val193); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.properties = true; } else { @@ -2439,6 +2717,7 @@ uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("EnvironmentContext"); + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); @@ -2451,11 +2730,18 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(EnvironmentContext &a, EnvironmentContext &b) { + using ::std::swap; + swap(a.properties, b.properties); + swap(a.__isset, b.__isset); +} + const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2502,14 +2788,22 @@ uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("MetaException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(MetaException &a, MetaException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* UnknownTableException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownTableException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2556,14 +2850,22 @@ uint32_t UnknownTableException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownTableException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(UnknownTableException &a, UnknownTableException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* UnknownDBException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownDBException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2610,14 +2912,22 @@ uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownDBException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(UnknownDBException &a, UnknownDBException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* AlreadyExistsException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t AlreadyExistsException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2664,14 +2974,22 @@ uint32_t AlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("AlreadyExistsException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(AlreadyExistsException &a, AlreadyExistsException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidPartitionException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidPartitionException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2718,14 +3036,22 @@ uint32_t InvalidPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidPartitionException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidPartitionException &a, InvalidPartitionException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* UnknownPartitionException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownPartitionException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2772,14 +3098,22 @@ uint32_t UnknownPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownPartitionException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(UnknownPartitionException &a, UnknownPartitionException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidObjectException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidObjectException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2826,14 +3160,22 @@ uint32_t InvalidObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidObjectException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidObjectException &a, InvalidObjectException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* NoSuchObjectException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t NoSuchObjectException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2880,14 +3222,22 @@ uint32_t NoSuchObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("NoSuchObjectException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(NoSuchObjectException &a, NoSuchObjectException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* IndexAlreadyExistsException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t IndexAlreadyExistsException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2934,14 +3284,22 @@ uint32_t IndexAlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("IndexAlreadyExistsException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* InvalidOperationException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidOperationException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -2988,14 +3346,22 @@ uint32_t InvalidOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidOperationException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(InvalidOperationException &a, InvalidOperationException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + const char* ConfigValSecurityException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t ConfigValSecurityException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; @@ -3042,12 +3408,20 @@ uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ConfigValSecurityException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + }}} // namespace Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -1,18 +1,19 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef ThriftHiveMetastore_H #define ThriftHiveMetastore_H -#include +#include #include "hive_metastore_types.h" #include "FacebookService.h" namespace Apache { namespace Hadoop { namespace Hive { -class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf { +class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookServiceIf { public: virtual ~ThriftHiveMetastoreIf() {} virtual void create_database(const Database& database) = 0; @@ -86,8 +87,32 @@ virtual void cancel_delegation_token(const std::string& token_str_form) = 0; }; -class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { +class ThriftHiveMetastoreIfFactory : virtual public ::facebook::fb303::FacebookServiceIfFactory { public: + typedef ThriftHiveMetastoreIf Handler; + + virtual ~ThriftHiveMetastoreIfFactory() {} + + virtual ThriftHiveMetastoreIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) = 0; +}; + +class ThriftHiveMetastoreIfSingletonFactory : virtual public ThriftHiveMetastoreIfFactory { + public: + ThriftHiveMetastoreIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {} + virtual ~ThriftHiveMetastoreIfSingletonFactory() {} + + virtual ThriftHiveMetastoreIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) {} + + protected: + boost::shared_ptr iface_; +}; + +class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public ::facebook::fb303::FacebookServiceNull { + public: virtual ~ThriftHiveMetastoreNull() {} void create_database(const Database& /* database */) { return; @@ -448,7 +473,7 @@ class ThriftHiveMetastore_get_database_args { public: - ThriftHiveMetastore_get_database_args() : name("") { + ThriftHiveMetastore_get_database_args() : name() { } virtual ~ThriftHiveMetastore_get_database_args() throw() {} @@ -578,7 +603,7 @@ class ThriftHiveMetastore_drop_database_args { public: - ThriftHiveMetastore_drop_database_args() : name(""), deleteData(0), cascade(0) { + ThriftHiveMetastore_drop_database_args() : name(), deleteData(0), cascade(0) { } virtual ~ThriftHiveMetastore_drop_database_args() throw() {} @@ -722,7 +747,7 @@ class ThriftHiveMetastore_get_databases_args { public: - ThriftHiveMetastore_get_databases_args() : pattern("") { + ThriftHiveMetastore_get_databases_args() : pattern() { } virtual ~ThriftHiveMetastore_get_databases_args() throw() {} @@ -945,7 +970,7 @@ class ThriftHiveMetastore_alter_database_args { public: - ThriftHiveMetastore_alter_database_args() : dbname("") { + ThriftHiveMetastore_alter_database_args() : dbname() { } virtual ~ThriftHiveMetastore_alter_database_args() throw() {} @@ -1071,7 +1096,7 @@ class ThriftHiveMetastore_get_type_args { public: - ThriftHiveMetastore_get_type_args() : name("") { + ThriftHiveMetastore_get_type_args() : name() { } virtual ~ThriftHiveMetastore_get_type_args() throw() {} @@ -1337,7 +1362,7 @@ class ThriftHiveMetastore_drop_type_args { public: - ThriftHiveMetastore_drop_type_args() : type("") { + ThriftHiveMetastore_drop_type_args() : type() { } virtual ~ThriftHiveMetastore_drop_type_args() throw() {} @@ -1465,7 +1490,7 @@ class ThriftHiveMetastore_get_type_all_args { public: - ThriftHiveMetastore_get_type_all_args() : name("") { + ThriftHiveMetastore_get_type_all_args() : name() { } virtual ~ThriftHiveMetastore_get_type_all_args() throw() {} @@ -1584,7 +1609,7 @@ class ThriftHiveMetastore_get_fields_args { public: - ThriftHiveMetastore_get_fields_args() : db_name(""), table_name("") { + ThriftHiveMetastore_get_fields_args() : db_name(), table_name() { } virtual ~ThriftHiveMetastore_get_fields_args() throw() {} @@ -1731,7 +1756,7 @@ class ThriftHiveMetastore_get_schema_args { public: - ThriftHiveMetastore_get_schema_args() : db_name(""), table_name("") { + ThriftHiveMetastore_get_schema_args() : db_name(), table_name() { } virtual ~ThriftHiveMetastore_get_schema_args() throw() {} @@ -2164,7 +2189,7 @@ class ThriftHiveMetastore_drop_table_args { public: - ThriftHiveMetastore_drop_table_args() : dbname(""), name(""), deleteData(0) { + ThriftHiveMetastore_drop_table_args() : dbname(), name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_table_args() throw() {} @@ -2299,7 +2324,7 @@ class ThriftHiveMetastore_get_tables_args { public: - ThriftHiveMetastore_get_tables_args() : db_name(""), pattern("") { + ThriftHiveMetastore_get_tables_args() : db_name(), pattern() { } virtual ~ThriftHiveMetastore_get_tables_args() throw() {} @@ -2425,7 +2450,7 @@ class ThriftHiveMetastore_get_all_tables_args { public: - ThriftHiveMetastore_get_all_tables_args() : db_name("") { + ThriftHiveMetastore_get_all_tables_args() : db_name() { } virtual ~ThriftHiveMetastore_get_all_tables_args() throw() {} @@ -2544,7 +2569,7 @@ class ThriftHiveMetastore_get_table_args { public: - ThriftHiveMetastore_get_table_args() : dbname(""), tbl_name("") { + ThriftHiveMetastore_get_table_args() : dbname(), tbl_name() { } virtual ~ThriftHiveMetastore_get_table_args() throw() {} @@ -2681,7 +2706,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { public: - ThriftHiveMetastore_get_table_objects_by_name_args() : dbname("") { + ThriftHiveMetastore_get_table_objects_by_name_args() : dbname() { } virtual ~ThriftHiveMetastore_get_table_objects_by_name_args() throw() {} @@ -2820,7 +2845,7 @@ }; typedef struct _ThriftHiveMetastore_get_table_names_by_filter_args__isset { - _ThriftHiveMetastore_get_table_names_by_filter_args__isset() : dbname(false), filter(false), max_tables(false) {} + _ThriftHiveMetastore_get_table_names_by_filter_args__isset() : dbname(false), filter(false), max_tables(true) {} bool dbname; bool filter; bool max_tables; @@ -2829,7 +2854,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { public: - ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(""), filter(""), max_tables(-1) { + ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(), filter(), max_tables(-1) { } virtual ~ThriftHiveMetastore_get_table_names_by_filter_args() throw() {} @@ -2985,7 +3010,7 @@ class ThriftHiveMetastore_alter_table_args { public: - ThriftHiveMetastore_alter_table_args() : dbname(""), tbl_name("") { + ThriftHiveMetastore_alter_table_args() : dbname(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_table_args() throw() {} @@ -3122,7 +3147,7 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { public: - ThriftHiveMetastore_alter_table_with_environment_context_args() : dbname(""), tbl_name("") { + ThriftHiveMetastore_alter_table_with_environment_context_args() : dbname(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_table_with_environment_context_args() throw() {} @@ -3689,7 +3714,7 @@ class ThriftHiveMetastore_append_partition_args { public: - ThriftHiveMetastore_append_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_append_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_append_partition_args() throw() {} @@ -3845,7 +3870,7 @@ class ThriftHiveMetastore_append_partition_by_name_args { public: - ThriftHiveMetastore_append_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { + ThriftHiveMetastore_append_partition_by_name_args() : db_name(), tbl_name(), part_name() { } virtual ~ThriftHiveMetastore_append_partition_by_name_args() throw() {} @@ -4002,7 +4027,7 @@ class ThriftHiveMetastore_drop_partition_args { public: - ThriftHiveMetastore_drop_partition_args() : db_name(""), tbl_name(""), deleteData(0) { + ThriftHiveMetastore_drop_partition_args() : db_name(), tbl_name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_partition_args() throw() {} @@ -4157,7 +4182,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { public: - ThriftHiveMetastore_drop_partition_by_name_args() : db_name(""), tbl_name(""), part_name(""), deleteData(0) { + ThriftHiveMetastore_drop_partition_by_name_args() : db_name(), tbl_name(), part_name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_partition_by_name_args() throw() {} @@ -4311,7 +4336,7 @@ class ThriftHiveMetastore_get_partition_args { public: - ThriftHiveMetastore_get_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_get_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_get_partition_args() throw() {} @@ -4459,7 +4484,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { public: - ThriftHiveMetastore_get_partition_with_auth_args() : db_name(""), tbl_name(""), user_name("") { + ThriftHiveMetastore_get_partition_with_auth_args() : db_name(), tbl_name(), user_name() { } virtual ~ThriftHiveMetastore_get_partition_with_auth_args() throw() {} @@ -4621,7 +4646,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { public: - ThriftHiveMetastore_get_partition_by_name_args() : db_name(""), tbl_name(""), part_name("") { + ThriftHiveMetastore_get_partition_by_name_args() : db_name(), tbl_name(), part_name() { } virtual ~ThriftHiveMetastore_get_partition_by_name_args() throw() {} @@ -4758,7 +4783,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_args__isset { - _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} + _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} bool db_name; bool tbl_name; bool max_parts; @@ -4767,7 +4792,7 @@ class ThriftHiveMetastore_get_partitions_args { public: - ThriftHiveMetastore_get_partitions_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partitions_args() throw() {} @@ -4904,7 +4929,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_with_auth_args__isset { - _ThriftHiveMetastore_get_partitions_with_auth_args__isset() : db_name(false), tbl_name(false), max_parts(false), user_name(false), group_names(false) {} + _ThriftHiveMetastore_get_partitions_with_auth_args__isset() : db_name(false), tbl_name(false), max_parts(true), user_name(false), group_names(false) {} bool db_name; bool tbl_name; bool max_parts; @@ -4915,7 +4940,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { public: - ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(""), tbl_name(""), max_parts(-1), user_name("") { + ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(), tbl_name(), max_parts(-1), user_name() { } virtual ~ThriftHiveMetastore_get_partitions_with_auth_args() throw() {} @@ -5068,7 +5093,7 @@ }; typedef struct _ThriftHiveMetastore_get_partition_names_args__isset { - _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} + _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} bool db_name; bool tbl_name; bool max_parts; @@ -5077,7 +5102,7 @@ class ThriftHiveMetastore_get_partition_names_args { public: - ThriftHiveMetastore_get_partition_names_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partition_names_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partition_names_args() throw() {} @@ -5204,7 +5229,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_ps_args__isset { - _ThriftHiveMetastore_get_partitions_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + _ThriftHiveMetastore_get_partitions_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(true) {} bool db_name; bool tbl_name; bool part_vals; @@ -5214,7 +5239,7 @@ class ThriftHiveMetastore_get_partitions_ps_args { public: - ThriftHiveMetastore_get_partitions_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_ps_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partitions_ps_args() throw() {} @@ -5359,7 +5384,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset { - _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false), user_name(false), group_names(false) {} + _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(true), user_name(false), group_names(false) {} bool db_name; bool tbl_name; bool part_vals; @@ -5371,7 +5396,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { public: - ThriftHiveMetastore_get_partitions_ps_with_auth_args() : db_name(""), tbl_name(""), max_parts(-1), user_name("") { + ThriftHiveMetastore_get_partitions_ps_with_auth_args() : db_name(), tbl_name(), max_parts(-1), user_name() { } virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_args() throw() {} @@ -5532,7 +5557,7 @@ }; typedef struct _ThriftHiveMetastore_get_partition_names_ps_args__isset { - _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(true) {} bool db_name; bool tbl_name; bool part_vals; @@ -5542,7 +5567,7 @@ class ThriftHiveMetastore_get_partition_names_ps_args { public: - ThriftHiveMetastore_get_partition_names_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partition_names_ps_args() : db_name(), tbl_name(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw() {} @@ -5687,7 +5712,7 @@ }; typedef struct _ThriftHiveMetastore_get_partitions_by_filter_args__isset { - _ThriftHiveMetastore_get_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(false) {} + _ThriftHiveMetastore_get_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(true) {} bool db_name; bool tbl_name; bool filter; @@ -5697,7 +5722,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { public: - ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(""), tbl_name(""), filter(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(), tbl_name(), filter(), max_parts(-1) { } virtual ~ThriftHiveMetastore_get_partitions_by_filter_args() throw() {} @@ -5851,7 +5876,7 @@ class ThriftHiveMetastore_get_partitions_by_names_args { public: - ThriftHiveMetastore_get_partitions_by_names_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_get_partitions_by_names_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_get_partitions_by_names_args() throw() {} @@ -5997,7 +6022,7 @@ class ThriftHiveMetastore_alter_partition_args { public: - ThriftHiveMetastore_alter_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_alter_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_partition_args() throw() {} @@ -6133,7 +6158,7 @@ class ThriftHiveMetastore_alter_partitions_args { public: - ThriftHiveMetastore_alter_partitions_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_alter_partitions_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_partitions_args() throw() {} @@ -6270,7 +6295,7 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { public: - ThriftHiveMetastore_alter_partition_with_environment_context_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_alter_partition_with_environment_context_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_args() throw() {} @@ -6415,7 +6440,7 @@ class ThriftHiveMetastore_rename_partition_args { public: - ThriftHiveMetastore_rename_partition_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_rename_partition_args() : db_name(), tbl_name() { } virtual ~ThriftHiveMetastore_rename_partition_args() throw() {} @@ -6558,7 +6583,7 @@ class ThriftHiveMetastore_get_config_value_args { public: - ThriftHiveMetastore_get_config_value_args() : name(""), defaultValue("") { + ThriftHiveMetastore_get_config_value_args() : name(), defaultValue() { } virtual ~ThriftHiveMetastore_get_config_value_args() throw() {} @@ -6618,7 +6643,7 @@ class ThriftHiveMetastore_get_config_value_result { public: - ThriftHiveMetastore_get_config_value_result() : success("") { + ThriftHiveMetastore_get_config_value_result() : success() { } virtual ~ThriftHiveMetastore_get_config_value_result() throw() {} @@ -6684,7 +6709,7 @@ class ThriftHiveMetastore_partition_name_to_vals_args { public: - ThriftHiveMetastore_partition_name_to_vals_args() : part_name("") { + ThriftHiveMetastore_partition_name_to_vals_args() : part_name() { } virtual ~ThriftHiveMetastore_partition_name_to_vals_args() throw() {} @@ -6802,7 +6827,7 @@ class ThriftHiveMetastore_partition_name_to_spec_args { public: - ThriftHiveMetastore_partition_name_to_spec_args() : part_name("") { + ThriftHiveMetastore_partition_name_to_spec_args() : part_name() { } virtual ~ThriftHiveMetastore_partition_name_to_spec_args() throw() {} @@ -6923,7 +6948,7 @@ class ThriftHiveMetastore_markPartitionForEvent_args { public: - ThriftHiveMetastore_markPartitionForEvent_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_markPartitionForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { } virtual ~ThriftHiveMetastore_markPartitionForEvent_args() throw() {} @@ -7108,7 +7133,7 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { public: - ThriftHiveMetastore_isPartitionMarkedForEvent_args() : db_name(""), tbl_name("") { + ThriftHiveMetastore_isPartitionMarkedForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { } virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_args() throw() {} @@ -7450,7 +7475,7 @@ class ThriftHiveMetastore_alter_index_args { public: - ThriftHiveMetastore_alter_index_args() : dbname(""), base_tbl_name(""), idx_name("") { + ThriftHiveMetastore_alter_index_args() : dbname(), base_tbl_name(), idx_name() { } virtual ~ThriftHiveMetastore_alter_index_args() throw() {} @@ -7595,7 +7620,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { public: - ThriftHiveMetastore_drop_index_by_name_args() : db_name(""), tbl_name(""), index_name(""), deleteData(0) { + ThriftHiveMetastore_drop_index_by_name_args() : db_name(), tbl_name(), index_name(), deleteData(0) { } virtual ~ThriftHiveMetastore_drop_index_by_name_args() throw() {} @@ -7749,7 +7774,7 @@ class ThriftHiveMetastore_get_index_by_name_args { public: - ThriftHiveMetastore_get_index_by_name_args() : db_name(""), tbl_name(""), index_name("") { + ThriftHiveMetastore_get_index_by_name_args() : db_name(), tbl_name(), index_name() { } virtual ~ThriftHiveMetastore_get_index_by_name_args() throw() {} @@ -7886,7 +7911,7 @@ }; typedef struct _ThriftHiveMetastore_get_indexes_args__isset { - _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(false) {} + _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} bool db_name; bool tbl_name; bool max_indexes; @@ -7895,7 +7920,7 @@ class ThriftHiveMetastore_get_indexes_args { public: - ThriftHiveMetastore_get_indexes_args() : db_name(""), tbl_name(""), max_indexes(-1) { + ThriftHiveMetastore_get_indexes_args() : db_name(), tbl_name(), max_indexes(-1) { } virtual ~ThriftHiveMetastore_get_indexes_args() throw() {} @@ -8032,7 +8057,7 @@ }; typedef struct _ThriftHiveMetastore_get_index_names_args__isset { - _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(false) {} + _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} bool db_name; bool tbl_name; bool max_indexes; @@ -8041,7 +8066,7 @@ class ThriftHiveMetastore_get_index_names_args { public: - ThriftHiveMetastore_get_index_names_args() : db_name(""), tbl_name(""), max_indexes(-1) { + ThriftHiveMetastore_get_index_names_args() : db_name(), tbl_name(), max_indexes(-1) { } virtual ~ThriftHiveMetastore_get_index_names_args() throw() {} @@ -8293,7 +8318,7 @@ class ThriftHiveMetastore_drop_role_args { public: - ThriftHiveMetastore_drop_role_args() : role_name("") { + ThriftHiveMetastore_drop_role_args() : role_name() { } virtual ~ThriftHiveMetastore_drop_role_args() throw() {} @@ -8520,7 +8545,7 @@ class ThriftHiveMetastore_grant_role_args { public: - ThriftHiveMetastore_grant_role_args() : role_name(""), principal_name(""), grantor(""), grant_option(0) { + ThriftHiveMetastore_grant_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0), grantor(), grantorType((PrincipalType::type)0), grant_option(0) { } virtual ~ThriftHiveMetastore_grant_role_args() throw() {} @@ -8680,7 +8705,7 @@ class ThriftHiveMetastore_revoke_role_args { public: - ThriftHiveMetastore_revoke_role_args() : role_name(""), principal_name("") { + ThriftHiveMetastore_revoke_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0) { } virtual ~ThriftHiveMetastore_revoke_role_args() throw() {} @@ -8815,7 +8840,7 @@ class ThriftHiveMetastore_list_roles_args { public: - ThriftHiveMetastore_list_roles_args() : principal_name("") { + ThriftHiveMetastore_list_roles_args() : principal_name(), principal_type((PrincipalType::type)0) { } virtual ~ThriftHiveMetastore_list_roles_args() throw() {} @@ -8943,7 +8968,7 @@ class ThriftHiveMetastore_get_privilege_set_args { public: - ThriftHiveMetastore_get_privilege_set_args() : user_name("") { + ThriftHiveMetastore_get_privilege_set_args() : user_name() { } virtual ~ThriftHiveMetastore_get_privilege_set_args() throw() {} @@ -9079,7 +9104,7 @@ class ThriftHiveMetastore_list_privileges_args { public: - ThriftHiveMetastore_list_privileges_args() : principal_name("") { + ThriftHiveMetastore_list_privileges_args() : principal_name(), principal_type((PrincipalType::type)0) { } virtual ~ThriftHiveMetastore_list_privileges_args() throw() {} @@ -9450,7 +9475,7 @@ class ThriftHiveMetastore_set_ugi_args { public: - ThriftHiveMetastore_set_ugi_args() : user_name("") { + ThriftHiveMetastore_set_ugi_args() : user_name() { } virtual ~ThriftHiveMetastore_set_ugi_args() throw() {} @@ -9577,7 +9602,7 @@ class ThriftHiveMetastore_get_delegation_token_args { public: - ThriftHiveMetastore_get_delegation_token_args() : token_owner(""), renewer_kerberos_principal_name("") { + ThriftHiveMetastore_get_delegation_token_args() : token_owner(), renewer_kerberos_principal_name() { } virtual ~ThriftHiveMetastore_get_delegation_token_args() throw() {} @@ -9637,7 +9662,7 @@ class ThriftHiveMetastore_get_delegation_token_result { public: - ThriftHiveMetastore_get_delegation_token_result() : success("") { + ThriftHiveMetastore_get_delegation_token_result() : success() { } virtual ~ThriftHiveMetastore_get_delegation_token_result() throw() {} @@ -9703,7 +9728,7 @@ class ThriftHiveMetastore_renew_delegation_token_args { public: - ThriftHiveMetastore_renew_delegation_token_args() : token_str_form("") { + ThriftHiveMetastore_renew_delegation_token_args() : token_str_form() { } virtual ~ThriftHiveMetastore_renew_delegation_token_args() throw() {} @@ -9821,7 +9846,7 @@ class ThriftHiveMetastore_cancel_delegation_token_args { public: - ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form("") { + ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form() { } virtual ~ThriftHiveMetastore_cancel_delegation_token_args() throw() {} @@ -9921,12 +9946,12 @@ }; -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { +class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceClient { public: ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : - facebook::fb303::FacebookServiceClient(prot, prot) {} + ::facebook::fb303::FacebookServiceClient(prot, prot) {} ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : - facebook::fb303::FacebookServiceClient(iprot, oprot) {} + ::facebook::fb303::FacebookServiceClient(iprot, oprot) {} boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } @@ -10142,12 +10167,14 @@ void recv_cancel_delegation_token(); }; -class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { +class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceProcessor { protected: boost::shared_ptr iface_; - virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext); + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); private: - std::map processMap_; + typedef void (ThriftHiveMetastoreProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; void process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -10219,7 +10246,7 @@ void process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : - facebook::fb303::FacebookServiceProcessor(iface), + ::facebook::fb303::FacebookServiceProcessor(iface), iface_(iface) { processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; @@ -10292,16 +10319,26 @@ processMap_["cancel_delegation_token"] = &ThriftHiveMetastoreProcessor::process_cancel_delegation_token; } - virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext); virtual ~ThriftHiveMetastoreProcessor() {} }; -class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceMultiface { +class ThriftHiveMetastoreProcessorFactory : public ::apache::thrift::TProcessorFactory { public: + ThriftHiveMetastoreProcessorFactory(const ::boost::shared_ptr< ThriftHiveMetastoreIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::boost::shared_ptr< ThriftHiveMetastoreIfFactory > handlerFactory_; +}; + +class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceMultiface { + public: ThriftHiveMetastoreMultiface(std::vector >& ifaces) : ifaces_(ifaces) { std::vector >::iterator iter; for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { - facebook::fb303::FacebookServiceMultiface::add(*iter); + ::facebook::fb303::FacebookServiceMultiface::add(*iter); } } virtual ~ThriftHiveMetastoreMultiface() {} @@ -10309,747 +10346,669 @@ std::vector > ifaces_; ThriftHiveMetastoreMultiface() {} void add(boost::shared_ptr iface) { - facebook::fb303::FacebookServiceMultiface::add(iface); + ::facebook::fb303::FacebookServiceMultiface::add(iface); ifaces_.push_back(iface); } public: void create_database(const Database& database) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->create_database(database); } + ifaces_[i]->create_database(database); } void get_database(Database& _return, const std::string& name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_database(_return, name); - return; - } else { - ifaces_[i]->get_database(_return, name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_database(_return, name); } + ifaces_[i]->get_database(_return, name); + return; } void drop_database(const std::string& name, const bool deleteData, const bool cascade) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->drop_database(name, deleteData, cascade); } + ifaces_[i]->drop_database(name, deleteData, cascade); } void get_databases(std::vector & _return, const std::string& pattern) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_databases(_return, pattern); - return; - } else { - ifaces_[i]->get_databases(_return, pattern); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_databases(_return, pattern); } + ifaces_[i]->get_databases(_return, pattern); + return; } void get_all_databases(std::vector & _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_all_databases(_return); - return; - } else { - ifaces_[i]->get_all_databases(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_databases(_return); } + ifaces_[i]->get_all_databases(_return); + return; } void alter_database(const std::string& dbname, const Database& db) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_database(dbname, db); } + ifaces_[i]->alter_database(dbname, db); } void get_type(Type& _return, const std::string& name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_type(_return, name); - return; - } else { - ifaces_[i]->get_type(_return, name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_type(_return, name); } + ifaces_[i]->get_type(_return, name); + return; } bool create_type(const Type& type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->create_type(type); - } else { - ifaces_[i]->create_type(type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_type(type); } + return ifaces_[i]->create_type(type); } bool drop_type(const std::string& type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_type(type); - } else { - ifaces_[i]->drop_type(type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_type(type); } + return ifaces_[i]->drop_type(type); } void get_type_all(std::map & _return, const std::string& name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_type_all(_return, name); - return; - } else { - ifaces_[i]->get_type_all(_return, name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_type_all(_return, name); } + ifaces_[i]->get_type_all(_return, name); + return; } void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_fields(_return, db_name, table_name); - return; - } else { - ifaces_[i]->get_fields(_return, db_name, table_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_fields(_return, db_name, table_name); } + ifaces_[i]->get_fields(_return, db_name, table_name); + return; } void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_schema(_return, db_name, table_name); - return; - } else { - ifaces_[i]->get_schema(_return, db_name, table_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_schema(_return, db_name, table_name); } + ifaces_[i]->get_schema(_return, db_name, table_name); + return; } void create_table(const Table& tbl) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->create_table(tbl); } + ifaces_[i]->create_table(tbl); } void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->create_table_with_environment_context(tbl, environment_context); } + ifaces_[i]->create_table_with_environment_context(tbl, environment_context); } void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->drop_table(dbname, name, deleteData); } + ifaces_[i]->drop_table(dbname, name, deleteData); } void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_tables(_return, db_name, pattern); - return; - } else { - ifaces_[i]->get_tables(_return, db_name, pattern); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_tables(_return, db_name, pattern); } + ifaces_[i]->get_tables(_return, db_name, pattern); + return; } void get_all_tables(std::vector & _return, const std::string& db_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_all_tables(_return, db_name); - return; - } else { - ifaces_[i]->get_all_tables(_return, db_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_tables(_return, db_name); } + ifaces_[i]->get_all_tables(_return, db_name); + return; } void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table(_return, dbname, tbl_name); - return; - } else { - ifaces_[i]->get_table(_return, dbname, tbl_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table(_return, dbname, tbl_name); } + ifaces_[i]->get_table(_return, dbname, tbl_name); + return; } void get_table_objects_by_name(std::vector & _return, const std::string& dbname, const std::vector & tbl_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); - return; - } else { - ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); } + ifaces_[i]->get_table_objects_by_name(_return, dbname, tbl_names); + return; } void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); - return; - } else { - ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); } + ifaces_[i]->get_table_names_by_filter(_return, dbname, filter, max_tables); + return; } void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_table(dbname, tbl_name, new_tbl); } + ifaces_[i]->alter_table(dbname, tbl_name, new_tbl); } void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); } + ifaces_[i]->alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); } void add_partition(Partition& _return, const Partition& new_part) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_partition(_return, new_part); - return; - } else { - ifaces_[i]->add_partition(_return, new_part); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partition(_return, new_part); } + ifaces_[i]->add_partition(_return, new_part); + return; } void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); - return; - } else { - ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); } + ifaces_[i]->add_partition_with_environment_context(_return, new_part, environment_context); + return; } int32_t add_partitions(const std::vector & new_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->add_partitions(new_parts); - } else { - ifaces_[i]->add_partitions(new_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partitions(new_parts); } + return ifaces_[i]->add_partitions(new_parts); } void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); - return; - } else { - ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); } + ifaces_[i]->append_partition(_return, db_name, tbl_name, part_vals); + return; } void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); - return; - } else { - ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); } + ifaces_[i]->append_partition_by_name(_return, db_name, tbl_name, part_name); + return; } bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); - } else { - ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); } + return ifaces_[i]->drop_partition(db_name, tbl_name, part_vals, deleteData); } bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - } else { - ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); } + return ifaces_[i]->drop_partition_by_name(db_name, tbl_name, part_name, deleteData); } void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); - return; - } else { - ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); } + ifaces_[i]->get_partition(_return, db_name, tbl_name, part_vals); + return; } void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); - return; - } else { - ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); } + ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); + return; } void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); - return; - } else { - ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); } + ifaces_[i]->get_partition_by_name(_return, db_name, tbl_name, part_name); + return; } void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); - return; - } else { - ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); } + ifaces_[i]->get_partitions(_return, db_name, tbl_name, max_parts); + return; } void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); - return; - } else { - ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); } + ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); + return; } void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); - return; - } else { - ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); } + ifaces_[i]->get_partition_names(_return, db_name, tbl_name, max_parts); + return; } void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); - return; - } else { - ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); } + ifaces_[i]->get_partitions_ps(_return, db_name, tbl_name, part_vals, max_parts); + return; } void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); - return; - } else { - ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); } + ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); + return; } void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); - return; - } else { - ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); } + ifaces_[i]->get_partition_names_ps(_return, db_name, tbl_name, part_vals, max_parts); + return; } void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); - return; - } else { - ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); } + ifaces_[i]->get_partitions_by_filter(_return, db_name, tbl_name, filter, max_parts); + return; } void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); - return; - } else { - ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); } + ifaces_[i]->get_partitions_by_names(_return, db_name, tbl_name, names); + return; } void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_partition(db_name, tbl_name, new_part); } + ifaces_[i]->alter_partition(db_name, tbl_name, new_part); } void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_partitions(db_name, tbl_name, new_parts); } + ifaces_[i]->alter_partitions(db_name, tbl_name, new_parts); } void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); } + ifaces_[i]->alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); } void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->rename_partition(db_name, tbl_name, part_vals, new_part); } + ifaces_[i]->rename_partition(db_name, tbl_name, part_vals, new_part); } void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_config_value(_return, name, defaultValue); - return; - } else { - ifaces_[i]->get_config_value(_return, name, defaultValue); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_config_value(_return, name, defaultValue); } + ifaces_[i]->get_config_value(_return, name, defaultValue); + return; } void partition_name_to_vals(std::vector & _return, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->partition_name_to_vals(_return, part_name); - return; - } else { - ifaces_[i]->partition_name_to_vals(_return, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->partition_name_to_vals(_return, part_name); } + ifaces_[i]->partition_name_to_vals(_return, part_name); + return; } void partition_name_to_spec(std::map & _return, const std::string& part_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->partition_name_to_spec(_return, part_name); - return; - } else { - ifaces_[i]->partition_name_to_spec(_return, part_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->partition_name_to_spec(_return, part_name); } + ifaces_[i]->partition_name_to_spec(_return, part_name); + return; } void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->markPartitionForEvent(db_name, tbl_name, part_vals, eventType); } + ifaces_[i]->markPartitionForEvent(db_name, tbl_name, part_vals, eventType); } bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - } else { - ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); } + return ifaces_[i]->isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); } void add_index(Index& _return, const Index& new_index, const Table& index_table) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->add_index(_return, new_index, index_table); - return; - } else { - ifaces_[i]->add_index(_return, new_index, index_table); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_index(_return, new_index, index_table); } + ifaces_[i]->add_index(_return, new_index, index_table); + return; } void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->alter_index(dbname, base_tbl_name, idx_name, new_idx); } + ifaces_[i]->alter_index(dbname, base_tbl_name, idx_name, new_idx); } bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); - } else { - ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); } + return ifaces_[i]->drop_index_by_name(db_name, tbl_name, index_name, deleteData); } void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); - return; - } else { - ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); } + ifaces_[i]->get_index_by_name(_return, db_name, tbl_name, index_name); + return; } void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); - return; - } else { - ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); } + ifaces_[i]->get_indexes(_return, db_name, tbl_name, max_indexes); + return; } void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); - return; - } else { - ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); } + ifaces_[i]->get_index_names(_return, db_name, tbl_name, max_indexes); + return; } bool create_role(const Role& role) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->create_role(role); - } else { - ifaces_[i]->create_role(role); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_role(role); } + return ifaces_[i]->create_role(role); } bool drop_role(const std::string& role_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->drop_role(role_name); - } else { - ifaces_[i]->drop_role(role_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_role(role_name); } + return ifaces_[i]->drop_role(role_name); } void get_role_names(std::vector & _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_role_names(_return); - return; - } else { - ifaces_[i]->get_role_names(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_role_names(_return); } + ifaces_[i]->get_role_names(_return); + return; } bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - } else { - ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); } + return ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); } bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->revoke_role(role_name, principal_name, principal_type); - } else { - ifaces_[i]->revoke_role(role_name, principal_name, principal_type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revoke_role(role_name, principal_name, principal_type); } + return ifaces_[i]->revoke_role(role_name, principal_name, principal_type); } void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->list_roles(_return, principal_name, principal_type); - return; - } else { - ifaces_[i]->list_roles(_return, principal_name, principal_type); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->list_roles(_return, principal_name, principal_type); } + ifaces_[i]->list_roles(_return, principal_name, principal_type); + return; } void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); - return; - } else { - ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); } + ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); + return; } void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); - return; - } else { - ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); } + ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); + return; } bool grant_privileges(const PrivilegeBag& privileges) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->grant_privileges(privileges); - } else { - ifaces_[i]->grant_privileges(privileges); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_privileges(privileges); } + return ifaces_[i]->grant_privileges(privileges); } bool revoke_privileges(const PrivilegeBag& privileges) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->revoke_privileges(privileges); - } else { - ifaces_[i]->revoke_privileges(privileges); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revoke_privileges(privileges); } + return ifaces_[i]->revoke_privileges(privileges); } void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->set_ugi(_return, user_name, group_names); - return; - } else { - ifaces_[i]->set_ugi(_return, user_name, group_names); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->set_ugi(_return, user_name, group_names); } + ifaces_[i]->set_ugi(_return, user_name, group_names); + return; } void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); - return; - } else { - ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); } + ifaces_[i]->get_delegation_token(_return, token_owner, renewer_kerberos_principal_name); + return; } int64_t renew_delegation_token(const std::string& token_str_form) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->renew_delegation_token(token_str_form); - } else { - ifaces_[i]->renew_delegation_token(token_str_form); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->renew_delegation_token(token_str_form); } + return ifaces_[i]->renew_delegation_token(token_str_form); } void cancel_delegation_token(const std::string& token_str_form) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->cancel_delegation_token(token_str_form); } + ifaces_[i]->cancel_delegation_token(token_str_form); } }; Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_metastore_TYPES_H #define hive_metastore_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include #include "fb303_types.h" @@ -58,7 +59,7 @@ static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972"; static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72}; - Version() : version(""), comments("") { + Version() : version(), comments() { } virtual ~Version() throw() {} @@ -95,6 +96,8 @@ }; +void swap(Version &a, Version &b); + typedef struct _FieldSchema__isset { _FieldSchema__isset() : name(false), type(false), comment(false) {} bool name; @@ -108,7 +111,7 @@ static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; - FieldSchema() : name(""), type(""), comment("") { + FieldSchema() : name(), type(), comment() { } virtual ~FieldSchema() throw() {} @@ -152,6 +155,8 @@ }; +void swap(FieldSchema &a, FieldSchema &b); + typedef struct _Type__isset { _Type__isset() : name(false), type1(false), type2(false), fields(false) {} bool name; @@ -166,7 +171,7 @@ static const char* ascii_fingerprint; // = "20DF02DE523C27F7066C7BD4D9120842"; static const uint8_t binary_fingerprint[16]; // = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; - Type() : name(""), type1(""), type2("") { + Type() : name(), type1(), type2() { } virtual ~Type() throw() {} @@ -226,6 +231,8 @@ }; +void swap(Type &a, Type &b); + typedef struct _HiveObjectRef__isset { _HiveObjectRef__isset() : objectType(false), dbName(false), objectName(false), partValues(false), columnName(false) {} bool objectType; @@ -241,7 +248,7 @@ static const char* ascii_fingerprint; // = "205CD8311CF3AA9EC161BAEF8D7C933C"; static const uint8_t binary_fingerprint[16]; // = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C}; - HiveObjectRef() : dbName(""), objectName(""), columnName("") { + HiveObjectRef() : objectType((HiveObjectType::type)0), dbName(), objectName(), columnName() { } virtual ~HiveObjectRef() throw() {} @@ -299,6 +306,8 @@ }; +void swap(HiveObjectRef &a, HiveObjectRef &b); + typedef struct _PrivilegeGrantInfo__isset { _PrivilegeGrantInfo__isset() : privilege(false), createTime(false), grantor(false), grantorType(false), grantOption(false) {} bool privilege; @@ -314,7 +323,7 @@ static const char* ascii_fingerprint; // = "A58923AF7294BE492D6F90E07E8CEE1F"; static const uint8_t binary_fingerprint[16]; // = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F}; - PrivilegeGrantInfo() : privilege(""), createTime(0), grantor(""), grantOption(0) { + PrivilegeGrantInfo() : privilege(), createTime(0), grantor(), grantorType((PrincipalType::type)0), grantOption(0) { } virtual ~PrivilegeGrantInfo() throw() {} @@ -372,6 +381,8 @@ }; +void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b); + typedef struct _HiveObjectPrivilege__isset { _HiveObjectPrivilege__isset() : hiveObject(false), principalName(false), principalType(false), grantInfo(false) {} bool hiveObject; @@ -386,7 +397,7 @@ static const char* ascii_fingerprint; // = "83D71969B23BD853E29DBA9D43B29AF8"; static const uint8_t binary_fingerprint[16]; // = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8}; - HiveObjectPrivilege() : principalName("") { + HiveObjectPrivilege() : principalName(), principalType((PrincipalType::type)0) { } virtual ~HiveObjectPrivilege() throw() {} @@ -437,6 +448,8 @@ }; +void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b); + typedef struct _PrivilegeBag__isset { _PrivilegeBag__isset() : privileges(false) {} bool privileges; @@ -478,6 +491,8 @@ }; +void swap(PrivilegeBag &a, PrivilegeBag &b); + typedef struct _PrincipalPrivilegeSet__isset { _PrincipalPrivilegeSet__isset() : userPrivileges(false), groupPrivileges(false), rolePrivileges(false) {} bool userPrivileges; @@ -535,6 +550,8 @@ }; +void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b); + typedef struct _Role__isset { _Role__isset() : roleName(false), createTime(false), ownerName(false) {} bool roleName; @@ -548,7 +565,7 @@ static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; - Role() : roleName(""), createTime(0), ownerName("") { + Role() : roleName(), createTime(0), ownerName() { } virtual ~Role() throw() {} @@ -592,6 +609,8 @@ }; +void swap(Role &a, Role &b); + typedef struct _Database__isset { _Database__isset() : name(false), description(false), locationUri(false), parameters(false), privileges(false) {} bool name; @@ -607,7 +626,7 @@ static const char* ascii_fingerprint; // = "213967572143E49C9F1A23F7A866E2F5"; static const uint8_t binary_fingerprint[16]; // = {0x21,0x39,0x67,0x57,0x21,0x43,0xE4,0x9C,0x9F,0x1A,0x23,0xF7,0xA8,0x66,0xE2,0xF5}; - Database() : name(""), description(""), locationUri("") { + Database() : name(), description(), locationUri() { } virtual ~Database() throw() {} @@ -668,6 +687,8 @@ }; +void swap(Database &a, Database &b); + typedef struct _SerDeInfo__isset { _SerDeInfo__isset() : name(false), serializationLib(false), parameters(false) {} bool name; @@ -681,7 +702,7 @@ static const char* ascii_fingerprint; // = "B1021C32A35A2AEFCD2F57A5424159A7"; static const uint8_t binary_fingerprint[16]; // = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; - SerDeInfo() : name(""), serializationLib("") { + SerDeInfo() : name(), serializationLib() { } virtual ~SerDeInfo() throw() {} @@ -725,6 +746,8 @@ }; +void swap(SerDeInfo &a, SerDeInfo &b); + typedef struct _Order__isset { _Order__isset() : col(false), order(false) {} bool col; @@ -737,7 +760,7 @@ static const char* ascii_fingerprint; // = "EEBC915CE44901401D881E6091423036"; static const uint8_t binary_fingerprint[16]; // = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; - Order() : col(""), order(0) { + Order() : col(), order(0) { } virtual ~Order() throw() {} @@ -774,6 +797,8 @@ }; +void swap(Order &a, Order &b); + typedef struct _SkewedInfo__isset { _SkewedInfo__isset() : skewedColNames(false), skewedColValues(false), skewedColValueLocationMaps(false) {} bool skewedColNames; @@ -831,6 +856,8 @@ }; +void swap(SkewedInfo &a, SkewedInfo &b); + typedef struct _StorageDescriptor__isset { _StorageDescriptor__isset() : cols(false), location(false), inputFormat(false), outputFormat(false), compressed(false), numBuckets(false), serdeInfo(false), bucketCols(false), sortCols(false), parameters(false), skewedInfo(false) {} bool cols; @@ -852,7 +879,7 @@ static const char* ascii_fingerprint; // = "BDC4DB93B74677CE1C04198D60E6CB80"; static const uint8_t binary_fingerprint[16]; // = {0xBD,0xC4,0xDB,0x93,0xB7,0x46,0x77,0xCE,0x1C,0x04,0x19,0x8D,0x60,0xE6,0xCB,0x80}; - StorageDescriptor() : location(""), inputFormat(""), outputFormat(""), compressed(0), numBuckets(0) { + StorageDescriptor() : location(), inputFormat(), outputFormat(), compressed(0), numBuckets(0) { } virtual ~StorageDescriptor() throw() {} @@ -955,6 +982,8 @@ }; +void swap(StorageDescriptor &a, StorageDescriptor &b); + typedef struct _Table__isset { _Table__isset() : tableName(false), dbName(false), owner(false), createTime(false), lastAccessTime(false), retention(false), sd(false), partitionKeys(false), parameters(false), viewOriginalText(false), viewExpandedText(false), tableType(false), privileges(false) {} bool tableName; @@ -978,7 +1007,7 @@ static const char* ascii_fingerprint; // = "F21F7F0ACA98ECCFC83F6605440D007F"; static const uint8_t binary_fingerprint[16]; // = {0xF2,0x1F,0x7F,0x0A,0xCA,0x98,0xEC,0xCF,0xC8,0x3F,0x66,0x05,0x44,0x0D,0x00,0x7F}; - Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { + Table() : tableName(), dbName(), owner(), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(), viewExpandedText(), tableType() { } virtual ~Table() throw() {} @@ -1095,6 +1124,8 @@ }; +void swap(Table &a, Table &b); + typedef struct _Partition__isset { _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false), privileges(false) {} bool values; @@ -1113,7 +1144,7 @@ static const char* ascii_fingerprint; // = "E5EF1F030CF964C052658DD22257D025"; static const uint8_t binary_fingerprint[16]; // = {0xE5,0xEF,0x1F,0x03,0x0C,0xF9,0x64,0xC0,0x52,0x65,0x8D,0xD2,0x22,0x57,0xD0,0x25}; - Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { + Partition() : dbName(), tableName(), createTime(0), lastAccessTime(0) { } virtual ~Partition() throw() {} @@ -1195,6 +1226,8 @@ }; +void swap(Partition &a, Partition &b); + typedef struct _Index__isset { _Index__isset() : indexName(false), indexHandlerClass(false), dbName(false), origTableName(false), createTime(false), lastAccessTime(false), indexTableName(false), sd(false), parameters(false), deferredRebuild(false) {} bool indexName; @@ -1215,7 +1248,7 @@ static const char* ascii_fingerprint; // = "BA1090E838C806A4F8D8D137C5085EDD"; static const uint8_t binary_fingerprint[16]; // = {0xBA,0x10,0x90,0xE8,0x38,0xC8,0x06,0xA4,0xF8,0xD8,0xD1,0x37,0xC5,0x08,0x5E,0xDD}; - Index() : indexName(""), indexHandlerClass(""), dbName(""), origTableName(""), createTime(0), lastAccessTime(0), indexTableName(""), deferredRebuild(0) { + Index() : indexName(), indexHandlerClass(), dbName(), origTableName(), createTime(0), lastAccessTime(0), indexTableName(), deferredRebuild(0) { } virtual ~Index() throw() {} @@ -1308,6 +1341,8 @@ }; +void swap(Index &a, Index &b); + typedef struct _Schema__isset { _Schema__isset() : fieldSchemas(false), properties(false) {} bool fieldSchemas; @@ -1357,6 +1392,8 @@ }; +void swap(Schema &a, Schema &b); + typedef struct _EnvironmentContext__isset { _EnvironmentContext__isset() : properties(false) {} bool properties; @@ -1398,6 +1435,8 @@ }; +void swap(EnvironmentContext &a, EnvironmentContext &b); + typedef struct _MetaException__isset { _MetaException__isset() : message(false) {} bool message; @@ -1409,7 +1448,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - MetaException() : message("") { + MetaException() : message() { } virtual ~MetaException() throw() {} @@ -1439,6 +1478,8 @@ }; +void swap(MetaException &a, MetaException &b); + typedef struct _UnknownTableException__isset { _UnknownTableException__isset() : message(false) {} bool message; @@ -1450,7 +1491,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - UnknownTableException() : message("") { + UnknownTableException() : message() { } virtual ~UnknownTableException() throw() {} @@ -1480,6 +1521,8 @@ }; +void swap(UnknownTableException &a, UnknownTableException &b); + typedef struct _UnknownDBException__isset { _UnknownDBException__isset() : message(false) {} bool message; @@ -1491,7 +1534,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - UnknownDBException() : message("") { + UnknownDBException() : message() { } virtual ~UnknownDBException() throw() {} @@ -1521,6 +1564,8 @@ }; +void swap(UnknownDBException &a, UnknownDBException &b); + typedef struct _AlreadyExistsException__isset { _AlreadyExistsException__isset() : message(false) {} bool message; @@ -1532,7 +1577,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - AlreadyExistsException() : message("") { + AlreadyExistsException() : message() { } virtual ~AlreadyExistsException() throw() {} @@ -1562,6 +1607,8 @@ }; +void swap(AlreadyExistsException &a, AlreadyExistsException &b); + typedef struct _InvalidPartitionException__isset { _InvalidPartitionException__isset() : message(false) {} bool message; @@ -1573,7 +1620,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidPartitionException() : message("") { + InvalidPartitionException() : message() { } virtual ~InvalidPartitionException() throw() {} @@ -1603,6 +1650,8 @@ }; +void swap(InvalidPartitionException &a, InvalidPartitionException &b); + typedef struct _UnknownPartitionException__isset { _UnknownPartitionException__isset() : message(false) {} bool message; @@ -1614,7 +1663,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - UnknownPartitionException() : message("") { + UnknownPartitionException() : message() { } virtual ~UnknownPartitionException() throw() {} @@ -1644,6 +1693,8 @@ }; +void swap(UnknownPartitionException &a, UnknownPartitionException &b); + typedef struct _InvalidObjectException__isset { _InvalidObjectException__isset() : message(false) {} bool message; @@ -1655,7 +1706,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidObjectException() : message("") { + InvalidObjectException() : message() { } virtual ~InvalidObjectException() throw() {} @@ -1685,6 +1736,8 @@ }; +void swap(InvalidObjectException &a, InvalidObjectException &b); + typedef struct _NoSuchObjectException__isset { _NoSuchObjectException__isset() : message(false) {} bool message; @@ -1696,7 +1749,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - NoSuchObjectException() : message("") { + NoSuchObjectException() : message() { } virtual ~NoSuchObjectException() throw() {} @@ -1726,6 +1779,8 @@ }; +void swap(NoSuchObjectException &a, NoSuchObjectException &b); + typedef struct _IndexAlreadyExistsException__isset { _IndexAlreadyExistsException__isset() : message(false) {} bool message; @@ -1737,7 +1792,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - IndexAlreadyExistsException() : message("") { + IndexAlreadyExistsException() : message() { } virtual ~IndexAlreadyExistsException() throw() {} @@ -1767,6 +1822,8 @@ }; +void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b); + typedef struct _InvalidOperationException__isset { _InvalidOperationException__isset() : message(false) {} bool message; @@ -1778,7 +1835,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - InvalidOperationException() : message("") { + InvalidOperationException() : message() { } virtual ~InvalidOperationException() throw() {} @@ -1808,6 +1865,8 @@ }; +void swap(InvalidOperationException &a, InvalidOperationException &b); + typedef struct _ConfigValSecurityException__isset { _ConfigValSecurityException__isset() : message(false) {} bool message; @@ -1819,7 +1878,7 @@ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - ConfigValSecurityException() : message("") { + ConfigValSecurityException() : message() { } virtual ~ConfigValSecurityException() throw() {} @@ -1849,6 +1908,8 @@ }; +void swap(ConfigValSecurityException &a, ConfigValSecurityException &b); + }}} // namespace #endif Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -2,10 +2,10 @@ // You should copy it to another filename to avoid overwriting it. #include "ThriftHiveMetastore.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; @@ -14,7 +14,7 @@ using boost::shared_ptr; -using namespace Apache::Hadoop::Hive; +using namespace ::Apache::Hadoop::Hive; class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { public: Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp (revision 1403799) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_metastore_constants.h" Index: metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (revision 1403799) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,7 +9,7 @@ require 'hive_metastore_types' module ThriftHiveMetastore - class Client < FacebookService::Client + class Client < ::FacebookService::Client include ::Thrift::Client def create_database(database) @@ -1173,7 +1173,7 @@ end - class Processor < FacebookService::Processor + class Processor < ::FacebookService::Processor include ::Thrift::Processor def process_create_database(seqid, iprot, oprot) @@ -1181,11 +1181,11 @@ result = Create_database_result.new() begin @handler.create_database(args.database) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'create_database', seqid) @@ -1196,9 +1196,9 @@ result = Get_database_result.new() begin result.success = @handler.get_database(args.name) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_database', seqid) @@ -1209,11 +1209,11 @@ result = Drop_database_result.new() begin @handler.drop_database(args.name, args.deleteData, args.cascade) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue InvalidOperationException => o2 + rescue ::InvalidOperationException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'drop_database', seqid) @@ -1224,7 +1224,7 @@ result = Get_databases_result.new() begin result.success = @handler.get_databases(args.pattern) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_databases', seqid) @@ -1235,7 +1235,7 @@ result = Get_all_databases_result.new() begin result.success = @handler.get_all_databases() - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_all_databases', seqid) @@ -1246,9 +1246,9 @@ result = Alter_database_result.new() begin @handler.alter_database(args.dbname, args.db) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_database', seqid) @@ -1259,9 +1259,9 @@ result = Get_type_result.new() begin result.success = @handler.get_type(args.name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_type', seqid) @@ -1272,11 +1272,11 @@ result = Create_type_result.new() begin result.success = @handler.create_type(args.type) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'create_type', seqid) @@ -1287,9 +1287,9 @@ result = Drop_type_result.new() begin result.success = @handler.drop_type(args.type) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_type', seqid) @@ -1300,7 +1300,7 @@ result = Get_type_all_result.new() begin result.success = @handler.get_type_all(args.name) - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_type_all', seqid) @@ -1311,11 +1311,11 @@ result = Get_fields_result.new() begin result.success = @handler.get_fields(args.db_name, args.table_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue UnknownTableException => o2 + rescue ::UnknownTableException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_fields', seqid) @@ -1326,11 +1326,11 @@ result = Get_schema_result.new() begin result.success = @handler.get_schema(args.db_name, args.table_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue UnknownTableException => o2 + rescue ::UnknownTableException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_schema', seqid) @@ -1341,13 +1341,13 @@ result = Create_table_result.new() begin @handler.create_table(args.tbl) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 - rescue NoSuchObjectException => o4 + rescue ::NoSuchObjectException => o4 result.o4 = o4 end write_result(result, oprot, 'create_table', seqid) @@ -1358,13 +1358,13 @@ result = Create_table_with_environment_context_result.new() begin @handler.create_table_with_environment_context(args.tbl, args.environment_context) - rescue AlreadyExistsException => o1 + rescue ::AlreadyExistsException => o1 result.o1 = o1 - rescue InvalidObjectException => o2 + rescue ::InvalidObjectException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 - rescue NoSuchObjectException => o4 + rescue ::NoSuchObjectException => o4 result.o4 = o4 end write_result(result, oprot, 'create_table_with_environment_context', seqid) @@ -1375,9 +1375,9 @@ result = Drop_table_result.new() begin @handler.drop_table(args.dbname, args.name, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'drop_table', seqid) @@ -1388,7 +1388,7 @@ result = Get_tables_result.new() begin result.success = @handler.get_tables(args.db_name, args.pattern) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_tables', seqid) @@ -1399,7 +1399,7 @@ result = Get_all_tables_result.new() begin result.success = @handler.get_all_tables(args.db_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_all_tables', seqid) @@ -1410,9 +1410,9 @@ result = Get_table_result.new() begin result.success = @handler.get_table(args.dbname, args.tbl_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_table', seqid) @@ -1423,11 +1423,11 @@ result = Get_table_objects_by_name_result.new() begin result.success = @handler.get_table_objects_by_name(args.dbname, args.tbl_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue InvalidOperationException => o2 + rescue ::InvalidOperationException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_table_objects_by_name', seqid) @@ -1438,11 +1438,11 @@ result = Get_table_names_by_filter_result.new() begin result.success = @handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue InvalidOperationException => o2 + rescue ::InvalidOperationException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 end write_result(result, oprot, 'get_table_names_by_filter', seqid) @@ -1453,9 +1453,9 @@ result = Alter_table_result.new() begin @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_table', seqid) @@ -1466,9 +1466,9 @@ result = Alter_table_with_environment_context_result.new() begin @handler.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_table_with_environment_context', seqid) @@ -1479,11 +1479,11 @@ result = Add_partition_result.new() begin result.success = @handler.add_partition(args.new_part) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_partition', seqid) @@ -1494,11 +1494,11 @@ result = Add_partition_with_environment_context_result.new() begin result.success = @handler.add_partition_with_environment_context(args.new_part, args.environment_context) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_partition_with_environment_context', seqid) @@ -1509,11 +1509,11 @@ result = Add_partitions_result.new() begin result.success = @handler.add_partitions(args.new_parts) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_partitions', seqid) @@ -1524,11 +1524,11 @@ result = Append_partition_result.new() begin result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'append_partition', seqid) @@ -1539,11 +1539,11 @@ result = Append_partition_by_name_result.new() begin result.success = @handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'append_partition_by_name', seqid) @@ -1554,9 +1554,9 @@ result = Drop_partition_result.new() begin result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_partition', seqid) @@ -1567,9 +1567,9 @@ result = Drop_partition_by_name_result.new() begin result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_partition_by_name', seqid) @@ -1580,9 +1580,9 @@ result = Get_partition_result.new() begin result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition', seqid) @@ -1593,9 +1593,9 @@ result = Get_partition_with_auth_result.new() begin result.success = @handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_with_auth', seqid) @@ -1606,9 +1606,9 @@ result = Get_partition_by_name_result.new() begin result.success = @handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_by_name', seqid) @@ -1619,9 +1619,9 @@ result = Get_partitions_result.new() begin result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions', seqid) @@ -1632,9 +1632,9 @@ result = Get_partitions_with_auth_result.new() begin result.success = @handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_with_auth', seqid) @@ -1645,7 +1645,7 @@ result = Get_partition_names_result.new() begin result.success = @handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_names', seqid) @@ -1656,9 +1656,9 @@ result = Get_partitions_ps_result.new() begin result.success = @handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_ps', seqid) @@ -1669,9 +1669,9 @@ result = Get_partitions_ps_with_auth_result.new() begin result.success = @handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_ps_with_auth', seqid) @@ -1682,9 +1682,9 @@ result = Get_partition_names_ps_result.new() begin result.success = @handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partition_names_ps', seqid) @@ -1695,9 +1695,9 @@ result = Get_partitions_by_filter_result.new() begin result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_by_filter', seqid) @@ -1708,9 +1708,9 @@ result = Get_partitions_by_names_result.new() begin result.success = @handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_partitions_by_names', seqid) @@ -1721,9 +1721,9 @@ result = Alter_partition_result.new() begin @handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_partition', seqid) @@ -1734,9 +1734,9 @@ result = Alter_partitions_result.new() begin @handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_partitions', seqid) @@ -1747,9 +1747,9 @@ result = Alter_partition_with_environment_context_result.new() begin @handler.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_partition_with_environment_context', seqid) @@ -1760,9 +1760,9 @@ result = Rename_partition_result.new() begin @handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'rename_partition', seqid) @@ -1773,7 +1773,7 @@ result = Get_config_value_result.new() begin result.success = @handler.get_config_value(args.name, args.defaultValue) - rescue ConfigValSecurityException => o1 + rescue ::ConfigValSecurityException => o1 result.o1 = o1 end write_result(result, oprot, 'get_config_value', seqid) @@ -1784,7 +1784,7 @@ result = Partition_name_to_vals_result.new() begin result.success = @handler.partition_name_to_vals(args.part_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'partition_name_to_vals', seqid) @@ -1795,7 +1795,7 @@ result = Partition_name_to_spec_result.new() begin result.success = @handler.partition_name_to_spec(args.part_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'partition_name_to_spec', seqid) @@ -1806,17 +1806,17 @@ result = MarkPartitionForEvent_result.new() begin @handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 - rescue UnknownTableException => o4 + rescue ::UnknownTableException => o4 result.o4 = o4 - rescue UnknownPartitionException => o5 + rescue ::UnknownPartitionException => o5 result.o5 = o5 - rescue InvalidPartitionException => o6 + rescue ::InvalidPartitionException => o6 result.o6 = o6 end write_result(result, oprot, 'markPartitionForEvent', seqid) @@ -1827,17 +1827,17 @@ result = IsPartitionMarkedForEvent_result.new() begin result.success = @handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 - rescue UnknownDBException => o3 + rescue ::UnknownDBException => o3 result.o3 = o3 - rescue UnknownTableException => o4 + rescue ::UnknownTableException => o4 result.o4 = o4 - rescue UnknownPartitionException => o5 + rescue ::UnknownPartitionException => o5 result.o5 = o5 - rescue InvalidPartitionException => o6 + rescue ::InvalidPartitionException => o6 result.o6 = o6 end write_result(result, oprot, 'isPartitionMarkedForEvent', seqid) @@ -1848,11 +1848,11 @@ result = Add_index_result.new() begin result.success = @handler.add_index(args.new_index, args.index_table) - rescue InvalidObjectException => o1 + rescue ::InvalidObjectException => o1 result.o1 = o1 - rescue AlreadyExistsException => o2 + rescue ::AlreadyExistsException => o2 result.o2 = o2 - rescue MetaException => o3 + rescue ::MetaException => o3 result.o3 = o3 end write_result(result, oprot, 'add_index', seqid) @@ -1863,9 +1863,9 @@ result = Alter_index_result.new() begin @handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - rescue InvalidOperationException => o1 + rescue ::InvalidOperationException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'alter_index', seqid) @@ -1876,9 +1876,9 @@ result = Drop_index_by_name_result.new() begin result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'drop_index_by_name', seqid) @@ -1889,9 +1889,9 @@ result = Get_index_by_name_result.new() begin result.success = @handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 - rescue NoSuchObjectException => o2 + rescue ::NoSuchObjectException => o2 result.o2 = o2 end write_result(result, oprot, 'get_index_by_name', seqid) @@ -1902,9 +1902,9 @@ result = Get_indexes_result.new() begin result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - rescue NoSuchObjectException => o1 + rescue ::NoSuchObjectException => o1 result.o1 = o1 - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_indexes', seqid) @@ -1915,7 +1915,7 @@ result = Get_index_names_result.new() begin result.success = @handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - rescue MetaException => o2 + rescue ::MetaException => o2 result.o2 = o2 end write_result(result, oprot, 'get_index_names', seqid) @@ -1926,7 +1926,7 @@ result = Create_role_result.new() begin result.success = @handler.create_role(args.role) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'create_role', seqid) @@ -1937,7 +1937,7 @@ result = Drop_role_result.new() begin result.success = @handler.drop_role(args.role_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'drop_role', seqid) @@ -1948,7 +1948,7 @@ result = Get_role_names_result.new() begin result.success = @handler.get_role_names() - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_role_names', seqid) @@ -1959,7 +1959,7 @@ result = Grant_role_result.new() begin result.success = @handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'grant_role', seqid) @@ -1970,7 +1970,7 @@ result = Revoke_role_result.new() begin result.success = @handler.revoke_role(args.role_name, args.principal_name, args.principal_type) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'revoke_role', seqid) @@ -1981,7 +1981,7 @@ result = List_roles_result.new() begin result.success = @handler.list_roles(args.principal_name, args.principal_type) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'list_roles', seqid) @@ -1992,7 +1992,7 @@ result = Get_privilege_set_result.new() begin result.success = @handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_privilege_set', seqid) @@ -2003,7 +2003,7 @@ result = List_privileges_result.new() begin result.success = @handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'list_privileges', seqid) @@ -2014,7 +2014,7 @@ result = Grant_privileges_result.new() begin result.success = @handler.grant_privileges(args.privileges) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'grant_privileges', seqid) @@ -2025,7 +2025,7 @@ result = Revoke_privileges_result.new() begin result.success = @handler.revoke_privileges(args.privileges) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'revoke_privileges', seqid) @@ -2036,7 +2036,7 @@ result = Set_ugi_result.new() begin result.success = @handler.set_ugi(args.user_name, args.group_names) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'set_ugi', seqid) @@ -2047,7 +2047,7 @@ result = Get_delegation_token_result.new() begin result.success = @handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'get_delegation_token', seqid) @@ -2058,7 +2058,7 @@ result = Renew_delegation_token_result.new() begin result.success = @handler.renew_delegation_token(args.token_str_form) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'renew_delegation_token', seqid) @@ -2069,7 +2069,7 @@ result = Cancel_delegation_token_result.new() begin @handler.cancel_delegation_token(args.token_str_form) - rescue MetaException => o1 + rescue ::MetaException => o1 result.o1 = o1 end write_result(result, oprot, 'cancel_delegation_token', seqid) @@ -2084,7 +2084,7 @@ DATABASE = 1 FIELDS = { - DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database} + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => ::Database} } def struct_fields; FIELDS; end @@ -2102,9 +2102,9 @@ O3 = 3 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2138,9 +2138,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Database}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Database}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2178,9 +2178,9 @@ O3 = 3 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2214,7 +2214,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2247,7 +2247,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2265,7 +2265,7 @@ FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => Database} + DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => ::Database} } def struct_fields; FIELDS; end @@ -2282,8 +2282,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2317,9 +2317,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Type}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Type}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2335,7 +2335,7 @@ TYPE = 1 FIELDS = { - TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => Type} + TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => ::Type} } def struct_fields; FIELDS; end @@ -2355,9 +2355,9 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2392,8 +2392,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2426,8 +2426,8 @@ O2 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Type}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Type}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2464,10 +2464,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException} } def struct_fields; FIELDS; end @@ -2504,10 +2504,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException} } def struct_fields; FIELDS; end @@ -2523,7 +2523,7 @@ TBL = 1 FIELDS = { - TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table} + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table} } def struct_fields; FIELDS; end @@ -2542,10 +2542,10 @@ O4 = 4 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2562,8 +2562,8 @@ ENVIRONMENT_CONTEXT = 2 FIELDS = { - TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -2582,10 +2582,10 @@ O4 = 4 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2622,8 +2622,8 @@ O3 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2659,7 +2659,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2693,7 +2693,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2729,9 +2729,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Table}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Table}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -2768,10 +2768,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Table}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException} } def struct_fields; FIELDS; end @@ -2811,9 +2811,9 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException} } def struct_fields; FIELDS; end @@ -2833,7 +2833,7 @@ FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table} + NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => ::Table} } def struct_fields; FIELDS; end @@ -2850,8 +2850,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2872,8 +2872,8 @@ FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => ::Table}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -2890,8 +2890,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2907,7 +2907,7 @@ NEW_PART = 1 FIELDS = { - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} } def struct_fields; FIELDS; end @@ -2926,10 +2926,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2946,8 +2946,8 @@ ENVIRONMENT_CONTEXT = 2 FIELDS = { - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -2966,10 +2966,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -2985,7 +2985,7 @@ NEW_PARTS = 1 FIELDS = { - NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}} + NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} } def struct_fields; FIELDS; end @@ -3005,9 +3005,9 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3046,10 +3046,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3088,10 +3088,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3132,8 +3132,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3174,8 +3174,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3213,9 +3213,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3257,9 +3257,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3297,9 +3297,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3337,9 +3337,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3381,9 +3381,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3421,7 +3421,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3461,9 +3461,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3507,9 +3507,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3550,8 +3550,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3591,9 +3591,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3631,9 +3631,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -3653,7 +3653,7 @@ FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} } def struct_fields; FIELDS; end @@ -3670,8 +3670,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3691,7 +3691,7 @@ FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}} + NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} } def struct_fields; FIELDS; end @@ -3708,8 +3708,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3730,8 +3730,8 @@ FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => EnvironmentContext} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} } def struct_fields; FIELDS; end @@ -3748,8 +3748,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3771,7 +3771,7 @@ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} } def struct_fields; FIELDS; end @@ -3788,8 +3788,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3825,7 +3825,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ConfigValSecurityException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::ConfigValSecurityException} } def struct_fields; FIELDS; end @@ -3859,7 +3859,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3893,7 +3893,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -3915,13 +3915,13 @@ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, PART_VALS => {:type => ::Thrift::Types::MAP, :name => 'part_vals', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => PartitionEventType} + EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => ::PartitionEventType} } def struct_fields; FIELDS; end def validate - unless @eventType.nil? || PartitionEventType::VALID_VALUES.include?(@eventType) + unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') end end @@ -3939,12 +3939,12 @@ O6 = 6 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => UnknownTableException}, - O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => UnknownPartitionException}, - O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => InvalidPartitionException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::UnknownTableException}, + O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => ::UnknownPartitionException}, + O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => ::InvalidPartitionException} } def struct_fields; FIELDS; end @@ -3966,13 +3966,13 @@ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, PART_VALS => {:type => ::Thrift::Types::MAP, :name => 'part_vals', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => PartitionEventType} + EVENTTYPE => {:type => ::Thrift::Types::I32, :name => 'eventType', :enum_class => ::PartitionEventType} } def struct_fields; FIELDS; end def validate - unless @eventType.nil? || PartitionEventType::VALID_VALUES.include?(@eventType) + unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') end end @@ -3992,12 +3992,12 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => UnknownTableException}, - O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => UnknownPartitionException}, - O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => InvalidPartitionException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::UnknownDBException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::UnknownTableException}, + O5 => {:type => ::Thrift::Types::STRUCT, :name => 'o5', :class => ::UnknownPartitionException}, + O6 => {:type => ::Thrift::Types::STRUCT, :name => 'o6', :class => ::InvalidPartitionException} } def struct_fields; FIELDS; end @@ -4014,8 +4014,8 @@ INDEX_TABLE = 2 FIELDS = { - NEW_INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'new_index', :class => Index}, - INDEX_TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'index_table', :class => Table} + NEW_INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'new_index', :class => ::Index}, + INDEX_TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'index_table', :class => ::Table} } def struct_fields; FIELDS; end @@ -4034,10 +4034,10 @@ O3 = 3 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4059,7 +4059,7 @@ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, BASE_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'base_tbl_name'}, IDX_NAME => {:type => ::Thrift::Types::STRING, :name => 'idx_name'}, - NEW_IDX => {:type => ::Thrift::Types::STRUCT, :name => 'new_idx', :class => Index} + NEW_IDX => {:type => ::Thrift::Types::STRUCT, :name => 'new_idx', :class => ::Index} } def struct_fields; FIELDS; end @@ -4076,8 +4076,8 @@ O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4118,8 +4118,8 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4157,9 +4157,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} } def struct_fields; FIELDS; end @@ -4197,9 +4197,9 @@ O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Index}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Index}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4237,7 +4237,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4253,7 +4253,7 @@ ROLE = 1 FIELDS = { - ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => Role} + ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => ::Role} } def struct_fields; FIELDS; end @@ -4271,7 +4271,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4305,7 +4305,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4338,7 +4338,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4361,19 +4361,19 @@ FIELDS = { ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType}, GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, - GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => PrincipalType}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => ::PrincipalType}, GRANT_OPTION => {:type => ::Thrift::Types::BOOL, :name => 'grant_option'} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end - unless @grantorType.nil? || PrincipalType::VALID_VALUES.include?(@grantorType) + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') end end @@ -4388,7 +4388,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4408,13 +4408,13 @@ FIELDS = { ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType} + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end end @@ -4429,7 +4429,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4447,13 +4447,13 @@ FIELDS = { PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType} + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end end @@ -4467,8 +4467,8 @@ O1 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Role}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Role}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4486,7 +4486,7 @@ GROUP_NAMES = 3 FIELDS = { - HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef}, USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} } @@ -4505,8 +4505,8 @@ O1 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4525,14 +4525,14 @@ FIELDS = { PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType}, - HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef} + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef} } def struct_fields; FIELDS; end def validate - unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') end end @@ -4546,8 +4546,8 @@ O1 = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => HiveObjectPrivilege}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4563,7 +4563,7 @@ PRIVILEGES = 1 FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} } def struct_fields; FIELDS; end @@ -4581,7 +4581,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4597,7 +4597,7 @@ PRIVILEGES = 1 FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} } def struct_fields; FIELDS; end @@ -4615,7 +4615,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4651,7 +4651,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4687,7 +4687,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4721,7 +4721,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end @@ -4753,7 +4753,7 @@ O1 = 1 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} } def struct_fields; FIELDS; end Index: metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (revision 1403799) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'fb303_types' @@ -80,7 +81,7 @@ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true}, TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true}, - FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}, :optional => true} + FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}, :optional => true} } def struct_fields; FIELDS; end @@ -100,7 +101,7 @@ COLUMNNAME = 5 FIELDS = { - OBJECTTYPE => {:type => ::Thrift::Types::I32, :name => 'objectType', :enum_class => HiveObjectType}, + OBJECTTYPE => {:type => ::Thrift::Types::I32, :name => 'objectType', :enum_class => ::HiveObjectType}, DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, OBJECTNAME => {:type => ::Thrift::Types::STRING, :name => 'objectName'}, PARTVALUES => {:type => ::Thrift::Types::LIST, :name => 'partValues', :element => {:type => ::Thrift::Types::STRING}}, @@ -110,7 +111,7 @@ def struct_fields; FIELDS; end def validate - unless @objectType.nil? || HiveObjectType::VALID_VALUES.include?(@objectType) + unless @objectType.nil? || ::HiveObjectType::VALID_VALUES.include?(@objectType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field objectType!') end end @@ -130,14 +131,14 @@ PRIVILEGE => {:type => ::Thrift::Types::STRING, :name => 'privilege'}, CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, - GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => PrincipalType}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => ::PrincipalType}, GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'} } def struct_fields; FIELDS; end def validate - unless @grantorType.nil? || PrincipalType::VALID_VALUES.include?(@grantorType) + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') end end @@ -153,16 +154,16 @@ GRANTINFO = 4 FIELDS = { - HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef}, PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, - PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => PrincipalType}, - GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => PrivilegeGrantInfo} + PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType}, + GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => ::PrivilegeGrantInfo} } def struct_fields; FIELDS; end def validate - unless @principalType.nil? || PrincipalType::VALID_VALUES.include?(@principalType) + unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') end end @@ -175,7 +176,7 @@ PRIVILEGES = 1 FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => HiveObjectPrivilege}} + PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}} } def struct_fields; FIELDS; end @@ -193,9 +194,9 @@ ROLEPRIVILEGES = 3 FIELDS = { - USERPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'userPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}}, - GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}}, - ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}} + USERPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'userPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}}, + GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}}, + ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::PrivilegeGrantInfo}}} } def struct_fields; FIELDS; end @@ -239,7 +240,7 @@ DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}, LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -323,17 +324,17 @@ SKEWEDINFO = 11 FIELDS = { - COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'}, INPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'inputFormat'}, OUTPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'outputFormat'}, COMPRESSED => {:type => ::Thrift::Types::BOOL, :name => 'compressed'}, NUMBUCKETS => {:type => ::Thrift::Types::I32, :name => 'numBuckets'}, - SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => SerDeInfo}, + SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => ::SerDeInfo}, BUCKETCOLS => {:type => ::Thrift::Types::LIST, :name => 'bucketCols', :element => {:type => ::Thrift::Types::STRING}}, - SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => Order}}, + SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Order}}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - SKEWEDINFO => {:type => ::Thrift::Types::STRUCT, :name => 'skewedInfo', :class => SkewedInfo, :optional => true} + SKEWEDINFO => {:type => ::Thrift::Types::STRUCT, :name => 'skewedInfo', :class => ::SkewedInfo, :optional => true} } def struct_fields; FIELDS; end @@ -367,13 +368,13 @@ CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, - PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}, + PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'}, VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'}, TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -401,9 +402,9 @@ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -435,7 +436,7 @@ CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, INDEXTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'indexTableName'}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'} } @@ -454,7 +455,7 @@ PROPERTIES = 2 FIELDS = { - FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FieldSchema}}, PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} } Index: metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb (revision 1403799) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'hive_metastore_types' DDL_TIME = %q"transient_lastDdlTime" Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidPartitionException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidPartitionException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidPartitionExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidPartitionExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidPartitionExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidPartitionExceptionStandardScheme getScheme() { + return new InvalidPartitionExceptionStandardScheme(); + } + } + + private static class InvalidPartitionExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidPartitionException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidPartitionException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidPartitionExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidPartitionExceptionTupleScheme getScheme() { + return new InvalidPartitionExceptionTupleScheme(); + } + } + + private static class InvalidPartitionExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -4929,7 +4939,7 @@ } - public static class Processor extends com.facebook.fb303.FacebookService.Processor implements org.apache.thrift.TProcessor { + public static class Processor extends com.facebook.fb303.FacebookService.Processor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); @@ -5012,16 +5022,20 @@ return processMap; } - private static class create_database extends org.apache.thrift.ProcessFunction { + public static class create_database extends org.apache.thrift.ProcessFunction { public create_database() { super("create_database"); } - protected create_database_args getEmptyArgsInstance() { + public create_database_args getEmptyArgsInstance() { return new create_database_args(); } - protected create_database_result getResult(I iface, create_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_database_result getResult(I iface, create_database_args args) throws org.apache.thrift.TException { create_database_result result = new create_database_result(); try { iface.create_database(args.database); @@ -5036,16 +5050,20 @@ } } - private static class get_database extends org.apache.thrift.ProcessFunction { + public static class get_database extends org.apache.thrift.ProcessFunction { public get_database() { super("get_database"); } - protected get_database_args getEmptyArgsInstance() { + public get_database_args getEmptyArgsInstance() { return new get_database_args(); } - protected get_database_result getResult(I iface, get_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_database_result getResult(I iface, get_database_args args) throws org.apache.thrift.TException { get_database_result result = new get_database_result(); try { result.success = iface.get_database(args.name); @@ -5058,16 +5076,20 @@ } } - private static class drop_database extends org.apache.thrift.ProcessFunction { + public static class drop_database extends org.apache.thrift.ProcessFunction { public drop_database() { super("drop_database"); } - protected drop_database_args getEmptyArgsInstance() { + public drop_database_args getEmptyArgsInstance() { return new drop_database_args(); } - protected drop_database_result getResult(I iface, drop_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_database_result getResult(I iface, drop_database_args args) throws org.apache.thrift.TException { drop_database_result result = new drop_database_result(); try { iface.drop_database(args.name, args.deleteData, args.cascade); @@ -5082,16 +5104,20 @@ } } - private static class get_databases extends org.apache.thrift.ProcessFunction { + public static class get_databases extends org.apache.thrift.ProcessFunction { public get_databases() { super("get_databases"); } - protected get_databases_args getEmptyArgsInstance() { + public get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } - protected get_databases_result getResult(I iface, get_databases_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_databases_result getResult(I iface, get_databases_args args) throws org.apache.thrift.TException { get_databases_result result = new get_databases_result(); try { result.success = iface.get_databases(args.pattern); @@ -5102,16 +5128,20 @@ } } - private static class get_all_databases extends org.apache.thrift.ProcessFunction { + public static class get_all_databases extends org.apache.thrift.ProcessFunction { public get_all_databases() { super("get_all_databases"); } - protected get_all_databases_args getEmptyArgsInstance() { + public get_all_databases_args getEmptyArgsInstance() { return new get_all_databases_args(); } - protected get_all_databases_result getResult(I iface, get_all_databases_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_all_databases_result getResult(I iface, get_all_databases_args args) throws org.apache.thrift.TException { get_all_databases_result result = new get_all_databases_result(); try { result.success = iface.get_all_databases(); @@ -5122,16 +5152,20 @@ } } - private static class alter_database extends org.apache.thrift.ProcessFunction { + public static class alter_database extends org.apache.thrift.ProcessFunction { public alter_database() { super("alter_database"); } - protected alter_database_args getEmptyArgsInstance() { + public alter_database_args getEmptyArgsInstance() { return new alter_database_args(); } - protected alter_database_result getResult(I iface, alter_database_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_database_result getResult(I iface, alter_database_args args) throws org.apache.thrift.TException { alter_database_result result = new alter_database_result(); try { iface.alter_database(args.dbname, args.db); @@ -5144,16 +5178,20 @@ } } - private static class get_type extends org.apache.thrift.ProcessFunction { + public static class get_type extends org.apache.thrift.ProcessFunction { public get_type() { super("get_type"); } - protected get_type_args getEmptyArgsInstance() { + public get_type_args getEmptyArgsInstance() { return new get_type_args(); } - protected get_type_result getResult(I iface, get_type_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_type_result getResult(I iface, get_type_args args) throws org.apache.thrift.TException { get_type_result result = new get_type_result(); try { result.success = iface.get_type(args.name); @@ -5166,16 +5204,20 @@ } } - private static class create_type extends org.apache.thrift.ProcessFunction { + public static class create_type extends org.apache.thrift.ProcessFunction { public create_type() { super("create_type"); } - protected create_type_args getEmptyArgsInstance() { + public create_type_args getEmptyArgsInstance() { return new create_type_args(); } - protected create_type_result getResult(I iface, create_type_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_type_result getResult(I iface, create_type_args args) throws org.apache.thrift.TException { create_type_result result = new create_type_result(); try { result.success = iface.create_type(args.type); @@ -5191,16 +5233,20 @@ } } - private static class drop_type extends org.apache.thrift.ProcessFunction { + public static class drop_type extends org.apache.thrift.ProcessFunction { public drop_type() { super("drop_type"); } - protected drop_type_args getEmptyArgsInstance() { + public drop_type_args getEmptyArgsInstance() { return new drop_type_args(); } - protected drop_type_result getResult(I iface, drop_type_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_type_result getResult(I iface, drop_type_args args) throws org.apache.thrift.TException { drop_type_result result = new drop_type_result(); try { result.success = iface.drop_type(args.type); @@ -5214,16 +5260,20 @@ } } - private static class get_type_all extends org.apache.thrift.ProcessFunction { + public static class get_type_all extends org.apache.thrift.ProcessFunction { public get_type_all() { super("get_type_all"); } - protected get_type_all_args getEmptyArgsInstance() { + public get_type_all_args getEmptyArgsInstance() { return new get_type_all_args(); } - protected get_type_all_result getResult(I iface, get_type_all_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_type_all_result getResult(I iface, get_type_all_args args) throws org.apache.thrift.TException { get_type_all_result result = new get_type_all_result(); try { result.success = iface.get_type_all(args.name); @@ -5234,16 +5284,20 @@ } } - private static class get_fields extends org.apache.thrift.ProcessFunction { + public static class get_fields extends org.apache.thrift.ProcessFunction { public get_fields() { super("get_fields"); } - protected get_fields_args getEmptyArgsInstance() { + public get_fields_args getEmptyArgsInstance() { return new get_fields_args(); } - protected get_fields_result getResult(I iface, get_fields_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_fields_result getResult(I iface, get_fields_args args) throws org.apache.thrift.TException { get_fields_result result = new get_fields_result(); try { result.success = iface.get_fields(args.db_name, args.table_name); @@ -5258,16 +5312,20 @@ } } - private static class get_schema extends org.apache.thrift.ProcessFunction { + public static class get_schema extends org.apache.thrift.ProcessFunction { public get_schema() { super("get_schema"); } - protected get_schema_args getEmptyArgsInstance() { + public get_schema_args getEmptyArgsInstance() { return new get_schema_args(); } - protected get_schema_result getResult(I iface, get_schema_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_schema_result getResult(I iface, get_schema_args args) throws org.apache.thrift.TException { get_schema_result result = new get_schema_result(); try { result.success = iface.get_schema(args.db_name, args.table_name); @@ -5282,16 +5340,20 @@ } } - private static class create_table extends org.apache.thrift.ProcessFunction { + public static class create_table extends org.apache.thrift.ProcessFunction { public create_table() { super("create_table"); } - protected create_table_args getEmptyArgsInstance() { + public create_table_args getEmptyArgsInstance() { return new create_table_args(); } - protected create_table_result getResult(I iface, create_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_table_result getResult(I iface, create_table_args args) throws org.apache.thrift.TException { create_table_result result = new create_table_result(); try { iface.create_table(args.tbl); @@ -5308,16 +5370,20 @@ } } - private static class create_table_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class create_table_with_environment_context extends org.apache.thrift.ProcessFunction { public create_table_with_environment_context() { super("create_table_with_environment_context"); } - protected create_table_with_environment_context_args getEmptyArgsInstance() { + public create_table_with_environment_context_args getEmptyArgsInstance() { return new create_table_with_environment_context_args(); } - protected create_table_with_environment_context_result getResult(I iface, create_table_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_table_with_environment_context_result getResult(I iface, create_table_with_environment_context_args args) throws org.apache.thrift.TException { create_table_with_environment_context_result result = new create_table_with_environment_context_result(); try { iface.create_table_with_environment_context(args.tbl, args.environment_context); @@ -5334,16 +5400,20 @@ } } - private static class drop_table extends org.apache.thrift.ProcessFunction { + public static class drop_table extends org.apache.thrift.ProcessFunction { public drop_table() { super("drop_table"); } - protected drop_table_args getEmptyArgsInstance() { + public drop_table_args getEmptyArgsInstance() { return new drop_table_args(); } - protected drop_table_result getResult(I iface, drop_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_table_result getResult(I iface, drop_table_args args) throws org.apache.thrift.TException { drop_table_result result = new drop_table_result(); try { iface.drop_table(args.dbname, args.name, args.deleteData); @@ -5356,16 +5426,20 @@ } } - private static class get_tables extends org.apache.thrift.ProcessFunction { + public static class get_tables extends org.apache.thrift.ProcessFunction { public get_tables() { super("get_tables"); } - protected get_tables_args getEmptyArgsInstance() { + public get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } - protected get_tables_result getResult(I iface, get_tables_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_tables_result getResult(I iface, get_tables_args args) throws org.apache.thrift.TException { get_tables_result result = new get_tables_result(); try { result.success = iface.get_tables(args.db_name, args.pattern); @@ -5376,16 +5450,20 @@ } } - private static class get_all_tables extends org.apache.thrift.ProcessFunction { + public static class get_all_tables extends org.apache.thrift.ProcessFunction { public get_all_tables() { super("get_all_tables"); } - protected get_all_tables_args getEmptyArgsInstance() { + public get_all_tables_args getEmptyArgsInstance() { return new get_all_tables_args(); } - protected get_all_tables_result getResult(I iface, get_all_tables_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_all_tables_result getResult(I iface, get_all_tables_args args) throws org.apache.thrift.TException { get_all_tables_result result = new get_all_tables_result(); try { result.success = iface.get_all_tables(args.db_name); @@ -5396,16 +5474,20 @@ } } - private static class get_table extends org.apache.thrift.ProcessFunction { + public static class get_table extends org.apache.thrift.ProcessFunction { public get_table() { super("get_table"); } - protected get_table_args getEmptyArgsInstance() { + public get_table_args getEmptyArgsInstance() { return new get_table_args(); } - protected get_table_result getResult(I iface, get_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_result getResult(I iface, get_table_args args) throws org.apache.thrift.TException { get_table_result result = new get_table_result(); try { result.success = iface.get_table(args.dbname, args.tbl_name); @@ -5418,16 +5500,20 @@ } } - private static class get_table_objects_by_name extends org.apache.thrift.ProcessFunction { + public static class get_table_objects_by_name extends org.apache.thrift.ProcessFunction { public get_table_objects_by_name() { super("get_table_objects_by_name"); } - protected get_table_objects_by_name_args getEmptyArgsInstance() { + public get_table_objects_by_name_args getEmptyArgsInstance() { return new get_table_objects_by_name_args(); } - protected get_table_objects_by_name_result getResult(I iface, get_table_objects_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_objects_by_name_result getResult(I iface, get_table_objects_by_name_args args) throws org.apache.thrift.TException { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); try { result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); @@ -5442,16 +5528,20 @@ } } - private static class get_table_names_by_filter extends org.apache.thrift.ProcessFunction { + public static class get_table_names_by_filter extends org.apache.thrift.ProcessFunction { public get_table_names_by_filter() { super("get_table_names_by_filter"); } - protected get_table_names_by_filter_args getEmptyArgsInstance() { + public get_table_names_by_filter_args getEmptyArgsInstance() { return new get_table_names_by_filter_args(); } - protected get_table_names_by_filter_result getResult(I iface, get_table_names_by_filter_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_table_names_by_filter_result getResult(I iface, get_table_names_by_filter_args args) throws org.apache.thrift.TException { get_table_names_by_filter_result result = new get_table_names_by_filter_result(); try { result.success = iface.get_table_names_by_filter(args.dbname, args.filter, args.max_tables); @@ -5466,16 +5556,20 @@ } } - private static class alter_table extends org.apache.thrift.ProcessFunction { + public static class alter_table extends org.apache.thrift.ProcessFunction { public alter_table() { super("alter_table"); } - protected alter_table_args getEmptyArgsInstance() { + public alter_table_args getEmptyArgsInstance() { return new alter_table_args(); } - protected alter_table_result getResult(I iface, alter_table_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_table_result getResult(I iface, alter_table_args args) throws org.apache.thrift.TException { alter_table_result result = new alter_table_result(); try { iface.alter_table(args.dbname, args.tbl_name, args.new_tbl); @@ -5488,16 +5582,20 @@ } } - private static class alter_table_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class alter_table_with_environment_context extends org.apache.thrift.ProcessFunction { public alter_table_with_environment_context() { super("alter_table_with_environment_context"); } - protected alter_table_with_environment_context_args getEmptyArgsInstance() { + public alter_table_with_environment_context_args getEmptyArgsInstance() { return new alter_table_with_environment_context_args(); } - protected alter_table_with_environment_context_result getResult(I iface, alter_table_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_table_with_environment_context_result getResult(I iface, alter_table_with_environment_context_args args) throws org.apache.thrift.TException { alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); try { iface.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); @@ -5510,16 +5608,20 @@ } } - private static class add_partition extends org.apache.thrift.ProcessFunction { + public static class add_partition extends org.apache.thrift.ProcessFunction { public add_partition() { super("add_partition"); } - protected add_partition_args getEmptyArgsInstance() { + public add_partition_args getEmptyArgsInstance() { return new add_partition_args(); } - protected add_partition_result getResult(I iface, add_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_partition_result getResult(I iface, add_partition_args args) throws org.apache.thrift.TException { add_partition_result result = new add_partition_result(); try { result.success = iface.add_partition(args.new_part); @@ -5534,16 +5636,20 @@ } } - private static class add_partition_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class add_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public add_partition_with_environment_context() { super("add_partition_with_environment_context"); } - protected add_partition_with_environment_context_args getEmptyArgsInstance() { + public add_partition_with_environment_context_args getEmptyArgsInstance() { return new add_partition_with_environment_context_args(); } - protected add_partition_with_environment_context_result getResult(I iface, add_partition_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_partition_with_environment_context_result getResult(I iface, add_partition_with_environment_context_args args) throws org.apache.thrift.TException { add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); try { result.success = iface.add_partition_with_environment_context(args.new_part, args.environment_context); @@ -5558,16 +5664,20 @@ } } - private static class add_partitions extends org.apache.thrift.ProcessFunction { + public static class add_partitions extends org.apache.thrift.ProcessFunction { public add_partitions() { super("add_partitions"); } - protected add_partitions_args getEmptyArgsInstance() { + public add_partitions_args getEmptyArgsInstance() { return new add_partitions_args(); } - protected add_partitions_result getResult(I iface, add_partitions_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_partitions_result getResult(I iface, add_partitions_args args) throws org.apache.thrift.TException { add_partitions_result result = new add_partitions_result(); try { result.success = iface.add_partitions(args.new_parts); @@ -5583,16 +5693,20 @@ } } - private static class append_partition extends org.apache.thrift.ProcessFunction { + public static class append_partition extends org.apache.thrift.ProcessFunction { public append_partition() { super("append_partition"); } - protected append_partition_args getEmptyArgsInstance() { + public append_partition_args getEmptyArgsInstance() { return new append_partition_args(); } - protected append_partition_result getResult(I iface, append_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public append_partition_result getResult(I iface, append_partition_args args) throws org.apache.thrift.TException { append_partition_result result = new append_partition_result(); try { result.success = iface.append_partition(args.db_name, args.tbl_name, args.part_vals); @@ -5607,16 +5721,20 @@ } } - private static class append_partition_by_name extends org.apache.thrift.ProcessFunction { + public static class append_partition_by_name extends org.apache.thrift.ProcessFunction { public append_partition_by_name() { super("append_partition_by_name"); } - protected append_partition_by_name_args getEmptyArgsInstance() { + public append_partition_by_name_args getEmptyArgsInstance() { return new append_partition_by_name_args(); } - protected append_partition_by_name_result getResult(I iface, append_partition_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public append_partition_by_name_result getResult(I iface, append_partition_by_name_args args) throws org.apache.thrift.TException { append_partition_by_name_result result = new append_partition_by_name_result(); try { result.success = iface.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); @@ -5631,16 +5749,20 @@ } } - private static class drop_partition extends org.apache.thrift.ProcessFunction { + public static class drop_partition extends org.apache.thrift.ProcessFunction { public drop_partition() { super("drop_partition"); } - protected drop_partition_args getEmptyArgsInstance() { + public drop_partition_args getEmptyArgsInstance() { return new drop_partition_args(); } - protected drop_partition_result getResult(I iface, drop_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_partition_result getResult(I iface, drop_partition_args args) throws org.apache.thrift.TException { drop_partition_result result = new drop_partition_result(); try { result.success = iface.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); @@ -5654,16 +5776,20 @@ } } - private static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { + public static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { public drop_partition_by_name() { super("drop_partition_by_name"); } - protected drop_partition_by_name_args getEmptyArgsInstance() { + public drop_partition_by_name_args getEmptyArgsInstance() { return new drop_partition_by_name_args(); } - protected drop_partition_by_name_result getResult(I iface, drop_partition_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_partition_by_name_result getResult(I iface, drop_partition_by_name_args args) throws org.apache.thrift.TException { drop_partition_by_name_result result = new drop_partition_by_name_result(); try { result.success = iface.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); @@ -5677,16 +5803,20 @@ } } - private static class get_partition extends org.apache.thrift.ProcessFunction { + public static class get_partition extends org.apache.thrift.ProcessFunction { public get_partition() { super("get_partition"); } - protected get_partition_args getEmptyArgsInstance() { + public get_partition_args getEmptyArgsInstance() { return new get_partition_args(); } - protected get_partition_result getResult(I iface, get_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_result getResult(I iface, get_partition_args args) throws org.apache.thrift.TException { get_partition_result result = new get_partition_result(); try { result.success = iface.get_partition(args.db_name, args.tbl_name, args.part_vals); @@ -5699,16 +5829,20 @@ } } - private static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { + public static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { public get_partition_with_auth() { super("get_partition_with_auth"); } - protected get_partition_with_auth_args getEmptyArgsInstance() { + public get_partition_with_auth_args getEmptyArgsInstance() { return new get_partition_with_auth_args(); } - protected get_partition_with_auth_result getResult(I iface, get_partition_with_auth_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_with_auth_result getResult(I iface, get_partition_with_auth_args args) throws org.apache.thrift.TException { get_partition_with_auth_result result = new get_partition_with_auth_result(); try { result.success = iface.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); @@ -5721,16 +5855,20 @@ } } - private static class get_partition_by_name extends org.apache.thrift.ProcessFunction { + public static class get_partition_by_name extends org.apache.thrift.ProcessFunction { public get_partition_by_name() { super("get_partition_by_name"); } - protected get_partition_by_name_args getEmptyArgsInstance() { + public get_partition_by_name_args getEmptyArgsInstance() { return new get_partition_by_name_args(); } - protected get_partition_by_name_result getResult(I iface, get_partition_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_by_name_result getResult(I iface, get_partition_by_name_args args) throws org.apache.thrift.TException { get_partition_by_name_result result = new get_partition_by_name_result(); try { result.success = iface.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); @@ -5743,16 +5881,20 @@ } } - private static class get_partitions extends org.apache.thrift.ProcessFunction { + public static class get_partitions extends org.apache.thrift.ProcessFunction { public get_partitions() { super("get_partitions"); } - protected get_partitions_args getEmptyArgsInstance() { + public get_partitions_args getEmptyArgsInstance() { return new get_partitions_args(); } - protected get_partitions_result getResult(I iface, get_partitions_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_result getResult(I iface, get_partitions_args args) throws org.apache.thrift.TException { get_partitions_result result = new get_partitions_result(); try { result.success = iface.get_partitions(args.db_name, args.tbl_name, args.max_parts); @@ -5765,16 +5907,20 @@ } } - private static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { + public static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { public get_partitions_with_auth() { super("get_partitions_with_auth"); } - protected get_partitions_with_auth_args getEmptyArgsInstance() { + public get_partitions_with_auth_args getEmptyArgsInstance() { return new get_partitions_with_auth_args(); } - protected get_partitions_with_auth_result getResult(I iface, get_partitions_with_auth_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_with_auth_result getResult(I iface, get_partitions_with_auth_args args) throws org.apache.thrift.TException { get_partitions_with_auth_result result = new get_partitions_with_auth_result(); try { result.success = iface.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); @@ -5787,16 +5933,20 @@ } } - private static class get_partition_names extends org.apache.thrift.ProcessFunction { + public static class get_partition_names extends org.apache.thrift.ProcessFunction { public get_partition_names() { super("get_partition_names"); } - protected get_partition_names_args getEmptyArgsInstance() { + public get_partition_names_args getEmptyArgsInstance() { return new get_partition_names_args(); } - protected get_partition_names_result getResult(I iface, get_partition_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_names_result getResult(I iface, get_partition_names_args args) throws org.apache.thrift.TException { get_partition_names_result result = new get_partition_names_result(); try { result.success = iface.get_partition_names(args.db_name, args.tbl_name, args.max_parts); @@ -5807,16 +5957,20 @@ } } - private static class get_partitions_ps extends org.apache.thrift.ProcessFunction { + public static class get_partitions_ps extends org.apache.thrift.ProcessFunction { public get_partitions_ps() { super("get_partitions_ps"); } - protected get_partitions_ps_args getEmptyArgsInstance() { + public get_partitions_ps_args getEmptyArgsInstance() { return new get_partitions_ps_args(); } - protected get_partitions_ps_result getResult(I iface, get_partitions_ps_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_ps_result getResult(I iface, get_partitions_ps_args args) throws org.apache.thrift.TException { get_partitions_ps_result result = new get_partitions_ps_result(); try { result.success = iface.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); @@ -5829,16 +5983,20 @@ } } - private static class get_partitions_ps_with_auth extends org.apache.thrift.ProcessFunction { + public static class get_partitions_ps_with_auth extends org.apache.thrift.ProcessFunction { public get_partitions_ps_with_auth() { super("get_partitions_ps_with_auth"); } - protected get_partitions_ps_with_auth_args getEmptyArgsInstance() { + public get_partitions_ps_with_auth_args getEmptyArgsInstance() { return new get_partitions_ps_with_auth_args(); } - protected get_partitions_ps_with_auth_result getResult(I iface, get_partitions_ps_with_auth_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_ps_with_auth_result getResult(I iface, get_partitions_ps_with_auth_args args) throws org.apache.thrift.TException { get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); try { result.success = iface.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); @@ -5851,16 +6009,20 @@ } } - private static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { + public static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { public get_partition_names_ps() { super("get_partition_names_ps"); } - protected get_partition_names_ps_args getEmptyArgsInstance() { + public get_partition_names_ps_args getEmptyArgsInstance() { return new get_partition_names_ps_args(); } - protected get_partition_names_ps_result getResult(I iface, get_partition_names_ps_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partition_names_ps_result getResult(I iface, get_partition_names_ps_args args) throws org.apache.thrift.TException { get_partition_names_ps_result result = new get_partition_names_ps_result(); try { result.success = iface.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); @@ -5873,16 +6035,20 @@ } } - private static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { + public static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { public get_partitions_by_filter() { super("get_partitions_by_filter"); } - protected get_partitions_by_filter_args getEmptyArgsInstance() { + public get_partitions_by_filter_args getEmptyArgsInstance() { return new get_partitions_by_filter_args(); } - protected get_partitions_by_filter_result getResult(I iface, get_partitions_by_filter_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_by_filter_result getResult(I iface, get_partitions_by_filter_args args) throws org.apache.thrift.TException { get_partitions_by_filter_result result = new get_partitions_by_filter_result(); try { result.success = iface.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); @@ -5895,16 +6061,20 @@ } } - private static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { + public static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { public get_partitions_by_names() { super("get_partitions_by_names"); } - protected get_partitions_by_names_args getEmptyArgsInstance() { + public get_partitions_by_names_args getEmptyArgsInstance() { return new get_partitions_by_names_args(); } - protected get_partitions_by_names_result getResult(I iface, get_partitions_by_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_partitions_by_names_result getResult(I iface, get_partitions_by_names_args args) throws org.apache.thrift.TException { get_partitions_by_names_result result = new get_partitions_by_names_result(); try { result.success = iface.get_partitions_by_names(args.db_name, args.tbl_name, args.names); @@ -5917,16 +6087,20 @@ } } - private static class alter_partition extends org.apache.thrift.ProcessFunction { + public static class alter_partition extends org.apache.thrift.ProcessFunction { public alter_partition() { super("alter_partition"); } - protected alter_partition_args getEmptyArgsInstance() { + public alter_partition_args getEmptyArgsInstance() { return new alter_partition_args(); } - protected alter_partition_result getResult(I iface, alter_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_partition_result getResult(I iface, alter_partition_args args) throws org.apache.thrift.TException { alter_partition_result result = new alter_partition_result(); try { iface.alter_partition(args.db_name, args.tbl_name, args.new_part); @@ -5939,16 +6113,20 @@ } } - private static class alter_partitions extends org.apache.thrift.ProcessFunction { + public static class alter_partitions extends org.apache.thrift.ProcessFunction { public alter_partitions() { super("alter_partitions"); } - protected alter_partitions_args getEmptyArgsInstance() { + public alter_partitions_args getEmptyArgsInstance() { return new alter_partitions_args(); } - protected alter_partitions_result getResult(I iface, alter_partitions_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_partitions_result getResult(I iface, alter_partitions_args args) throws org.apache.thrift.TException { alter_partitions_result result = new alter_partitions_result(); try { iface.alter_partitions(args.db_name, args.tbl_name, args.new_parts); @@ -5961,16 +6139,20 @@ } } - private static class alter_partition_with_environment_context extends org.apache.thrift.ProcessFunction { + public static class alter_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public alter_partition_with_environment_context() { super("alter_partition_with_environment_context"); } - protected alter_partition_with_environment_context_args getEmptyArgsInstance() { + public alter_partition_with_environment_context_args getEmptyArgsInstance() { return new alter_partition_with_environment_context_args(); } - protected alter_partition_with_environment_context_result getResult(I iface, alter_partition_with_environment_context_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_partition_with_environment_context_result getResult(I iface, alter_partition_with_environment_context_args args) throws org.apache.thrift.TException { alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); try { iface.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); @@ -5983,16 +6165,20 @@ } } - private static class rename_partition extends org.apache.thrift.ProcessFunction { + public static class rename_partition extends org.apache.thrift.ProcessFunction { public rename_partition() { super("rename_partition"); } - protected rename_partition_args getEmptyArgsInstance() { + public rename_partition_args getEmptyArgsInstance() { return new rename_partition_args(); } - protected rename_partition_result getResult(I iface, rename_partition_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public rename_partition_result getResult(I iface, rename_partition_args args) throws org.apache.thrift.TException { rename_partition_result result = new rename_partition_result(); try { iface.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); @@ -6005,16 +6191,20 @@ } } - private static class get_config_value extends org.apache.thrift.ProcessFunction { + public static class get_config_value extends org.apache.thrift.ProcessFunction { public get_config_value() { super("get_config_value"); } - protected get_config_value_args getEmptyArgsInstance() { + public get_config_value_args getEmptyArgsInstance() { return new get_config_value_args(); } - protected get_config_value_result getResult(I iface, get_config_value_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_config_value_result getResult(I iface, get_config_value_args args) throws org.apache.thrift.TException { get_config_value_result result = new get_config_value_result(); try { result.success = iface.get_config_value(args.name, args.defaultValue); @@ -6025,16 +6215,20 @@ } } - private static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { + public static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { public partition_name_to_vals() { super("partition_name_to_vals"); } - protected partition_name_to_vals_args getEmptyArgsInstance() { + public partition_name_to_vals_args getEmptyArgsInstance() { return new partition_name_to_vals_args(); } - protected partition_name_to_vals_result getResult(I iface, partition_name_to_vals_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public partition_name_to_vals_result getResult(I iface, partition_name_to_vals_args args) throws org.apache.thrift.TException { partition_name_to_vals_result result = new partition_name_to_vals_result(); try { result.success = iface.partition_name_to_vals(args.part_name); @@ -6045,16 +6239,20 @@ } } - private static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { + public static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { public partition_name_to_spec() { super("partition_name_to_spec"); } - protected partition_name_to_spec_args getEmptyArgsInstance() { + public partition_name_to_spec_args getEmptyArgsInstance() { return new partition_name_to_spec_args(); } - protected partition_name_to_spec_result getResult(I iface, partition_name_to_spec_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public partition_name_to_spec_result getResult(I iface, partition_name_to_spec_args args) throws org.apache.thrift.TException { partition_name_to_spec_result result = new partition_name_to_spec_result(); try { result.success = iface.partition_name_to_spec(args.part_name); @@ -6065,16 +6263,20 @@ } } - private static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { + public static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { public markPartitionForEvent() { super("markPartitionForEvent"); } - protected markPartitionForEvent_args getEmptyArgsInstance() { + public markPartitionForEvent_args getEmptyArgsInstance() { return new markPartitionForEvent_args(); } - protected markPartitionForEvent_result getResult(I iface, markPartitionForEvent_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public markPartitionForEvent_result getResult(I iface, markPartitionForEvent_args args) throws org.apache.thrift.TException { markPartitionForEvent_result result = new markPartitionForEvent_result(); try { iface.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); @@ -6095,16 +6297,20 @@ } } - private static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { + public static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { public isPartitionMarkedForEvent() { super("isPartitionMarkedForEvent"); } - protected isPartitionMarkedForEvent_args getEmptyArgsInstance() { + public isPartitionMarkedForEvent_args getEmptyArgsInstance() { return new isPartitionMarkedForEvent_args(); } - protected isPartitionMarkedForEvent_result getResult(I iface, isPartitionMarkedForEvent_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public isPartitionMarkedForEvent_result getResult(I iface, isPartitionMarkedForEvent_args args) throws org.apache.thrift.TException { isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); try { result.success = iface.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); @@ -6126,16 +6332,20 @@ } } - private static class add_index extends org.apache.thrift.ProcessFunction { + public static class add_index extends org.apache.thrift.ProcessFunction { public add_index() { super("add_index"); } - protected add_index_args getEmptyArgsInstance() { + public add_index_args getEmptyArgsInstance() { return new add_index_args(); } - protected add_index_result getResult(I iface, add_index_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public add_index_result getResult(I iface, add_index_args args) throws org.apache.thrift.TException { add_index_result result = new add_index_result(); try { result.success = iface.add_index(args.new_index, args.index_table); @@ -6150,16 +6360,20 @@ } } - private static class alter_index extends org.apache.thrift.ProcessFunction { + public static class alter_index extends org.apache.thrift.ProcessFunction { public alter_index() { super("alter_index"); } - protected alter_index_args getEmptyArgsInstance() { + public alter_index_args getEmptyArgsInstance() { return new alter_index_args(); } - protected alter_index_result getResult(I iface, alter_index_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public alter_index_result getResult(I iface, alter_index_args args) throws org.apache.thrift.TException { alter_index_result result = new alter_index_result(); try { iface.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); @@ -6172,16 +6386,20 @@ } } - private static class drop_index_by_name extends org.apache.thrift.ProcessFunction { + public static class drop_index_by_name extends org.apache.thrift.ProcessFunction { public drop_index_by_name() { super("drop_index_by_name"); } - protected drop_index_by_name_args getEmptyArgsInstance() { + public drop_index_by_name_args getEmptyArgsInstance() { return new drop_index_by_name_args(); } - protected drop_index_by_name_result getResult(I iface, drop_index_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_index_by_name_result getResult(I iface, drop_index_by_name_args args) throws org.apache.thrift.TException { drop_index_by_name_result result = new drop_index_by_name_result(); try { result.success = iface.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); @@ -6195,16 +6413,20 @@ } } - private static class get_index_by_name extends org.apache.thrift.ProcessFunction { + public static class get_index_by_name extends org.apache.thrift.ProcessFunction { public get_index_by_name() { super("get_index_by_name"); } - protected get_index_by_name_args getEmptyArgsInstance() { + public get_index_by_name_args getEmptyArgsInstance() { return new get_index_by_name_args(); } - protected get_index_by_name_result getResult(I iface, get_index_by_name_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_index_by_name_result getResult(I iface, get_index_by_name_args args) throws org.apache.thrift.TException { get_index_by_name_result result = new get_index_by_name_result(); try { result.success = iface.get_index_by_name(args.db_name, args.tbl_name, args.index_name); @@ -6217,16 +6439,20 @@ } } - private static class get_indexes extends org.apache.thrift.ProcessFunction { + public static class get_indexes extends org.apache.thrift.ProcessFunction { public get_indexes() { super("get_indexes"); } - protected get_indexes_args getEmptyArgsInstance() { + public get_indexes_args getEmptyArgsInstance() { return new get_indexes_args(); } - protected get_indexes_result getResult(I iface, get_indexes_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_indexes_result getResult(I iface, get_indexes_args args) throws org.apache.thrift.TException { get_indexes_result result = new get_indexes_result(); try { result.success = iface.get_indexes(args.db_name, args.tbl_name, args.max_indexes); @@ -6239,16 +6465,20 @@ } } - private static class get_index_names extends org.apache.thrift.ProcessFunction { + public static class get_index_names extends org.apache.thrift.ProcessFunction { public get_index_names() { super("get_index_names"); } - protected get_index_names_args getEmptyArgsInstance() { + public get_index_names_args getEmptyArgsInstance() { return new get_index_names_args(); } - protected get_index_names_result getResult(I iface, get_index_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_index_names_result getResult(I iface, get_index_names_args args) throws org.apache.thrift.TException { get_index_names_result result = new get_index_names_result(); try { result.success = iface.get_index_names(args.db_name, args.tbl_name, args.max_indexes); @@ -6259,16 +6489,20 @@ } } - private static class create_role extends org.apache.thrift.ProcessFunction { + public static class create_role extends org.apache.thrift.ProcessFunction { public create_role() { super("create_role"); } - protected create_role_args getEmptyArgsInstance() { + public create_role_args getEmptyArgsInstance() { return new create_role_args(); } - protected create_role_result getResult(I iface, create_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public create_role_result getResult(I iface, create_role_args args) throws org.apache.thrift.TException { create_role_result result = new create_role_result(); try { result.success = iface.create_role(args.role); @@ -6280,16 +6514,20 @@ } } - private static class drop_role extends org.apache.thrift.ProcessFunction { + public static class drop_role extends org.apache.thrift.ProcessFunction { public drop_role() { super("drop_role"); } - protected drop_role_args getEmptyArgsInstance() { + public drop_role_args getEmptyArgsInstance() { return new drop_role_args(); } - protected drop_role_result getResult(I iface, drop_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public drop_role_result getResult(I iface, drop_role_args args) throws org.apache.thrift.TException { drop_role_result result = new drop_role_result(); try { result.success = iface.drop_role(args.role_name); @@ -6301,16 +6539,20 @@ } } - private static class get_role_names extends org.apache.thrift.ProcessFunction { + public static class get_role_names extends org.apache.thrift.ProcessFunction { public get_role_names() { super("get_role_names"); } - protected get_role_names_args getEmptyArgsInstance() { + public get_role_names_args getEmptyArgsInstance() { return new get_role_names_args(); } - protected get_role_names_result getResult(I iface, get_role_names_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_role_names_result getResult(I iface, get_role_names_args args) throws org.apache.thrift.TException { get_role_names_result result = new get_role_names_result(); try { result.success = iface.get_role_names(); @@ -6321,16 +6563,20 @@ } } - private static class grant_role extends org.apache.thrift.ProcessFunction { + public static class grant_role extends org.apache.thrift.ProcessFunction { public grant_role() { super("grant_role"); } - protected grant_role_args getEmptyArgsInstance() { + public grant_role_args getEmptyArgsInstance() { return new grant_role_args(); } - protected grant_role_result getResult(I iface, grant_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public grant_role_result getResult(I iface, grant_role_args args) throws org.apache.thrift.TException { grant_role_result result = new grant_role_result(); try { result.success = iface.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); @@ -6342,16 +6588,20 @@ } } - private static class revoke_role extends org.apache.thrift.ProcessFunction { + public static class revoke_role extends org.apache.thrift.ProcessFunction { public revoke_role() { super("revoke_role"); } - protected revoke_role_args getEmptyArgsInstance() { + public revoke_role_args getEmptyArgsInstance() { return new revoke_role_args(); } - protected revoke_role_result getResult(I iface, revoke_role_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public revoke_role_result getResult(I iface, revoke_role_args args) throws org.apache.thrift.TException { revoke_role_result result = new revoke_role_result(); try { result.success = iface.revoke_role(args.role_name, args.principal_name, args.principal_type); @@ -6363,16 +6613,20 @@ } } - private static class list_roles extends org.apache.thrift.ProcessFunction { + public static class list_roles extends org.apache.thrift.ProcessFunction { public list_roles() { super("list_roles"); } - protected list_roles_args getEmptyArgsInstance() { + public list_roles_args getEmptyArgsInstance() { return new list_roles_args(); } - protected list_roles_result getResult(I iface, list_roles_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public list_roles_result getResult(I iface, list_roles_args args) throws org.apache.thrift.TException { list_roles_result result = new list_roles_result(); try { result.success = iface.list_roles(args.principal_name, args.principal_type); @@ -6383,16 +6637,20 @@ } } - private static class get_privilege_set extends org.apache.thrift.ProcessFunction { + public static class get_privilege_set extends org.apache.thrift.ProcessFunction { public get_privilege_set() { super("get_privilege_set"); } - protected get_privilege_set_args getEmptyArgsInstance() { + public get_privilege_set_args getEmptyArgsInstance() { return new get_privilege_set_args(); } - protected get_privilege_set_result getResult(I iface, get_privilege_set_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_privilege_set_result getResult(I iface, get_privilege_set_args args) throws org.apache.thrift.TException { get_privilege_set_result result = new get_privilege_set_result(); try { result.success = iface.get_privilege_set(args.hiveObject, args.user_name, args.group_names); @@ -6403,16 +6661,20 @@ } } - private static class list_privileges extends org.apache.thrift.ProcessFunction { + public static class list_privileges extends org.apache.thrift.ProcessFunction { public list_privileges() { super("list_privileges"); } - protected list_privileges_args getEmptyArgsInstance() { + public list_privileges_args getEmptyArgsInstance() { return new list_privileges_args(); } - protected list_privileges_result getResult(I iface, list_privileges_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public list_privileges_result getResult(I iface, list_privileges_args args) throws org.apache.thrift.TException { list_privileges_result result = new list_privileges_result(); try { result.success = iface.list_privileges(args.principal_name, args.principal_type, args.hiveObject); @@ -6423,16 +6685,20 @@ } } - private static class grant_privileges extends org.apache.thrift.ProcessFunction { + public static class grant_privileges extends org.apache.thrift.ProcessFunction { public grant_privileges() { super("grant_privileges"); } - protected grant_privileges_args getEmptyArgsInstance() { + public grant_privileges_args getEmptyArgsInstance() { return new grant_privileges_args(); } - protected grant_privileges_result getResult(I iface, grant_privileges_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public grant_privileges_result getResult(I iface, grant_privileges_args args) throws org.apache.thrift.TException { grant_privileges_result result = new grant_privileges_result(); try { result.success = iface.grant_privileges(args.privileges); @@ -6444,16 +6710,20 @@ } } - private static class revoke_privileges extends org.apache.thrift.ProcessFunction { + public static class revoke_privileges extends org.apache.thrift.ProcessFunction { public revoke_privileges() { super("revoke_privileges"); } - protected revoke_privileges_args getEmptyArgsInstance() { + public revoke_privileges_args getEmptyArgsInstance() { return new revoke_privileges_args(); } - protected revoke_privileges_result getResult(I iface, revoke_privileges_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public revoke_privileges_result getResult(I iface, revoke_privileges_args args) throws org.apache.thrift.TException { revoke_privileges_result result = new revoke_privileges_result(); try { result.success = iface.revoke_privileges(args.privileges); @@ -6465,16 +6735,20 @@ } } - private static class set_ugi extends org.apache.thrift.ProcessFunction { + public static class set_ugi extends org.apache.thrift.ProcessFunction { public set_ugi() { super("set_ugi"); } - protected set_ugi_args getEmptyArgsInstance() { + public set_ugi_args getEmptyArgsInstance() { return new set_ugi_args(); } - protected set_ugi_result getResult(I iface, set_ugi_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public set_ugi_result getResult(I iface, set_ugi_args args) throws org.apache.thrift.TException { set_ugi_result result = new set_ugi_result(); try { result.success = iface.set_ugi(args.user_name, args.group_names); @@ -6485,16 +6759,20 @@ } } - private static class get_delegation_token extends org.apache.thrift.ProcessFunction { + public static class get_delegation_token extends org.apache.thrift.ProcessFunction { public get_delegation_token() { super("get_delegation_token"); } - protected get_delegation_token_args getEmptyArgsInstance() { + public get_delegation_token_args getEmptyArgsInstance() { return new get_delegation_token_args(); } - protected get_delegation_token_result getResult(I iface, get_delegation_token_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public get_delegation_token_result getResult(I iface, get_delegation_token_args args) throws org.apache.thrift.TException { get_delegation_token_result result = new get_delegation_token_result(); try { result.success = iface.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name); @@ -6505,16 +6783,20 @@ } } - private static class renew_delegation_token extends org.apache.thrift.ProcessFunction { + public static class renew_delegation_token extends org.apache.thrift.ProcessFunction { public renew_delegation_token() { super("renew_delegation_token"); } - protected renew_delegation_token_args getEmptyArgsInstance() { + public renew_delegation_token_args getEmptyArgsInstance() { return new renew_delegation_token_args(); } - protected renew_delegation_token_result getResult(I iface, renew_delegation_token_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public renew_delegation_token_result getResult(I iface, renew_delegation_token_args args) throws org.apache.thrift.TException { renew_delegation_token_result result = new renew_delegation_token_result(); try { result.success = iface.renew_delegation_token(args.token_str_form); @@ -6526,16 +6808,20 @@ } } - private static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { + public static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { public cancel_delegation_token() { super("cancel_delegation_token"); } - protected cancel_delegation_token_args getEmptyArgsInstance() { + public cancel_delegation_token_args getEmptyArgsInstance() { return new cancel_delegation_token_args(); } - protected cancel_delegation_token_result getResult(I iface, cancel_delegation_token_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public cancel_delegation_token_result getResult(I iface, cancel_delegation_token_args args) throws org.apache.thrift.TException { cancel_delegation_token_result result = new cancel_delegation_token_result(); try { iface.cancel_delegation_token(args.token_str_form); @@ -6553,6 +6839,12 @@ private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_database_argsTupleSchemeFactory()); + } + private Database database; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -6614,7 +6906,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -6773,43 +7064,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DATABASE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.database = new Database(); - this.database.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -6830,6 +7089,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (database != null) { + database.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6848,6 +7111,90 @@ } } + private static class create_database_argsStandardSchemeFactory implements SchemeFactory { + public create_database_argsStandardScheme getScheme() { + return new create_database_argsStandardScheme(); + } + } + + private static class create_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DATABASE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.database = new Database(); + struct.database.read(iprot); + struct.setDatabaseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + struct.database.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_database_argsTupleSchemeFactory implements SchemeFactory { + public create_database_argsTupleScheme getScheme() { + return new create_database_argsTupleScheme(); + } + } + + private static class create_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDatabase()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetDatabase()) { + struct.database.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.database = new Database(); + struct.database.read(iprot); + struct.setDatabaseIsSet(true); + } + } + } + } public static class create_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -6857,6 +7204,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_database_resultTupleSchemeFactory()); + } + private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required @@ -6926,7 +7279,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -7221,67 +7573,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -7317,6 +7614,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -7335,6 +7633,140 @@ } } + private static class create_database_resultStandardSchemeFactory implements SchemeFactory { + public create_database_resultStandardScheme getScheme() { + return new create_database_resultStandardScheme(); + } + } + + private static class create_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_database_resultTupleSchemeFactory implements SchemeFactory { + public create_database_resultTupleScheme getScheme() { + return new create_database_resultTupleScheme(); + } + } + + private static class create_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -7342,6 +7774,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_database_argsTupleSchemeFactory()); + } + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -7403,7 +7841,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -7562,42 +7999,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -7618,6 +8024,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -7636,6 +8043,88 @@ } } + private static class get_database_argsStandardSchemeFactory implements SchemeFactory { + public get_database_argsStandardScheme getScheme() { + return new get_database_argsStandardScheme(); + } + } + + private static class get_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_database_argsTupleSchemeFactory implements SchemeFactory { + public get_database_argsTupleScheme getScheme() { + return new get_database_argsTupleScheme(); + } + } + + private static class get_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + } + } public static class get_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -7645,6 +8134,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_database_resultTupleSchemeFactory()); + } + private Database success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -7714,7 +8209,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -8009,67 +8503,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Database(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -8105,6 +8544,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -8123,6 +8566,140 @@ } } + private static class get_database_resultStandardSchemeFactory implements SchemeFactory { + public get_database_resultStandardScheme getScheme() { + return new get_database_resultStandardScheme(); + } + } + + private static class get_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Database(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_database_resultTupleSchemeFactory implements SchemeFactory { + public get_database_resultTupleScheme getScheme() { + return new get_database_resultTupleScheme(); + } + } + + private static class get_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Database(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class drop_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -8132,6 +8709,12 @@ private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_database_argsTupleSchemeFactory()); + } + private String name; // required private boolean deleteData; // required private boolean cascade; // required @@ -8203,8 +8786,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; private static final int __CASCADE_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -8238,8 +8820,7 @@ * Performs a deep copy on other. */ public drop_database_args(drop_database_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } @@ -8293,16 +8874,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public boolean isCascade() { @@ -8315,16 +8896,16 @@ } public void unsetCascade() { - __isset_bit_vector.clear(__CASCADE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CASCADE_ISSET_ID); } /** Returns true if field cascade is set (has been assigned a value) and false otherwise */ public boolean isSetCascade() { - return __isset_bit_vector.get(__CASCADE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); } public void setCascadeIsSet(boolean value) { - __isset_bit_vector.set(__CASCADE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -8499,64 +9080,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // CASCADE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.cascade = iprot.readBool(); - setCascadeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(CASCADE_FIELD_DESC); - oprot.writeBool(this.cascade); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -8585,6 +9113,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -8598,13 +9127,137 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_database_argsStandardSchemeFactory implements SchemeFactory { + public drop_database_argsStandardScheme getScheme() { + return new drop_database_argsStandardScheme(); + } + } + + private static class drop_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CASCADE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.cascade = iprot.readBool(); + struct.setCascadeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(CASCADE_FIELD_DESC); + oprot.writeBool(struct.cascade); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_database_argsTupleSchemeFactory implements SchemeFactory { + public drop_database_argsTupleScheme getScheme() { + return new drop_database_argsTupleScheme(); + } + } + + private static class drop_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetDeleteData()) { + optionals.set(1); + } + if (struct.isSetCascade()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + if (struct.isSetCascade()) { + oprot.writeBool(struct.cascade); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + if (incoming.get(2)) { + struct.cascade = iprot.readBool(); + struct.setCascadeIsSet(true); + } + } + } + } public static class drop_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -8614,6 +9267,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_database_resultTupleSchemeFactory()); + } + private NoSuchObjectException o1; // required private InvalidOperationException o2; // required private MetaException o3; // required @@ -8683,7 +9342,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -8978,67 +9636,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -9074,6 +9677,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9092,6 +9696,140 @@ } } + private static class drop_database_resultStandardSchemeFactory implements SchemeFactory { + public drop_database_resultStandardScheme getScheme() { + return new drop_database_resultStandardScheme(); + } + } + + private static class drop_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_database_resultTupleSchemeFactory implements SchemeFactory { + public drop_database_resultTupleScheme getScheme() { + return new drop_database_resultTupleScheme(); + } + } + + private static class drop_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_databases_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -9099,6 +9837,12 @@ private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_databases_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_databases_argsTupleSchemeFactory()); + } + private String pattern; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -9160,7 +9904,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -9319,42 +10062,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PATTERN - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.pattern = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -9375,6 +10087,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9393,6 +10106,88 @@ } } + private static class get_databases_argsStandardSchemeFactory implements SchemeFactory { + public get_databases_argsStandardScheme getScheme() { + return new get_databases_argsStandardScheme(); + } + } + + private static class get_databases_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PATTERN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(struct.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_databases_argsTupleSchemeFactory implements SchemeFactory { + public get_databases_argsTupleScheme getScheme() { + return new get_databases_argsTupleScheme(); + } + } + + private static class get_databases_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPattern()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + } + } + } public static class get_databases_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -9401,6 +10196,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_databases_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_databases_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -9466,7 +10267,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -9713,71 +10513,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list124 = iprot.readListBegin(); - this.success = new ArrayList(_list124.size); - for (int _i125 = 0; _i125 < _list124.size; ++_i125) - { - String _elem126; // required - _elem126 = iprot.readString(); - this.success.add(_elem126); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter127 : this.success) - { - oprot.writeString(_iter127); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -9805,6 +10546,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9823,13 +10565,158 @@ } } + private static class get_databases_resultStandardSchemeFactory implements SchemeFactory { + public get_databases_resultStandardScheme getScheme() { + return new get_databases_resultStandardScheme(); + } + } + + private static class get_databases_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list248 = iprot.readListBegin(); + struct.success = new ArrayList(_list248.size); + for (int _i249 = 0; _i249 < _list248.size; ++_i249) + { + String _elem250; // required + _elem250 = iprot.readString(); + struct.success.add(_elem250); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter251 : struct.success) + { + oprot.writeString(_iter251); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_databases_resultTupleSchemeFactory implements SchemeFactory { + public get_databases_resultTupleScheme getScheme() { + return new get_databases_resultTupleScheme(); + } + } + + private static class get_databases_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter252 : struct.success) + { + oprot.writeString(_iter252); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list253 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list253.size); + for (int _i254 = 0; _i254 < _list253.size; ++_i254) + { + String _elem255; // required + _elem255 = iprot.readString(); + struct.success.add(_elem255); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_all_databases_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_databases_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_databases_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -9970,30 +10857,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -10007,6 +10875,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10025,6 +10894,62 @@ } } + private static class get_all_databases_argsStandardSchemeFactory implements SchemeFactory { + public get_all_databases_argsStandardScheme getScheme() { + return new get_all_databases_argsStandardScheme(); + } + } + + private static class get_all_databases_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_databases_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_databases_argsTupleSchemeFactory implements SchemeFactory { + public get_all_databases_argsTupleScheme getScheme() { + return new get_all_databases_argsTupleScheme(); + } + } + + private static class get_all_databases_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class get_all_databases_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -10033,6 +10958,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_databases_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_databases_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -10098,7 +11029,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -10345,71 +11275,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); - this.success = new ArrayList(_list128.size); - for (int _i129 = 0; _i129 < _list128.size; ++_i129) - { - String _elem130; // required - _elem130 = iprot.readString(); - this.success.add(_elem130); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter131 : this.success) - { - oprot.writeString(_iter131); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -10437,6 +11308,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10455,6 +11327,145 @@ } } + private static class get_all_databases_resultStandardSchemeFactory implements SchemeFactory { + public get_all_databases_resultStandardScheme getScheme() { + return new get_all_databases_resultStandardScheme(); + } + } + + private static class get_all_databases_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list256 = iprot.readListBegin(); + struct.success = new ArrayList(_list256.size); + for (int _i257 = 0; _i257 < _list256.size; ++_i257) + { + String _elem258; // required + _elem258 = iprot.readString(); + struct.success.add(_elem258); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_databases_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter259 : struct.success) + { + oprot.writeString(_iter259); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_databases_resultTupleSchemeFactory implements SchemeFactory { + public get_all_databases_resultTupleScheme getScheme() { + return new get_all_databases_resultTupleScheme(); + } + } + + private static class get_all_databases_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter260 : struct.success) + { + oprot.writeString(_iter260); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list261 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list261.size); + for (int _i262 = 0; _i262 < _list261.size; ++_i262) + { + String _elem263; // required + _elem263 = iprot.readString(); + struct.success.add(_elem263); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class alter_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -10463,6 +11474,12 @@ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_database_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_database_argsTupleSchemeFactory()); + } + private String dbname; // required private Database db; // required @@ -10528,7 +11545,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -10755,55 +11771,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.db = new Database(); - this.db.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.db != null) { - oprot.writeFieldBegin(DB_FIELD_DESC); - this.db.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -10832,6 +11804,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (db != null) { + db.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10850,6 +11826,113 @@ } } + private static class alter_database_argsStandardSchemeFactory implements SchemeFactory { + public alter_database_argsStandardScheme getScheme() { + return new alter_database_argsStandardScheme(); + } + } + + private static class alter_database_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_database_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.db = new Database(); + struct.db.read(iprot); + struct.setDbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_database_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.db != null) { + oprot.writeFieldBegin(DB_FIELD_DESC); + struct.db.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_database_argsTupleSchemeFactory implements SchemeFactory { + public alter_database_argsTupleScheme getScheme() { + return new alter_database_argsTupleScheme(); + } + } + + private static class alter_database_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetDb()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetDb()) { + struct.db.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_database_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.db = new Database(); + struct.db.read(iprot); + struct.setDbIsSet(true); + } + } + } + } public static class alter_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -10858,6 +11941,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_database_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_database_resultTupleSchemeFactory()); + } + private MetaException o1; // required private NoSuchObjectException o2; // required @@ -10923,7 +12012,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -11150,55 +12238,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -11226,6 +12271,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11244,6 +12290,115 @@ } } + private static class alter_database_resultStandardSchemeFactory implements SchemeFactory { + public alter_database_resultStandardScheme getScheme() { + return new alter_database_resultStandardScheme(); + } + } + + private static class alter_database_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_database_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_database_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_database_resultTupleSchemeFactory implements SchemeFactory { + public alter_database_resultTupleScheme getScheme() { + return new alter_database_resultTupleScheme(); + } + } + + private static class alter_database_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_database_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11251,6 +12406,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_argsTupleSchemeFactory()); + } + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -11312,7 +12473,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -11471,42 +12631,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -11527,6 +12656,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11545,6 +12675,88 @@ } } + private static class get_type_argsStandardSchemeFactory implements SchemeFactory { + public get_type_argsStandardScheme getScheme() { + return new get_type_argsStandardScheme(); + } + } + + private static class get_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_argsTupleSchemeFactory implements SchemeFactory { + public get_type_argsTupleScheme getScheme() { + return new get_type_argsTupleScheme(); + } + } + + private static class get_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + } + } public static class get_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -11554,6 +12766,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_resultTupleSchemeFactory()); + } + private Type success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -11623,7 +12841,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -11918,67 +13135,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Type(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -12014,6 +13176,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -12032,6 +13198,140 @@ } } + private static class get_type_resultStandardSchemeFactory implements SchemeFactory { + public get_type_resultStandardScheme getScheme() { + return new get_type_resultStandardScheme(); + } + } + + private static class get_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Type(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_resultTupleSchemeFactory implements SchemeFactory { + public get_type_resultTupleScheme getScheme() { + return new get_type_resultTupleScheme(); + } + } + + private static class get_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Type(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class create_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12039,6 +13339,12 @@ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_type_argsTupleSchemeFactory()); + } + private Type type; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -12100,7 +13406,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -12259,43 +13564,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TYPE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.type = new Type(); - this.type.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - this.type.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -12316,6 +13589,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (type != null) { + type.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -12334,6 +13611,90 @@ } } + private static class create_type_argsStandardSchemeFactory implements SchemeFactory { + public create_type_argsStandardScheme getScheme() { + return new create_type_argsStandardScheme(); + } + } + + private static class create_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_type_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.type = new Type(); + struct.type.read(iprot); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_type_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + struct.type.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_type_argsTupleSchemeFactory implements SchemeFactory { + public create_type_argsTupleScheme getScheme() { + return new create_type_argsTupleScheme(); + } + } + + private static class create_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetType()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetType()) { + struct.type.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.type = new Type(); + struct.type.read(iprot); + struct.setTypeIsSet(true); + } + } + } + } public static class create_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12344,6 +13705,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_type_resultTupleSchemeFactory()); + } + private boolean success; // required private AlreadyExistsException o1; // required private InvalidObjectException o2; // required @@ -12418,8 +13785,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -12456,8 +13822,7 @@ * Performs a deep copy on other. */ public create_type_result(create_type_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); @@ -12493,16 +13858,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public AlreadyExistsException getO1() { @@ -12783,79 +14148,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -12895,6 +14193,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -12907,12 +14206,171 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class create_type_resultStandardSchemeFactory implements SchemeFactory { + public create_type_resultStandardScheme getScheme() { + return new create_type_resultStandardScheme(); + } + } + + private static class create_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_type_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_type_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_type_resultTupleSchemeFactory implements SchemeFactory { + public create_type_resultTupleScheme getScheme() { + return new create_type_resultTupleScheme(); + } + } + + private static class create_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class drop_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -12920,6 +14378,12 @@ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_type_argsTupleSchemeFactory()); + } + private String type; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -12981,7 +14445,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -13140,42 +14603,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -13196,6 +14628,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -13214,6 +14647,88 @@ } } + private static class drop_type_argsStandardSchemeFactory implements SchemeFactory { + public drop_type_argsStandardScheme getScheme() { + return new drop_type_argsStandardScheme(); + } + } + + private static class drop_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_type_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_type_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(struct.type); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_type_argsTupleSchemeFactory implements SchemeFactory { + public drop_type_argsTupleScheme getScheme() { + return new drop_type_argsTupleScheme(); + } + } + + private static class drop_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetType()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetType()) { + oprot.writeString(struct.type); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_type_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } + } + } + } public static class drop_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -13223,6 +14738,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_type_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -13293,8 +14814,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -13327,8 +14847,7 @@ * Performs a deep copy on other. */ public drop_type_result(drop_type_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -13360,16 +14879,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -13590,67 +15109,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -13682,6 +15146,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -13694,12 +15159,146 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_type_resultStandardSchemeFactory implements SchemeFactory { + public drop_type_resultStandardScheme getScheme() { + return new drop_type_resultStandardScheme(); + } + } + + private static class drop_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_type_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_type_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_type_resultTupleSchemeFactory implements SchemeFactory { + public drop_type_resultTupleScheme getScheme() { + return new drop_type_resultTupleScheme(); + } + } + + private static class drop_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_type_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_type_all_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -13707,6 +15306,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_all_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_all_argsTupleSchemeFactory()); + } + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -13768,7 +15373,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -13927,42 +15531,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -13983,6 +15556,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -14001,6 +15575,88 @@ } } + private static class get_type_all_argsStandardSchemeFactory implements SchemeFactory { + public get_type_all_argsStandardScheme getScheme() { + return new get_type_all_argsStandardScheme(); + } + } + + private static class get_type_all_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_all_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_all_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_all_argsTupleSchemeFactory implements SchemeFactory { + public get_type_all_argsTupleScheme getScheme() { + return new get_type_all_argsTupleScheme(); + } + } + + private static class get_type_all_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_all_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_all_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + } + } public static class get_type_all_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14009,6 +15665,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_type_all_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_type_all_resultTupleSchemeFactory()); + } + private Map success; // required private MetaException o2; // required @@ -14074,7 +15736,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -14326,75 +15987,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map132 = iprot.readMapBegin(); - this.success = new HashMap(2*_map132.size); - for (int _i133 = 0; _i133 < _map132.size; ++_i133) - { - String _key134; // required - Type _val135; // required - _key134 = iprot.readString(); - _val135 = new Type(); - _val135.read(iprot); - this.success.put(_key134, _val135); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Map.Entry _iter136 : this.success.entrySet()) - { - oprot.writeString(_iter136.getKey()); - _iter136.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -14422,6 +16020,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -14440,6 +16039,153 @@ } } + private static class get_type_all_resultStandardSchemeFactory implements SchemeFactory { + public get_type_all_resultStandardScheme getScheme() { + return new get_type_all_resultStandardScheme(); + } + } + + private static class get_type_all_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_all_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map264 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map264.size); + for (int _i265 = 0; _i265 < _map264.size; ++_i265) + { + String _key266; // required + Type _val267; // required + _key266 = iprot.readString(); + _val267 = new Type(); + _val267.read(iprot); + struct.success.put(_key266, _val267); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_all_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Map.Entry _iter268 : struct.success.entrySet()) + { + oprot.writeString(_iter268.getKey()); + _iter268.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_type_all_resultTupleSchemeFactory implements SchemeFactory { + public get_type_all_resultTupleScheme getScheme() { + return new get_type_all_resultTupleScheme(); + } + } + + private static class get_type_all_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_type_all_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter269 : struct.success.entrySet()) + { + oprot.writeString(_iter269.getKey()); + _iter269.getValue().write(oprot); + } + } + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_type_all_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map270 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map270.size); + for (int _i271 = 0; _i271 < _map270.size; ++_i271) + { + String _key272; // required + Type _val273; // required + _key272 = iprot.readString(); + _val273 = new Type(); + _val273.read(iprot); + struct.success.put(_key272, _val273); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_fields_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14448,6 +16194,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_fields_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_fields_argsTupleSchemeFactory()); + } + private String db_name; // required private String table_name; // required @@ -14513,7 +16265,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -14740,54 +16491,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.table_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -14816,6 +16524,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -14834,6 +16543,111 @@ } } + private static class get_fields_argsStandardSchemeFactory implements SchemeFactory { + public get_fields_argsStandardScheme getScheme() { + return new get_fields_argsStandardScheme(); + } + } + + private static class get_fields_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_fields_argsTupleSchemeFactory implements SchemeFactory { + public get_fields_argsTupleScheme getScheme() { + return new get_fields_argsTupleScheme(); + } + } + + private static class get_fields_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + } + } + } public static class get_fields_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -14844,6 +16658,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_fields_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_fields_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private UnknownTableException o2; // required @@ -14917,7 +16737,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -15300,96 +17119,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list137 = iprot.readListBegin(); - this.success = new ArrayList(_list137.size); - for (int _i138 = 0; _i138 < _list137.size; ++_i138) - { - FieldSchema _elem139; // required - _elem139 = new FieldSchema(); - _elem139.read(iprot); - this.success.add(_elem139); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (FieldSchema _iter140 : this.success) - { - _iter140.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -15433,6 +17168,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -15451,6 +17187,197 @@ } } + private static class get_fields_resultStandardSchemeFactory implements SchemeFactory { + public get_fields_resultStandardScheme getScheme() { + return new get_fields_resultStandardScheme(); + } + } + + private static class get_fields_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list274 = iprot.readListBegin(); + struct.success = new ArrayList(_list274.size); + for (int _i275 = 0; _i275 < _list274.size; ++_i275) + { + FieldSchema _elem276; // required + _elem276 = new FieldSchema(); + _elem276.read(iprot); + struct.success.add(_elem276); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FieldSchema _iter277 : struct.success) + { + _iter277.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_fields_resultTupleSchemeFactory implements SchemeFactory { + public get_fields_resultTupleScheme getScheme() { + return new get_fields_resultTupleScheme(); + } + } + + private static class get_fields_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (FieldSchema _iter278 : struct.success) + { + _iter278.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list279.size); + for (int _i280 = 0; _i280 < _list279.size; ++_i280) + { + FieldSchema _elem281; // required + _elem281 = new FieldSchema(); + _elem281.read(iprot); + struct.success.add(_elem281); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_schema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -15459,6 +17386,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_schema_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_schema_argsTupleSchemeFactory()); + } + private String db_name; // required private String table_name; // required @@ -15524,7 +17457,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -15751,54 +17683,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.table_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -15827,6 +17716,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -15845,6 +17735,111 @@ } } + private static class get_schema_argsStandardSchemeFactory implements SchemeFactory { + public get_schema_argsStandardScheme getScheme() { + return new get_schema_argsStandardScheme(); + } + } + + private static class get_schema_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_schema_argsTupleSchemeFactory implements SchemeFactory { + public get_schema_argsTupleScheme getScheme() { + return new get_schema_argsTupleScheme(); + } + } + + private static class get_schema_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + } + } + } public static class get_schema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -15855,6 +17850,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_schema_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_schema_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private UnknownTableException o2; // required @@ -15928,7 +17929,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -16311,96 +18311,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list141 = iprot.readListBegin(); - this.success = new ArrayList(_list141.size); - for (int _i142 = 0; _i142 < _list141.size; ++_i142) - { - FieldSchema _elem143; // required - _elem143 = new FieldSchema(); - _elem143.read(iprot); - this.success.add(_elem143); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (FieldSchema _iter144 : this.success) - { - _iter144.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -16444,6 +18360,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -16462,6 +18379,197 @@ } } + private static class get_schema_resultStandardSchemeFactory implements SchemeFactory { + public get_schema_resultStandardScheme getScheme() { + return new get_schema_resultStandardScheme(); + } + } + + private static class get_schema_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list282 = iprot.readListBegin(); + struct.success = new ArrayList(_list282.size); + for (int _i283 = 0; _i283 < _list282.size; ++_i283) + { + FieldSchema _elem284; // required + _elem284 = new FieldSchema(); + _elem284.read(iprot); + struct.success.add(_elem284); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FieldSchema _iter285 : struct.success) + { + _iter285.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_schema_resultTupleSchemeFactory implements SchemeFactory { + public get_schema_resultTupleScheme getScheme() { + return new get_schema_resultTupleScheme(); + } + } + + private static class get_schema_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (FieldSchema _iter286 : struct.success) + { + _iter286.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list287.size); + for (int _i288 = 0; _i288 < _list287.size; ++_i288) + { + FieldSchema _elem289; // required + _elem289 = new FieldSchema(); + _elem289.read(iprot); + struct.success.add(_elem289); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new UnknownTableException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class create_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -16469,6 +18577,12 @@ private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_argsTupleSchemeFactory()); + } + private Table tbl; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -16530,7 +18644,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -16689,43 +18802,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -16746,6 +18827,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (tbl != null) { + tbl.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -16764,6 +18849,90 @@ } } + private static class create_table_argsStandardSchemeFactory implements SchemeFactory { + public create_table_argsStandardScheme getScheme() { + return new create_table_argsStandardScheme(); + } + } + + private static class create_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + struct.tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_argsTupleSchemeFactory implements SchemeFactory { + public create_table_argsTupleScheme getScheme() { + return new create_table_argsTupleScheme(); + } + } + + private static class create_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTbl()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTbl()) { + struct.tbl.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } + } + } + } public static class create_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -16774,6 +18943,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_resultTupleSchemeFactory()); + } + private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required @@ -16847,7 +19022,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -17210,79 +19384,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -17326,6 +19433,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -17344,6 +19452,165 @@ } } + private static class create_table_resultStandardSchemeFactory implements SchemeFactory { + public create_table_resultStandardScheme getScheme() { + return new create_table_resultStandardScheme(); + } + } + + private static class create_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_resultTupleSchemeFactory implements SchemeFactory { + public create_table_resultTupleScheme getScheme() { + return new create_table_resultTupleScheme(); + } + } + + private static class create_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + if (struct.isSetO4()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(3)) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class create_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17352,6 +19619,12 @@ private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_environment_context_argsTupleSchemeFactory()); + } + private Table tbl; // required private EnvironmentContext environment_context; // required @@ -17417,7 +19690,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -17644,56 +19916,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -17722,6 +19949,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (tbl != null) { + tbl.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -17740,6 +19974,115 @@ } } + private static class create_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_argsStandardScheme getScheme() { + return new create_table_with_environment_context_argsStandardScheme(); + } + } + + private static class create_table_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + struct.tbl.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_argsTupleScheme getScheme() { + return new create_table_with_environment_context_argsTupleScheme(); + } + } + + private static class create_table_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTbl()) { + optionals.set(0); + } + if (struct.isSetEnvironment_context()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTbl()) { + struct.tbl.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } + if (incoming.get(1)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class create_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -17750,6 +20093,12 @@ private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_environment_context_resultTupleSchemeFactory()); + } + private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required @@ -17823,7 +20172,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -18186,79 +20534,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -18302,6 +20583,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -18320,6 +20602,165 @@ } } + private static class create_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_resultStandardScheme getScheme() { + return new create_table_with_environment_context_resultStandardScheme(); + } + } + + private static class create_table_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public create_table_with_environment_context_resultTupleScheme getScheme() { + return new create_table_with_environment_context_resultTupleScheme(); + } + } + + private static class create_table_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + if (struct.isSetO4()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.o1 = new AlreadyExistsException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(3)) { + struct.o4 = new NoSuchObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + } public static class drop_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -18329,6 +20770,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_table_argsTupleSchemeFactory()); + } + private String dbname; // required private String name; // required private boolean deleteData; // required @@ -18399,8 +20846,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -18433,8 +20879,7 @@ * Performs a deep copy on other. */ public drop_table_args(drop_table_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } @@ -18512,16 +20957,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -18696,65 +21141,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -18787,6 +21178,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -18800,13 +21192,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_table_argsStandardSchemeFactory implements SchemeFactory { + public drop_table_argsStandardScheme getScheme() { + return new drop_table_argsStandardScheme(); + } + } + + private static class drop_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_table_argsTupleSchemeFactory implements SchemeFactory { + public drop_table_argsTupleScheme getScheme() { + return new drop_table_argsTupleScheme(); + } + } + + private static class drop_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetName()) { + optionals.set(1); + } + if (struct.isSetDeleteData()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(2)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -18815,6 +21333,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_table_resultTupleSchemeFactory()); + } + private NoSuchObjectException o1; // required private MetaException o3; // required @@ -18880,7 +21404,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -19107,55 +21630,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -19183,6 +21663,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -19201,6 +21682,115 @@ } } + private static class drop_table_resultStandardSchemeFactory implements SchemeFactory { + public drop_table_resultStandardScheme getScheme() { + return new drop_table_resultStandardScheme(); + } + } + + private static class drop_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_table_resultTupleSchemeFactory implements SchemeFactory { + public drop_table_resultTupleScheme getScheme() { + return new drop_table_resultTupleScheme(); + } + } + + private static class drop_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO3()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19209,6 +21799,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_tables_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_tables_argsTupleSchemeFactory()); + } + private String db_name; // required private String pattern; // required @@ -19274,7 +21870,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -19501,54 +22096,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PATTERN - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.pattern = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -19577,6 +22129,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -19595,6 +22148,111 @@ } } + private static class get_tables_argsStandardSchemeFactory implements SchemeFactory { + public get_tables_argsStandardScheme getScheme() { + return new get_tables_argsStandardScheme(); + } + } + + private static class get_tables_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PATTERN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(struct.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_tables_argsTupleSchemeFactory implements SchemeFactory { + public get_tables_argsTupleScheme getScheme() { + return new get_tables_argsTupleScheme(); + } + } + + private static class get_tables_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetPattern()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + } + } + } public static class get_tables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -19603,6 +22261,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_tables_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_tables_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -19668,7 +22332,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -19915,71 +22578,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list145 = iprot.readListBegin(); - this.success = new ArrayList(_list145.size); - for (int _i146 = 0; _i146 < _list145.size; ++_i146) - { - String _elem147; // required - _elem147 = iprot.readString(); - this.success.add(_elem147); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter148 : this.success) - { - oprot.writeString(_iter148); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -20007,6 +22611,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20025,6 +22630,145 @@ } } + private static class get_tables_resultStandardSchemeFactory implements SchemeFactory { + public get_tables_resultStandardScheme getScheme() { + return new get_tables_resultStandardScheme(); + } + } + + private static class get_tables_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list290 = iprot.readListBegin(); + struct.success = new ArrayList(_list290.size); + for (int _i291 = 0; _i291 < _list290.size; ++_i291) + { + String _elem292; // required + _elem292 = iprot.readString(); + struct.success.add(_elem292); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter293 : struct.success) + { + oprot.writeString(_iter293); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_tables_resultTupleSchemeFactory implements SchemeFactory { + public get_tables_resultTupleScheme getScheme() { + return new get_tables_resultTupleScheme(); + } + } + + private static class get_tables_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter294 : struct.success) + { + oprot.writeString(_iter294); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list295 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list295.size); + for (int _i296 = 0; _i296 < _list295.size; ++_i296) + { + String _elem297; // required + _elem297 = iprot.readString(); + struct.success.add(_elem297); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_all_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20032,6 +22776,12 @@ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_tables_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_tables_argsTupleSchemeFactory()); + } + private String db_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -20093,7 +22843,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -20252,42 +23001,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -20308,6 +23026,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20326,6 +23045,88 @@ } } + private static class get_all_tables_argsStandardSchemeFactory implements SchemeFactory { + public get_all_tables_argsStandardScheme getScheme() { + return new get_all_tables_argsStandardScheme(); + } + } + + private static class get_all_tables_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_tables_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_tables_argsTupleSchemeFactory implements SchemeFactory { + public get_all_tables_argsTupleScheme getScheme() { + return new get_all_tables_argsTupleScheme(); + } + } + + private static class get_all_tables_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + } + } + } public static class get_all_tables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20334,6 +23135,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_tables_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_tables_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -20399,7 +23206,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -20646,71 +23452,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list149 = iprot.readListBegin(); - this.success = new ArrayList(_list149.size); - for (int _i150 = 0; _i150 < _list149.size; ++_i150) - { - String _elem151; // required - _elem151 = iprot.readString(); - this.success.add(_elem151); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter152 : this.success) - { - oprot.writeString(_iter152); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -20738,6 +23485,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20756,6 +23504,145 @@ } } + private static class get_all_tables_resultStandardSchemeFactory implements SchemeFactory { + public get_all_tables_resultStandardScheme getScheme() { + return new get_all_tables_resultStandardScheme(); + } + } + + private static class get_all_tables_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list298 = iprot.readListBegin(); + struct.success = new ArrayList(_list298.size); + for (int _i299 = 0; _i299 < _list298.size; ++_i299) + { + String _elem300; // required + _elem300 = iprot.readString(); + struct.success.add(_elem300); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_tables_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter301 : struct.success) + { + oprot.writeString(_iter301); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_tables_resultTupleSchemeFactory implements SchemeFactory { + public get_all_tables_resultTupleScheme getScheme() { + return new get_all_tables_resultTupleScheme(); + } + } + + private static class get_all_tables_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter302 : struct.success) + { + oprot.writeString(_iter302); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list303 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list303.size); + for (int _i304 = 0; _i304 < _list303.size; ++_i304) + { + String _elem305; // required + _elem305 = iprot.readString(); + struct.success.add(_elem305); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -20764,6 +23651,12 @@ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_argsTupleSchemeFactory()); + } + private String dbname; // required private String tbl_name; // required @@ -20829,7 +23722,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -21056,54 +23948,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -21132,6 +23981,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -21150,6 +24000,111 @@ } } + private static class get_table_argsStandardSchemeFactory implements SchemeFactory { + public get_table_argsStandardScheme getScheme() { + return new get_table_argsStandardScheme(); + } + } + + private static class get_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_argsTupleSchemeFactory implements SchemeFactory { + public get_table_argsTupleScheme getScheme() { + return new get_table_argsTupleScheme(); + } + } + + private static class get_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + } + } + } public static class get_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21159,6 +24114,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_resultTupleSchemeFactory()); + } + private Table success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -21228,7 +24189,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -21523,67 +24483,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Table(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -21619,6 +24524,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -21637,6 +24546,140 @@ } } + private static class get_table_resultStandardSchemeFactory implements SchemeFactory { + public get_table_resultStandardScheme getScheme() { + return new get_table_resultStandardScheme(); + } + } + + private static class get_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Table(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_resultTupleSchemeFactory implements SchemeFactory { + public get_table_resultTupleScheme getScheme() { + return new get_table_resultTupleScheme(); + } + } + + private static class get_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Table(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_table_objects_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -21645,6 +24688,12 @@ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_names", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_objects_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_objects_by_name_argsTupleSchemeFactory()); + } + private String dbname; // required private List tbl_names; // required @@ -21710,7 +24759,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -21957,71 +25005,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(); - this.tbl_names = new ArrayList(_list153.size); - for (int _i154 = 0; _i154 < _list153.size; ++_i154) - { - String _elem155; // required - _elem155 = iprot.readString(); - this.tbl_names.add(_elem155); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_names != null) { - oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.tbl_names.size())); - for (String _iter156 : this.tbl_names) - { - oprot.writeString(_iter156); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -22050,6 +25038,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -22068,6 +25057,143 @@ } } + private static class get_table_objects_by_name_argsStandardSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_argsStandardScheme getScheme() { + return new get_table_objects_by_name_argsStandardScheme(); + } + } + + private static class get_table_objects_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list306 = iprot.readListBegin(); + struct.tbl_names = new ArrayList(_list306.size); + for (int _i307 = 0; _i307 < _list306.size; ++_i307) + { + String _elem308; // required + _elem308 = iprot.readString(); + struct.tbl_names.add(_elem308); + } + iprot.readListEnd(); + } + struct.setTbl_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_names != null) { + oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_names.size())); + for (String _iter309 : struct.tbl_names) + { + oprot.writeString(_iter309); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_objects_by_name_argsTupleSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_argsTupleScheme getScheme() { + return new get_table_objects_by_name_argsTupleScheme(); + } + } + + private static class get_table_objects_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_names()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_names()) { + { + oprot.writeI32(struct.tbl_names.size()); + for (String _iter310 : struct.tbl_names) + { + oprot.writeString(_iter310); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list311 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tbl_names = new ArrayList(_list311.size); + for (int _i312 = 0; _i312 < _list311.size; ++_i312) + { + String _elem313; // required + _elem313 = iprot.readString(); + struct.tbl_names.add(_elem313); + } + } + struct.setTbl_namesIsSet(true); + } + } + } + } public static class get_table_objects_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22078,6 +25204,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_objects_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_objects_by_name_resultTupleSchemeFactory()); + } + private List
success; // required private MetaException o1; // required private InvalidOperationException o2; // required @@ -22151,7 +25283,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -22534,96 +25665,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list157 = iprot.readListBegin(); - this.success = new ArrayList
(_list157.size); - for (int _i158 = 0; _i158 < _list157.size; ++_i158) - { - Table _elem159; // required - _elem159 = new Table(); - _elem159.read(iprot); - this.success.add(_elem159); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Table _iter160 : this.success) - { - _iter160.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -22667,6 +25714,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -22685,6 +25733,197 @@ } } + private static class get_table_objects_by_name_resultStandardSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_resultStandardScheme getScheme() { + return new get_table_objects_by_name_resultStandardScheme(); + } + } + + private static class get_table_objects_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list314 = iprot.readListBegin(); + struct.success = new ArrayList
(_list314.size); + for (int _i315 = 0; _i315 < _list314.size; ++_i315) + { + Table _elem316; // required + _elem316 = new Table(); + _elem316.read(iprot); + struct.success.add(_elem316); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Table _iter317 : struct.success) + { + _iter317.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_objects_by_name_resultTupleSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_resultTupleScheme getScheme() { + return new get_table_objects_by_name_resultTupleScheme(); + } + } + + private static class get_table_objects_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Table _iter318 : struct.success) + { + _iter318.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list319 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList
(_list319.size); + for (int _i320 = 0; _i320 < _list319.size; ++_i320) + { + Table _elem321; // required + _elem321 = new Table(); + _elem321.read(iprot); + struct.success.add(_elem321); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class get_table_names_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -22694,6 +25933,12 @@ private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_tables", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_names_by_filter_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_names_by_filter_argsTupleSchemeFactory()); + } + private String dbname; // required private String filter; // required private short max_tables; // required @@ -22764,8 +26009,7 @@ // isset id assignments private static final int __MAX_TABLES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -22800,8 +26044,7 @@ * Performs a deep copy on other. */ public get_table_names_by_filter_args(get_table_names_by_filter_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } @@ -22879,16 +26122,16 @@ } public void unsetMax_tables() { - __isset_bit_vector.clear(__MAX_TABLES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); } /** Returns true if field max_tables is set (has been assigned a value) and false otherwise */ public boolean isSetMax_tables() { - return __isset_bit_vector.get(__MAX_TABLES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); } public void setMax_tablesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_TABLES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_TABLES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -23063,65 +26306,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // FILTER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.filter = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_TABLES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_tables = iprot.readI16(); - setMax_tablesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_TABLES_FIELD_DESC); - oprot.writeI16(this.max_tables); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -23154,6 +26343,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -23167,13 +26357,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_table_names_by_filter_argsStandardSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_argsStandardScheme getScheme() { + return new get_table_names_by_filter_argsStandardScheme(); + } + } + + private static class get_table_names_by_filter_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FILTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_TABLES + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_tables = iprot.readI16(); + struct.setMax_tablesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(struct.filter); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_TABLES_FIELD_DESC); + oprot.writeI16(struct.max_tables); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_names_by_filter_argsTupleSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_argsTupleScheme getScheme() { + return new get_table_names_by_filter_argsTupleScheme(); + } + } + + private static class get_table_names_by_filter_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetFilter()) { + optionals.set(1); + } + if (struct.isSetMax_tables()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetFilter()) { + oprot.writeString(struct.filter); + } + if (struct.isSetMax_tables()) { + oprot.writeI16(struct.max_tables); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } + if (incoming.get(2)) { + struct.max_tables = iprot.readI16(); + struct.setMax_tablesIsSet(true); + } + } + } + } public static class get_table_names_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23184,6 +26500,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_names_by_filter_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_names_by_filter_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private InvalidOperationException o2; // required @@ -23257,7 +26579,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -23640,95 +26961,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list161 = iprot.readListBegin(); - this.success = new ArrayList(_list161.size); - for (int _i162 = 0; _i162 < _list161.size; ++_i162) - { - String _elem163; // required - _elem163 = iprot.readString(); - this.success.add(_elem163); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter164 : this.success) - { - oprot.writeString(_iter164); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -23772,6 +27010,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -23790,6 +27029,195 @@ } } + private static class get_table_names_by_filter_resultStandardSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_resultStandardScheme getScheme() { + return new get_table_names_by_filter_resultStandardScheme(); + } + } + + private static class get_table_names_by_filter_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list322 = iprot.readListBegin(); + struct.success = new ArrayList(_list322.size); + for (int _i323 = 0; _i323 < _list322.size; ++_i323) + { + String _elem324; // required + _elem324 = iprot.readString(); + struct.success.add(_elem324); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter325 : struct.success) + { + oprot.writeString(_iter325); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_names_by_filter_resultTupleSchemeFactory implements SchemeFactory { + public get_table_names_by_filter_resultTupleScheme getScheme() { + return new get_table_names_by_filter_resultTupleScheme(); + } + } + + private static class get_table_names_by_filter_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter326 : struct.success) + { + oprot.writeString(_iter326); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list327.size); + for (int _i328 = 0; _i328 < _list327.size; ++_i328) + { + String _elem329; // required + _elem329 = iprot.readString(); + struct.success.add(_elem329); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new InvalidOperationException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class alter_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -23799,6 +27227,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_argsTupleSchemeFactory()); + } + private String dbname; // required private String tbl_name; // required private Table new_tbl; // required @@ -23868,7 +27302,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -24163,67 +27596,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -24260,6 +27637,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_tbl != null) { + new_tbl.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -24278,6 +27659,136 @@ } } + private static class alter_table_argsStandardSchemeFactory implements SchemeFactory { + public alter_table_argsStandardScheme getScheme() { + return new alter_table_argsStandardScheme(); + } + } + + private static class alter_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + struct.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_argsTupleSchemeFactory implements SchemeFactory { + public alter_table_argsTupleScheme getScheme() { + return new alter_table_argsTupleScheme(); + } + } + + private static class alter_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_tbl()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_tbl()) { + struct.new_tbl.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } + } + } + } public static class alter_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24286,6 +27797,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -24351,7 +27868,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -24578,55 +28094,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -24654,6 +28127,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -24672,6 +28146,115 @@ } } + private static class alter_table_resultStandardSchemeFactory implements SchemeFactory { + public alter_table_resultStandardScheme getScheme() { + return new alter_table_resultStandardScheme(); + } + } + + private static class alter_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_resultTupleSchemeFactory implements SchemeFactory { + public alter_table_resultTupleScheme getScheme() { + return new alter_table_resultTupleScheme(); + } + } + + private static class alter_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -24682,6 +28265,12 @@ private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_with_environment_context_argsTupleSchemeFactory()); + } + private String dbname; // required private String tbl_name; // required private Table new_tbl; // required @@ -24755,7 +28344,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -25118,80 +28706,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_TBL - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -25236,6 +28755,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_tbl != null) { + new_tbl.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -25254,6 +28780,161 @@ } } + private static class alter_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_argsStandardScheme getScheme() { + return new alter_table_with_environment_context_argsStandardScheme(); + } + } + + private static class alter_table_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + struct.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_argsTupleScheme getScheme() { + return new alter_table_with_environment_context_argsTupleScheme(); + } + } + + private static class alter_table_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_tbl()) { + optionals.set(2); + } + if (struct.isSetEnvironment_context()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_tbl()) { + struct.new_tbl.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_tbl = new Table(); + struct.new_tbl.read(iprot); + struct.setNew_tblIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class alter_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25262,6 +28943,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_with_environment_context_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -25327,7 +29014,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -25554,55 +29240,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -25630,6 +29273,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -25648,6 +29292,115 @@ } } + private static class alter_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_resultStandardScheme getScheme() { + return new alter_table_with_environment_context_resultStandardScheme(); + } + } + + private static class alter_table_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public alter_table_with_environment_context_resultTupleScheme getScheme() { + return new alter_table_with_environment_context_resultTupleScheme(); + } + } + + private static class alter_table_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class add_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25655,6 +29408,12 @@ private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_argsTupleSchemeFactory()); + } + private Partition new_part; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -25716,7 +29475,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -25875,43 +29633,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -25932,6 +29658,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -25950,6 +29680,90 @@ } } + private static class add_partition_argsStandardSchemeFactory implements SchemeFactory { + public add_partition_argsStandardScheme getScheme() { + return new add_partition_argsStandardScheme(); + } + } + + private static class add_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_argsTupleSchemeFactory implements SchemeFactory { + public add_partition_argsTupleScheme getScheme() { + return new add_partition_argsTupleScheme(); + } + } + + private static class add_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_part()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + } + } + } public static class add_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -25960,6 +29774,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -26033,7 +29853,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -26396,79 +30215,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -26512,6 +30264,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -26530,6 +30286,165 @@ } } + private static class add_partition_resultStandardSchemeFactory implements SchemeFactory { + public add_partition_resultStandardScheme getScheme() { + return new add_partition_resultStandardScheme(); + } + } + + private static class add_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_resultTupleSchemeFactory implements SchemeFactory { + public add_partition_resultTupleScheme getScheme() { + return new add_partition_resultTupleScheme(); + } + } + + private static class add_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class add_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26538,6 +30453,12 @@ private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_with_environment_context_argsTupleSchemeFactory()); + } + private Partition new_part; // required private EnvironmentContext environment_context; // required @@ -26603,7 +30524,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -26830,56 +30750,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -26908,6 +30783,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -26926,6 +30808,115 @@ } } + private static class add_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_argsStandardScheme getScheme() { + return new add_partition_with_environment_context_argsStandardScheme(); + } + } + + private static class add_partition_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_argsTupleScheme getScheme() { + return new add_partition_with_environment_context_argsTupleScheme(); + } + } + + private static class add_partition_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_part()) { + optionals.set(0); + } + if (struct.isSetEnvironment_context()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + if (incoming.get(1)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class add_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -26936,6 +30927,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partition_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partition_with_environment_context_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -27009,7 +31006,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -27372,79 +31368,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -27488,6 +31417,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -27506,6 +31439,165 @@ } } + private static class add_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_resultStandardScheme getScheme() { + return new add_partition_with_environment_context_resultStandardScheme(); + } + } + + private static class add_partition_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public add_partition_with_environment_context_resultTupleScheme getScheme() { + return new add_partition_with_environment_context_resultTupleScheme(); + } + } + + private static class add_partition_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class add_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -27513,6 +31605,12 @@ private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_argsTupleSchemeFactory()); + } + private List new_parts; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -27574,7 +31672,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -27753,60 +31850,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_PARTS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list165 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list165.size); - for (int _i166 = 0; _i166 < _list165.size; ++_i166) - { - Partition _elem167; // required - _elem167 = new Partition(); - _elem167.read(iprot); - this.new_parts.add(_elem167); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_parts != null) { - oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); - for (Partition _iter168 : this.new_parts) - { - _iter168.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -27827,6 +31875,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -27845,6 +31894,122 @@ } } + private static class add_partitions_argsStandardSchemeFactory implements SchemeFactory { + public add_partitions_argsStandardScheme getScheme() { + return new add_partitions_argsStandardScheme(); + } + } + + private static class add_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list330 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list330.size); + for (int _i331 = 0; _i331 < _list330.size; ++_i331) + { + Partition _elem332; // required + _elem332 = new Partition(); + _elem332.read(iprot); + struct.new_parts.add(_elem332); + } + iprot.readListEnd(); + } + struct.setNew_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_parts != null) { + oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); + for (Partition _iter333 : struct.new_parts) + { + _iter333.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partitions_argsTupleSchemeFactory implements SchemeFactory { + public add_partitions_argsTupleScheme getScheme() { + return new add_partitions_argsTupleScheme(); + } + } + + private static class add_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_parts()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNew_parts()) { + { + oprot.writeI32(struct.new_parts.size()); + for (Partition _iter334 : struct.new_parts) + { + _iter334.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list335.size); + for (int _i336 = 0; _i336 < _list335.size; ++_i336) + { + Partition _elem337; // required + _elem337 = new Partition(); + _elem337.read(iprot); + struct.new_parts.add(_elem337); + } + } + struct.setNew_partsIsSet(true); + } + } + } + } public static class add_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -27855,6 +32020,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_resultTupleSchemeFactory()); + } + private int success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -27929,8 +32100,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -27967,8 +32137,7 @@ * Performs a deep copy on other. */ public add_partitions_result(add_partitions_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); @@ -28004,16 +32173,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public InvalidObjectException getO1() { @@ -28294,79 +32463,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI32(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -28406,6 +32508,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -28418,12 +32521,171 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class add_partitions_resultStandardSchemeFactory implements SchemeFactory { + public add_partitions_resultStandardScheme getScheme() { + return new add_partitions_resultStandardScheme(); + } + } + + private static class add_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partitions_resultTupleSchemeFactory implements SchemeFactory { + public add_partitions_resultTupleScheme getScheme() { + return new add_partitions_resultTupleScheme(); + } + } + + private static class add_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class append_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28433,6 +32695,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -28502,7 +32770,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -28817,83 +33084,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list169 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list169.size); - for (int _i170 = 0; _i170 < _list169.size; ++_i170) - { - String _elem171; // required - _elem171 = iprot.readString(); - this.part_vals.add(_elem171); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter172 : this.part_vals) - { - oprot.writeString(_iter172); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -28930,6 +33125,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -28948,6 +33144,166 @@ } } + private static class append_partition_argsStandardSchemeFactory implements SchemeFactory { + public append_partition_argsStandardScheme getScheme() { + return new append_partition_argsStandardScheme(); + } + } + + private static class append_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list338.size); + for (int _i339 = 0; _i339 < _list338.size; ++_i339) + { + String _elem340; // required + _elem340 = iprot.readString(); + struct.part_vals.add(_elem340); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter341 : struct.part_vals) + { + oprot.writeString(_iter341); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_argsTupleSchemeFactory implements SchemeFactory { + public append_partition_argsTupleScheme getScheme() { + return new append_partition_argsTupleScheme(); + } + } + + private static class append_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter342 : struct.part_vals) + { + oprot.writeString(_iter342); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list343.size); + for (int _i344 = 0; _i344 < _list343.size; ++_i344) + { + String _elem345; // required + _elem345 = iprot.readString(); + struct.part_vals.add(_elem345); + } + } + struct.setPart_valsIsSet(true); + } + } + } + } public static class append_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -28958,6 +33314,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -29031,7 +33393,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -29394,79 +33755,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -29510,6 +33804,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -29528,6 +33826,165 @@ } } + private static class append_partition_resultStandardSchemeFactory implements SchemeFactory { + public append_partition_resultStandardScheme getScheme() { + return new append_partition_resultStandardScheme(); + } + } + + private static class append_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_resultTupleSchemeFactory implements SchemeFactory { + public append_partition_resultTupleScheme getScheme() { + return new append_partition_resultTupleScheme(); + } + } + + private static class append_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class append_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -29537,6 +33994,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -29606,7 +34069,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -29901,66 +34363,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -29997,6 +34404,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -30015,6 +34423,134 @@ } } + private static class append_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { + public append_partition_by_name_argsStandardScheme getScheme() { + return new append_partition_by_name_argsStandardScheme(); + } + } + + private static class append_partition_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { + public append_partition_by_name_argsTupleScheme getScheme() { + return new append_partition_by_name_argsTupleScheme(); + } + } + + private static class append_partition_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class append_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30025,6 +34561,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_partition_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_by_name_resultTupleSchemeFactory()); + } + private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -30098,7 +34640,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -30461,79 +35002,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -30577,6 +35051,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -30595,6 +35073,165 @@ } } + private static class append_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { + public append_partition_by_name_resultStandardScheme getScheme() { + return new append_partition_by_name_resultStandardScheme(); + } + } + + private static class append_partition_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { + public append_partition_by_name_resultTupleScheme getScheme() { + return new append_partition_by_name_resultTupleScheme(); + } + } + + private static class append_partition_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class drop_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -30605,6 +35242,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -30679,8 +35322,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -30718,8 +35360,7 @@ * Performs a deep copy on other. */ public drop_partition_args(drop_partition_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -30843,16 +35484,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -31064,94 +35705,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list173 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list173.size); - for (int _i174 = 0; _i174 < _list173.size; ++_i174) - { - String _elem175; // required - _elem175 = iprot.readString(); - this.part_vals.add(_elem175); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter176 : this.part_vals) - { - oprot.writeString(_iter176); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -31192,6 +35750,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -31205,13 +35764,194 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_argsStandardSchemeFactory implements SchemeFactory { + public drop_partition_argsStandardScheme getScheme() { + return new drop_partition_argsStandardScheme(); + } + } + + private static class drop_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list346 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list346.size); + for (int _i347 = 0; _i347 < _list346.size; ++_i347) + { + String _elem348; // required + _elem348 = iprot.readString(); + struct.part_vals.add(_elem348); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter349 : struct.part_vals) + { + oprot.writeString(_iter349); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_argsTupleSchemeFactory implements SchemeFactory { + public drop_partition_argsTupleScheme getScheme() { + return new drop_partition_argsTupleScheme(); + } + } + + private static class drop_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter350 : struct.part_vals) + { + oprot.writeString(_iter350); + } + } + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list351.size); + for (int _i352 = 0; _i352 < _list351.size; ++_i352) + { + String _elem353; // required + _elem353 = iprot.readString(); + struct.part_vals.add(_elem353); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -31221,6 +35961,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -31291,8 +36037,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -31325,8 +36070,7 @@ * Performs a deep copy on other. */ public drop_partition_result(drop_partition_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -31358,16 +36102,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -31588,67 +36332,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -31680,6 +36369,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -31692,12 +36382,146 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_resultStandardSchemeFactory implements SchemeFactory { + public drop_partition_resultStandardScheme getScheme() { + return new drop_partition_resultStandardScheme(); + } + } + + private static class drop_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_resultTupleSchemeFactory implements SchemeFactory { + public drop_partition_resultTupleScheme getScheme() { + return new drop_partition_resultTupleScheme(); + } + } + + private static class drop_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class drop_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -31708,6 +36532,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -31782,8 +36612,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -31820,8 +36649,7 @@ * Performs a deep copy on other. */ public drop_partition_by_name_args(drop_partition_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -31926,16 +36754,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -32147,77 +36975,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -32258,6 +37020,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -32271,13 +37034,162 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { + public drop_partition_by_name_argsStandardScheme getScheme() { + return new drop_partition_by_name_argsStandardScheme(); + } + } + + private static class drop_partition_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { + public drop_partition_by_name_argsTupleScheme getScheme() { + return new drop_partition_by_name_argsTupleScheme(); + } + } + + private static class drop_partition_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -32287,6 +37199,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_by_name_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -32357,8 +37275,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -32391,8 +37308,7 @@ * Performs a deep copy on other. */ public drop_partition_by_name_result(drop_partition_by_name_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -32424,16 +37340,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -32654,67 +37570,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -32746,6 +37607,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -32758,12 +37620,146 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { + public drop_partition_by_name_resultStandardScheme getScheme() { + return new drop_partition_by_name_resultStandardScheme(); + } + } + + private static class drop_partition_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { + public drop_partition_by_name_resultTupleScheme getScheme() { + return new drop_partition_by_name_resultTupleScheme(); + } + } + + private static class drop_partition_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -32773,6 +37769,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -32842,7 +37844,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -33157,83 +38158,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list177 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list177.size); - for (int _i178 = 0; _i178 < _list177.size; ++_i178) - { - String _elem179; // required - _elem179 = iprot.readString(); - this.part_vals.add(_elem179); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter180 : this.part_vals) - { - oprot.writeString(_iter180); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -33270,6 +38199,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -33288,6 +38218,166 @@ } } + private static class get_partition_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_argsStandardScheme getScheme() { + return new get_partition_argsStandardScheme(); + } + } + + private static class get_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list354 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list354.size); + for (int _i355 = 0; _i355 < _list354.size; ++_i355) + { + String _elem356; // required + _elem356 = iprot.readString(); + struct.part_vals.add(_elem356); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter357 : struct.part_vals) + { + oprot.writeString(_iter357); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_argsTupleScheme getScheme() { + return new get_partition_argsTupleScheme(); + } + } + + private static class get_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter358 : struct.part_vals) + { + oprot.writeString(_iter358); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list359 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list359.size); + for (int _i360 = 0; _i360 < _list359.size; ++_i360) + { + String _elem361; // required + _elem361 = iprot.readString(); + struct.part_vals.add(_elem361); + } + } + struct.setPart_valsIsSet(true); + } + } + } + } public static class get_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -33297,6 +38387,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_resultTupleSchemeFactory()); + } + private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -33366,7 +38462,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -33661,67 +38756,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -33757,6 +38797,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -33775,6 +38819,140 @@ } } + private static class get_partition_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_resultStandardScheme getScheme() { + return new get_partition_resultStandardScheme(); + } + } + + private static class get_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_resultTupleScheme getScheme() { + return new get_partition_resultTupleScheme(); + } + } + + private static class get_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -33786,6 +38964,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_with_auth_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_with_auth_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -33863,7 +39047,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -34334,124 +39517,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list181 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list181.size); - for (int _i182 = 0; _i182 < _list181.size; ++_i182) - { - String _elem183; // required - _elem183 = iprot.readString(); - this.part_vals.add(_elem183); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list184 = iprot.readListBegin(); - this.group_names = new ArrayList(_list184.size); - for (int _i185 = 0; _i185 < _list184.size; ++_i185) - { - String _elem186; // required - _elem186 = iprot.readString(); - this.group_names.add(_elem186); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter187 : this.part_vals) - { - oprot.writeString(_iter187); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter188 : this.group_names) - { - oprot.writeString(_iter188); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -34504,6 +39574,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -34522,6 +39593,244 @@ } } + private static class get_partition_with_auth_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_with_auth_argsStandardScheme getScheme() { + return new get_partition_with_auth_argsStandardScheme(); + } + } + + private static class get_partition_with_auth_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list362.size); + for (int _i363 = 0; _i363 < _list362.size; ++_i363) + { + String _elem364; // required + _elem364 = iprot.readString(); + struct.part_vals.add(_elem364); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list365 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list365.size); + for (int _i366 = 0; _i366 < _list365.size; ++_i366) + { + String _elem367; // required + _elem367 = iprot.readString(); + struct.group_names.add(_elem367); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter368 : struct.part_vals) + { + oprot.writeString(_iter368); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter369 : struct.group_names) + { + oprot.writeString(_iter369); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_with_auth_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_with_auth_argsTupleScheme getScheme() { + return new get_partition_with_auth_argsTupleScheme(); + } + } + + private static class get_partition_with_auth_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetUser_name()) { + optionals.set(3); + } + if (struct.isSetGroup_names()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter370 : struct.part_vals) + { + oprot.writeString(_iter370); + } + } + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter371 : struct.group_names) + { + oprot.writeString(_iter371); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list372 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list372.size); + for (int _i373 = 0; _i373 < _list372.size; ++_i373) + { + String _elem374; // required + _elem374 = iprot.readString(); + struct.part_vals.add(_elem374); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list375.size); + for (int _i376 = 0; _i376 < _list375.size; ++_i376) + { + String _elem377; // required + _elem377 = iprot.readString(); + struct.group_names.add(_elem377); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_partition_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -34531,6 +39840,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_with_auth_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_with_auth_resultTupleSchemeFactory()); + } + private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -34600,7 +39915,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -34895,67 +40209,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -34991,6 +40250,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -35009,6 +40272,140 @@ } } + private static class get_partition_with_auth_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_with_auth_resultStandardScheme getScheme() { + return new get_partition_with_auth_resultStandardScheme(); + } + } + + private static class get_partition_with_auth_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_with_auth_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_with_auth_resultTupleScheme getScheme() { + return new get_partition_with_auth_resultTupleScheme(); + } + } + + private static class get_partition_with_auth_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -35018,6 +40415,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String part_name; // required @@ -35087,7 +40490,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -35382,66 +40784,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -35478,6 +40825,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -35496,6 +40844,134 @@ } } + private static class get_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_by_name_argsStandardScheme getScheme() { + return new get_partition_by_name_argsStandardScheme(); + } + } + + private static class get_partition_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_by_name_argsTupleScheme getScheme() { + return new get_partition_by_name_argsTupleScheme(); + } + } + + private static class get_partition_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class get_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -35505,6 +40981,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_by_name_resultTupleSchemeFactory()); + } + private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -35574,7 +41056,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -35869,67 +41350,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -35965,6 +41391,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -35983,6 +41413,140 @@ } } + private static class get_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_by_name_resultStandardScheme getScheme() { + return new get_partition_by_name_resultStandardScheme(); + } + } + + private static class get_partition_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_by_name_resultTupleScheme getScheme() { + return new get_partition_by_name_resultTupleScheme(); + } + } + + private static class get_partition_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Partition(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -35992,6 +41556,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_parts; // required @@ -36062,8 +41632,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -36098,8 +41667,7 @@ * Performs a deep copy on other. */ public get_partitions_args(get_partitions_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -36177,16 +41745,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -36361,65 +41929,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -36452,6 +41966,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -36465,13 +41980,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_argsStandardScheme getScheme() { + return new get_partitions_argsStandardScheme(); + } + } + + private static class get_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_argsTupleScheme getScheme() { + return new get_partitions_argsTupleScheme(); + } + } + + private static class get_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_parts()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -36481,6 +42122,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -36550,7 +42197,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -36865,84 +42511,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list189 = iprot.readListBegin(); - this.success = new ArrayList(_list189.size); - for (int _i190 = 0; _i190 < _list189.size; ++_i190) - { - Partition _elem191; // required - _elem191 = new Partition(); - _elem191.read(iprot); - this.success.add(_elem191); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter192 : this.success) - { - _iter192.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -36978,6 +42552,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -36996,6 +42571,172 @@ } } + private static class get_partitions_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_resultStandardScheme getScheme() { + return new get_partitions_resultStandardScheme(); + } + } + + private static class get_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list378 = iprot.readListBegin(); + struct.success = new ArrayList(_list378.size); + for (int _i379 = 0; _i379 < _list378.size; ++_i379) + { + Partition _elem380; // required + _elem380 = new Partition(); + _elem380.read(iprot); + struct.success.add(_elem380); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter381 : struct.success) + { + _iter381.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_resultTupleScheme getScheme() { + return new get_partitions_resultTupleScheme(); + } + } + + private static class get_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter382 : struct.success) + { + _iter382.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list383.size); + for (int _i384 = 0; _i384 < _list383.size; ++_i384) + { + Partition _elem385; // required + _elem385 = new Partition(); + _elem385.read(iprot); + struct.success.add(_elem385); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -37007,6 +42748,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_with_auth_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_with_auth_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_parts; // required @@ -37085,8 +42832,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -37130,8 +42876,7 @@ * Performs a deep copy on other. */ public get_partitions_with_auth_args(get_partitions_with_auth_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -37221,16 +42966,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public String getUser_name() { @@ -37540,106 +43285,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list193 = iprot.readListBegin(); - this.group_names = new ArrayList(_list193.size); - for (int _i194 = 0; _i194 < _list193.size; ++_i194) - { - String _elem195; // required - _elem195 = iprot.readString(); - this.group_names.add(_elem195); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter196 : this.group_names) - { - oprot.writeString(_iter196); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -37688,6 +43338,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -37701,13 +43352,217 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_with_auth_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_argsStandardScheme getScheme() { + return new get_partitions_with_auth_argsStandardScheme(); + } + } + + private static class get_partitions_with_auth_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list386 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list386.size); + for (int _i387 = 0; _i387 < _list386.size; ++_i387) + { + String _elem388; // required + _elem388 = iprot.readString(); + struct.group_names.add(_elem388); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter389 : struct.group_names) + { + oprot.writeString(_iter389); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_with_auth_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_argsTupleScheme getScheme() { + return new get_partitions_with_auth_argsTupleScheme(); + } + } + + private static class get_partitions_with_auth_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_parts()) { + optionals.set(2); + } + if (struct.isSetUser_name()) { + optionals.set(3); + } + if (struct.isSetGroup_names()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter390 : struct.group_names) + { + oprot.writeString(_iter390); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + if (incoming.get(3)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list391 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list391.size); + for (int _i392 = 0; _i392 < _list391.size; ++_i392) + { + String _elem393; // required + _elem393 = iprot.readString(); + struct.group_names.add(_elem393); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_partitions_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -37717,6 +43572,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_with_auth_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_with_auth_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -37786,7 +43647,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -38101,84 +43961,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list197 = iprot.readListBegin(); - this.success = new ArrayList(_list197.size); - for (int _i198 = 0; _i198 < _list197.size; ++_i198) - { - Partition _elem199; // required - _elem199 = new Partition(); - _elem199.read(iprot); - this.success.add(_elem199); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter200 : this.success) - { - _iter200.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -38214,6 +44002,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -38232,6 +44021,172 @@ } } + private static class get_partitions_with_auth_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_resultStandardScheme getScheme() { + return new get_partitions_with_auth_resultStandardScheme(); + } + } + + private static class get_partitions_with_auth_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list394 = iprot.readListBegin(); + struct.success = new ArrayList(_list394.size); + for (int _i395 = 0; _i395 < _list394.size; ++_i395) + { + Partition _elem396; // required + _elem396 = new Partition(); + _elem396.read(iprot); + struct.success.add(_elem396); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter397 : struct.success) + { + _iter397.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_with_auth_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_with_auth_resultTupleScheme getScheme() { + return new get_partitions_with_auth_resultTupleScheme(); + } + } + + private static class get_partitions_with_auth_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter398 : struct.success) + { + _iter398.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list399 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list399.size); + for (int _i400 = 0; _i400 < _list399.size; ++_i400) + { + Partition _elem401; // required + _elem401 = new Partition(); + _elem401.read(iprot); + struct.success.add(_elem401); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -38241,6 +44196,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_parts; // required @@ -38311,8 +44272,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -38347,8 +44307,7 @@ * Performs a deep copy on other. */ public get_partition_names_args(get_partition_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -38426,16 +44385,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -38610,65 +44569,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -38701,6 +44606,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -38714,13 +44620,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partition_names_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_names_argsStandardScheme getScheme() { + return new get_partition_names_argsStandardScheme(); + } + } + + private static class get_partition_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_names_argsTupleScheme getScheme() { + return new get_partition_names_argsTupleScheme(); + } + } + + private static class get_partition_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_parts()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partition_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -38729,6 +44761,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o2; // required @@ -38794,7 +44832,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -39041,71 +45078,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list201 = iprot.readListBegin(); - this.success = new ArrayList(_list201.size); - for (int _i202 = 0; _i202 < _list201.size; ++_i202) - { - String _elem203; // required - _elem203 = iprot.readString(); - this.success.add(_elem203); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter204 : this.success) - { - oprot.writeString(_iter204); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -39133,6 +45111,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -39151,6 +45130,145 @@ } } + private static class get_partition_names_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_names_resultStandardScheme getScheme() { + return new get_partition_names_resultStandardScheme(); + } + } + + private static class get_partition_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list402 = iprot.readListBegin(); + struct.success = new ArrayList(_list402.size); + for (int _i403 = 0; _i403 < _list402.size; ++_i403) + { + String _elem404; // required + _elem404 = iprot.readString(); + struct.success.add(_elem404); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter405 : struct.success) + { + oprot.writeString(_iter405); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_names_resultTupleScheme getScheme() { + return new get_partition_names_resultTupleScheme(); + } + } + + private static class get_partition_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter406 : struct.success) + { + oprot.writeString(_iter406); + } + } + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list407 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list407.size); + for (int _i408 = 0; _i408 < _list407.size; ++_i408) + { + String _elem409; // required + _elem409 = iprot.readString(); + struct.success.add(_elem409); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_ps_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -39161,6 +45279,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -39235,8 +45359,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -39276,8 +45399,7 @@ * Performs a deep copy on other. */ public get_partitions_ps_args(get_partitions_ps_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -39401,16 +45523,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -39622,94 +45744,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list205 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list205.size); - for (int _i206 = 0; _i206 < _list205.size; ++_i206) - { - String _elem207; // required - _elem207 = iprot.readString(); - this.part_vals.add(_elem207); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter208 : this.part_vals) - { - oprot.writeString(_iter208); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -39750,6 +45789,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -39763,13 +45803,194 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_ps_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_argsStandardScheme getScheme() { + return new get_partitions_ps_argsStandardScheme(); + } + } + + private static class get_partitions_ps_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list410 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list410.size); + for (int _i411 = 0; _i411 < _list410.size; ++_i411) + { + String _elem412; // required + _elem412 = iprot.readString(); + struct.part_vals.add(_elem412); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter413 : struct.part_vals) + { + oprot.writeString(_iter413); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_argsTupleScheme getScheme() { + return new get_partitions_ps_argsTupleScheme(); + } + } + + private static class get_partitions_ps_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter414 : struct.part_vals) + { + oprot.writeString(_iter414); + } + } + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list415 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list415.size); + for (int _i416 = 0; _i416 < _list415.size; ++_i416) + { + String _elem417; // required + _elem417 = iprot.readString(); + struct.part_vals.add(_elem417); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partitions_ps_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -39779,6 +46000,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -39848,7 +46075,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -40163,84 +46389,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list209 = iprot.readListBegin(); - this.success = new ArrayList(_list209.size); - for (int _i210 = 0; _i210 < _list209.size; ++_i210) - { - Partition _elem211; // required - _elem211 = new Partition(); - _elem211.read(iprot); - this.success.add(_elem211); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter212 : this.success) - { - _iter212.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -40276,6 +46430,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -40294,6 +46449,172 @@ } } + private static class get_partitions_ps_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_resultStandardScheme getScheme() { + return new get_partitions_ps_resultStandardScheme(); + } + } + + private static class get_partitions_ps_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list418 = iprot.readListBegin(); + struct.success = new ArrayList(_list418.size); + for (int _i419 = 0; _i419 < _list418.size; ++_i419) + { + Partition _elem420; // required + _elem420 = new Partition(); + _elem420.read(iprot); + struct.success.add(_elem420); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter421 : struct.success) + { + _iter421.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_resultTupleScheme getScheme() { + return new get_partitions_ps_resultTupleScheme(); + } + } + + private static class get_partitions_ps_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter422 : struct.success) + { + _iter422.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list423 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list423.size); + for (int _i424 = 0; _i424 < _list423.size; ++_i424) + { + Partition _elem425; // required + _elem425 = new Partition(); + _elem425.read(iprot); + struct.success.add(_elem425); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_ps_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -40306,6 +46627,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_with_auth_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_with_auth_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -40388,8 +46715,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -40438,8 +46764,7 @@ * Performs a deep copy on other. */ public get_partitions_ps_with_auth_args(get_partitions_ps_with_auth_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -40575,16 +46900,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public String getUser_name() { @@ -40931,135 +47256,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list213 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list213.size); - for (int _i214 = 0; _i214 < _list213.size; ++_i214) - { - String _elem215; // required - _elem215 = iprot.readString(); - this.part_vals.add(_elem215); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list216 = iprot.readListBegin(); - this.group_names = new ArrayList(_list216.size); - for (int _i217 = 0; _i217 < _list216.size; ++_i217) - { - String _elem218; // required - _elem218 = iprot.readString(); - this.group_names.add(_elem218); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter219 : this.part_vals) - { - oprot.writeString(_iter219); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter220 : this.group_names) - { - oprot.writeString(_iter220); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -41116,6 +47317,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -41129,13 +47331,272 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_ps_with_auth_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_argsStandardScheme getScheme() { + return new get_partitions_ps_with_auth_argsStandardScheme(); + } + } + + private static class get_partitions_ps_with_auth_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list426 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list426.size); + for (int _i427 = 0; _i427 < _list426.size; ++_i427) + { + String _elem428; // required + _elem428 = iprot.readString(); + struct.part_vals.add(_elem428); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list429 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list429.size); + for (int _i430 = 0; _i430 < _list429.size; ++_i430) + { + String _elem431; // required + _elem431 = iprot.readString(); + struct.group_names.add(_elem431); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter432 : struct.part_vals) + { + oprot.writeString(_iter432); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter433 : struct.group_names) + { + oprot.writeString(_iter433); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_with_auth_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_argsTupleScheme getScheme() { + return new get_partitions_ps_with_auth_argsTupleScheme(); + } + } + + private static class get_partitions_ps_with_auth_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + if (struct.isSetUser_name()) { + optionals.set(4); + } + if (struct.isSetGroup_names()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter434 : struct.part_vals) + { + oprot.writeString(_iter434); + } + } + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter435 : struct.group_names) + { + oprot.writeString(_iter435); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list436 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list436.size); + for (int _i437 = 0; _i437 < _list436.size; ++_i437) + { + String _elem438; // required + _elem438 = iprot.readString(); + struct.part_vals.add(_elem438); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + if (incoming.get(4)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list439 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list439.size); + for (int _i440 = 0; _i440 < _list439.size; ++_i440) + { + String _elem441; // required + _elem441 = iprot.readString(); + struct.group_names.add(_elem441); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_partitions_ps_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -41145,6 +47606,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_ps_with_auth_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_ps_with_auth_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -41214,7 +47681,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -41529,84 +47995,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list221 = iprot.readListBegin(); - this.success = new ArrayList(_list221.size); - for (int _i222 = 0; _i222 < _list221.size; ++_i222) - { - Partition _elem223; // required - _elem223 = new Partition(); - _elem223.read(iprot); - this.success.add(_elem223); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter224 : this.success) - { - _iter224.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -41642,6 +48036,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -41660,6 +48055,172 @@ } } + private static class get_partitions_ps_with_auth_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_resultStandardScheme getScheme() { + return new get_partitions_ps_with_auth_resultStandardScheme(); + } + } + + private static class get_partitions_ps_with_auth_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list442 = iprot.readListBegin(); + struct.success = new ArrayList(_list442.size); + for (int _i443 = 0; _i443 < _list442.size; ++_i443) + { + Partition _elem444; // required + _elem444 = new Partition(); + _elem444.read(iprot); + struct.success.add(_elem444); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter445 : struct.success) + { + _iter445.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_ps_with_auth_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_ps_with_auth_resultTupleScheme getScheme() { + return new get_partitions_ps_with_auth_resultTupleScheme(); + } + } + + private static class get_partitions_ps_with_auth_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter446 : struct.success) + { + _iter446.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list447 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list447.size); + for (int _i448 = 0; _i448 < _list447.size; ++_i448) + { + Partition _elem449; // required + _elem449 = new Partition(); + _elem449.read(iprot); + struct.success.add(_elem449); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partition_names_ps_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -41670,6 +48231,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_ps_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_ps_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -41744,8 +48311,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -41785,8 +48351,7 @@ * Performs a deep copy on other. */ public get_partition_names_ps_args(get_partition_names_ps_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -41910,16 +48475,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -42131,94 +48696,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list225 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list225.size); - for (int _i226 = 0; _i226 < _list225.size; ++_i226) - { - String _elem227; // required - _elem227 = iprot.readString(); - this.part_vals.add(_elem227); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter228 : this.part_vals) - { - oprot.writeString(_iter228); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -42259,6 +48741,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -42272,13 +48755,194 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partition_names_ps_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_names_ps_argsStandardScheme getScheme() { + return new get_partition_names_ps_argsStandardScheme(); + } + } + + private static class get_partition_names_ps_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list450 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list450.size); + for (int _i451 = 0; _i451 < _list450.size; ++_i451) + { + String _elem452; // required + _elem452 = iprot.readString(); + struct.part_vals.add(_elem452); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter453 : struct.part_vals) + { + oprot.writeString(_iter453); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_ps_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_names_ps_argsTupleScheme getScheme() { + return new get_partition_names_ps_argsTupleScheme(); + } + } + + private static class get_partition_names_ps_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter454 : struct.part_vals) + { + oprot.writeString(_iter454); + } + } + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list455 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list455.size); + for (int _i456 = 0; _i456 < _list455.size; ++_i456) + { + String _elem457; // required + _elem457 = iprot.readString(); + struct.part_vals.add(_elem457); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partition_names_ps_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -42288,6 +48952,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_names_ps_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_names_ps_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -42357,7 +49027,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -42672,83 +49341,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(); - this.success = new ArrayList(_list229.size); - for (int _i230 = 0; _i230 < _list229.size; ++_i230) - { - String _elem231; // required - _elem231 = iprot.readString(); - this.success.add(_elem231); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter232 : this.success) - { - oprot.writeString(_iter232); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -42784,6 +49382,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -42802,6 +49401,170 @@ } } + private static class get_partition_names_ps_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_names_ps_resultStandardScheme getScheme() { + return new get_partition_names_ps_resultStandardScheme(); + } + } + + private static class get_partition_names_ps_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list458 = iprot.readListBegin(); + struct.success = new ArrayList(_list458.size); + for (int _i459 = 0; _i459 < _list458.size; ++_i459) + { + String _elem460; // required + _elem460 = iprot.readString(); + struct.success.add(_elem460); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter461 : struct.success) + { + oprot.writeString(_iter461); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_names_ps_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_names_ps_resultTupleScheme getScheme() { + return new get_partition_names_ps_resultTupleScheme(); + } + } + + private static class get_partition_names_ps_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter462 : struct.success) + { + oprot.writeString(_iter462); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list463 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list463.size); + for (int _i464 = 0; _i464 < _list463.size; ++_i464) + { + String _elem465; // required + _elem465 = iprot.readString(); + struct.success.add(_elem465); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -42812,6 +49575,12 @@ private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_filter_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_filter_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String filter; // required @@ -42886,8 +49655,7 @@ // isset id assignments private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -42926,8 +49694,7 @@ * Performs a deep copy on other. */ public get_partitions_by_filter_args(get_partitions_by_filter_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -43032,16 +49799,16 @@ } public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -43253,77 +50020,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // FILTER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.filter = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -43364,6 +50065,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -43377,13 +50079,162 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_partitions_by_filter_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_argsStandardScheme getScheme() { + return new get_partitions_by_filter_argsStandardScheme(); + } + } + + private static class get_partitions_by_filter_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FILTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(struct.filter); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_filter_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_argsTupleScheme getScheme() { + return new get_partitions_by_filter_argsTupleScheme(); + } + } + + private static class get_partitions_by_filter_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetFilter()) { + optionals.set(2); + } + if (struct.isSetMax_parts()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetFilter()) { + oprot.writeString(struct.filter); + } + if (struct.isSetMax_parts()) { + oprot.writeI16(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.filter = iprot.readString(); + struct.setFilterIsSet(true); + } + if (incoming.get(3)) { + struct.max_parts = iprot.readI16(); + struct.setMax_partsIsSet(true); + } + } + } + } public static class get_partitions_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -43393,6 +50244,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_filter_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_filter_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -43462,7 +50319,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -43777,84 +50633,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list233 = iprot.readListBegin(); - this.success = new ArrayList(_list233.size); - for (int _i234 = 0; _i234 < _list233.size; ++_i234) - { - Partition _elem235; // required - _elem235 = new Partition(); - _elem235.read(iprot); - this.success.add(_elem235); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter236 : this.success) - { - _iter236.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -43890,6 +50674,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -43908,6 +50693,172 @@ } } + private static class get_partitions_by_filter_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_resultStandardScheme getScheme() { + return new get_partitions_by_filter_resultStandardScheme(); + } + } + + private static class get_partitions_by_filter_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list466 = iprot.readListBegin(); + struct.success = new ArrayList(_list466.size); + for (int _i467 = 0; _i467 < _list466.size; ++_i467) + { + Partition _elem468; // required + _elem468 = new Partition(); + _elem468.read(iprot); + struct.success.add(_elem468); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter469 : struct.success) + { + _iter469.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_filter_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_filter_resultTupleScheme getScheme() { + return new get_partitions_by_filter_resultTupleScheme(); + } + } + + private static class get_partitions_by_filter_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter470 : struct.success) + { + _iter470.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list471 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list471.size); + for (int _i472 = 0; _i472 < _list471.size; ++_i472) + { + Partition _elem473; // required + _elem473 = new Partition(); + _elem473.read(iprot); + struct.success.add(_elem473); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_partitions_by_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -43917,6 +50868,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("names", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_names_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List names; // required @@ -43986,7 +50943,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -44301,83 +51257,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list237 = iprot.readListBegin(); - this.names = new ArrayList(_list237.size); - for (int _i238 = 0; _i238 < _list237.size; ++_i238) - { - String _elem239; // required - _elem239 = iprot.readString(); - this.names.add(_elem239); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.names != null) { - oprot.writeFieldBegin(NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.names.size())); - for (String _iter240 : this.names) - { - oprot.writeString(_iter240); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -44414,6 +51298,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -44432,6 +51317,166 @@ } } + private static class get_partitions_by_names_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_names_argsStandardScheme getScheme() { + return new get_partitions_by_names_argsStandardScheme(); + } + } + + private static class get_partitions_by_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list474 = iprot.readListBegin(); + struct.names = new ArrayList(_list474.size); + for (int _i475 = 0; _i475 < _list474.size; ++_i475) + { + String _elem476; // required + _elem476 = iprot.readString(); + struct.names.add(_elem476); + } + iprot.readListEnd(); + } + struct.setNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.names != null) { + oprot.writeFieldBegin(NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.names.size())); + for (String _iter477 : struct.names) + { + oprot.writeString(_iter477); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_names_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_names_argsTupleScheme getScheme() { + return new get_partitions_by_names_argsTupleScheme(); + } + } + + private static class get_partitions_by_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNames()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNames()) { + { + oprot.writeI32(struct.names.size()); + for (String _iter478 : struct.names) + { + oprot.writeString(_iter478); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list479 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.names = new ArrayList(_list479.size); + for (int _i480 = 0; _i480 < _list479.size; ++_i480) + { + String _elem481; // required + _elem481 = iprot.readString(); + struct.names.add(_elem481); + } + } + struct.setNamesIsSet(true); + } + } + } + } public static class get_partitions_by_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -44441,6 +51486,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -44510,7 +51561,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -44825,84 +51875,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list241 = iprot.readListBegin(); - this.success = new ArrayList(_list241.size); - for (int _i242 = 0; _i242 < _list241.size; ++_i242) - { - Partition _elem243; // required - _elem243 = new Partition(); - _elem243.read(iprot); - this.success.add(_elem243); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter244 : this.success) - { - _iter244.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -44938,6 +51916,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -44956,6 +51935,172 @@ } } + private static class get_partitions_by_names_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_names_resultStandardScheme getScheme() { + return new get_partitions_by_names_resultStandardScheme(); + } + } + + private static class get_partitions_by_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list482 = iprot.readListBegin(); + struct.success = new ArrayList(_list482.size); + for (int _i483 = 0; _i483 < _list482.size; ++_i483) + { + Partition _elem484; // required + _elem484 = new Partition(); + _elem484.read(iprot); + struct.success.add(_elem484); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Partition _iter485 : struct.success) + { + _iter485.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_names_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_names_resultTupleScheme getScheme() { + return new get_partitions_by_names_resultTupleScheme(); + } + } + + private static class get_partitions_by_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter486 : struct.success) + { + _iter486.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list487 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list487.size); + for (int _i488 = 0; _i488 < _list487.size; ++_i488) + { + Partition _elem489; // required + _elem489 = new Partition(); + _elem489.read(iprot); + struct.success.add(_elem489); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -44965,6 +52110,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Partition new_part; // required @@ -45034,7 +52185,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -45329,67 +52479,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -45426,6 +52520,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -45444,6 +52542,136 @@ } } + private static class alter_partition_argsStandardSchemeFactory implements SchemeFactory { + public alter_partition_argsStandardScheme getScheme() { + return new alter_partition_argsStandardScheme(); + } + } + + private static class alter_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_argsTupleSchemeFactory implements SchemeFactory { + public alter_partition_argsTupleScheme getScheme() { + return new alter_partition_argsTupleScheme(); + } + } + + private static class alter_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_part()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + } + } + } public static class alter_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -45452,6 +52680,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -45517,7 +52751,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -45744,55 +52977,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -45820,6 +53010,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -45838,6 +53029,115 @@ } } + private static class alter_partition_resultStandardSchemeFactory implements SchemeFactory { + public alter_partition_resultStandardScheme getScheme() { + return new alter_partition_resultStandardScheme(); + } + } + + private static class alter_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_resultTupleSchemeFactory implements SchemeFactory { + public alter_partition_resultTupleScheme getScheme() { + return new alter_partition_resultTupleScheme(); + } + } + + private static class alter_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -45847,6 +53147,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partitions_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List new_parts; // required @@ -45916,7 +53222,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -46231,84 +53536,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_PARTS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list245 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list245.size); - for (int _i246 = 0; _i246 < _list245.size; ++_i246) - { - Partition _elem247; // required - _elem247 = new Partition(); - _elem247.read(iprot); - this.new_parts.add(_elem247); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_parts != null) { - oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); - for (Partition _iter248 : this.new_parts) - { - _iter248.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -46345,6 +53577,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -46363,6 +53596,168 @@ } } + private static class alter_partitions_argsStandardSchemeFactory implements SchemeFactory { + public alter_partitions_argsStandardScheme getScheme() { + return new alter_partitions_argsStandardScheme(); + } + } + + private static class alter_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list490 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list490.size); + for (int _i491 = 0; _i491 < _list490.size; ++_i491) + { + Partition _elem492; // required + _elem492 = new Partition(); + _elem492.read(iprot); + struct.new_parts.add(_elem492); + } + iprot.readListEnd(); + } + struct.setNew_partsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_parts != null) { + oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); + for (Partition _iter493 : struct.new_parts) + { + _iter493.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partitions_argsTupleSchemeFactory implements SchemeFactory { + public alter_partitions_argsTupleScheme getScheme() { + return new alter_partitions_argsTupleScheme(); + } + } + + private static class alter_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_parts()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_parts()) { + { + oprot.writeI32(struct.new_parts.size()); + for (Partition _iter494 : struct.new_parts) + { + _iter494.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list495 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list495.size); + for (int _i496 = 0; _i496 < _list495.size; ++_i496) + { + Partition _elem497; // required + _elem497 = new Partition(); + _elem497.read(iprot); + struct.new_parts.add(_elem497); + } + } + struct.setNew_partsIsSet(true); + } + } + } + } public static class alter_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -46371,6 +53766,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partitions_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -46436,7 +53837,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -46663,55 +54063,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -46739,6 +54096,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -46757,6 +54115,115 @@ } } + private static class alter_partitions_resultStandardSchemeFactory implements SchemeFactory { + public alter_partitions_resultStandardScheme getScheme() { + return new alter_partitions_resultStandardScheme(); + } + } + + private static class alter_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partitions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partitions_resultTupleSchemeFactory implements SchemeFactory { + public alter_partitions_resultTupleScheme getScheme() { + return new alter_partitions_resultTupleScheme(); + } + } + + private static class alter_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class alter_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -46767,6 +54234,12 @@ private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_with_environment_context_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Partition new_part; // required @@ -46840,7 +54313,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -47203,80 +54675,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // ENVIRONMENT_CONTEXT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.environment_context = new EnvironmentContext(); - this.environment_context.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - if (this.environment_context != null) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - this.environment_context.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -47321,6 +54724,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } + if (environment_context != null) { + environment_context.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -47339,6 +54749,161 @@ } } + private static class alter_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_argsStandardScheme getScheme() { + return new alter_partition_with_environment_context_argsStandardScheme(); + } + } + + private static class alter_partition_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.environment_context != null) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environment_context.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_argsTupleScheme getScheme() { + return new alter_partition_with_environment_context_argsTupleScheme(); + } + } + + private static class alter_partition_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetNew_part()) { + optionals.set(2); + } + if (struct.isSetEnvironment_context()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + } public static class alter_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -47347,6 +54912,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_partition_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partition_with_environment_context_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -47412,7 +54983,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -47639,55 +55209,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -47715,6 +55242,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -47733,6 +55261,115 @@ } } + private static class alter_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_resultStandardScheme getScheme() { + return new alter_partition_with_environment_context_resultStandardScheme(); + } + } + + private static class alter_partition_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public alter_partition_with_environment_context_resultTupleScheme getScheme() { + return new alter_partition_with_environment_context_resultTupleScheme(); + } + } + + private static class alter_partition_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class rename_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -47743,6 +55380,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new rename_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new rename_partition_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private List part_vals; // required @@ -47816,7 +55459,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -48199,96 +55841,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list249 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list249.size); - for (int _i250 = 0; _i250 < _list249.size; ++_i250) - { - String _elem251; // required - _elem251 = iprot.readString(); - this.part_vals.add(_elem251); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NEW_PART - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter252 : this.part_vals) - { - oprot.writeString(_iter252); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -48333,6 +55890,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_part != null) { + new_part.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -48351,6 +55912,191 @@ } } + private static class rename_partition_argsStandardSchemeFactory implements SchemeFactory { + public rename_partition_argsStandardScheme getScheme() { + return new rename_partition_argsStandardScheme(); + } + } + + private static class rename_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list498 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list498.size); + for (int _i499 = 0; _i499 < _list498.size; ++_i499) + { + String _elem500; // required + _elem500 = iprot.readString(); + struct.part_vals.add(_elem500); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NEW_PART + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, rename_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (String _iter501 : struct.part_vals) + { + oprot.writeString(_iter501); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + struct.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class rename_partition_argsTupleSchemeFactory implements SchemeFactory { + public rename_partition_argsTupleScheme getScheme() { + return new rename_partition_argsTupleScheme(); + } + } + + private static class rename_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, rename_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetNew_part()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter502 : struct.part_vals) + { + oprot.writeString(_iter502); + } + } + } + if (struct.isSetNew_part()) { + struct.new_part.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list503 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list503.size); + for (int _i504 = 0; _i504 < _list503.size; ++_i504) + { + String _elem505; // required + _elem505 = iprot.readString(); + struct.part_vals.add(_elem505); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.new_part = new Partition(); + struct.new_part.read(iprot); + struct.setNew_partIsSet(true); + } + } + } + } public static class rename_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -48359,6 +56105,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new rename_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new rename_partition_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -48424,7 +56176,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -48651,55 +56402,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -48727,6 +56435,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -48745,6 +56454,115 @@ } } + private static class rename_partition_resultStandardSchemeFactory implements SchemeFactory { + public rename_partition_resultStandardScheme getScheme() { + return new rename_partition_resultStandardScheme(); + } + } + + private static class rename_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, rename_partition_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class rename_partition_resultTupleSchemeFactory implements SchemeFactory { + public rename_partition_resultTupleScheme getScheme() { + return new rename_partition_resultTupleScheme(); + } + } + + private static class rename_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, rename_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_config_value_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -48753,6 +56571,12 @@ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultValue", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_config_value_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_config_value_argsTupleSchemeFactory()); + } + private String name; // required private String defaultValue; // required @@ -48818,7 +56642,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -49045,54 +56868,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DEFAULT_VALUE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.defaultValue = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.defaultValue != null) { - oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); - oprot.writeString(this.defaultValue); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -49121,6 +56901,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -49139,6 +56920,111 @@ } } + private static class get_config_value_argsStandardSchemeFactory implements SchemeFactory { + public get_config_value_argsStandardScheme getScheme() { + return new get_config_value_argsStandardScheme(); + } + } + + private static class get_config_value_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_config_value_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DEFAULT_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.defaultValue = iprot.readString(); + struct.setDefaultValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_config_value_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.defaultValue != null) { + oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); + oprot.writeString(struct.defaultValue); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_config_value_argsTupleSchemeFactory implements SchemeFactory { + public get_config_value_argsTupleScheme getScheme() { + return new get_config_value_argsTupleScheme(); + } + } + + private static class get_config_value_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_config_value_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetDefaultValue()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDefaultValue()) { + oprot.writeString(struct.defaultValue); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_config_value_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.defaultValue = iprot.readString(); + struct.setDefaultValueIsSet(true); + } + } + } + } public static class get_config_value_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -49147,6 +57033,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_config_value_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_config_value_resultTupleSchemeFactory()); + } + private String success; // required private ConfigValSecurityException o1; // required @@ -49212,7 +57104,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -49439,54 +57330,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.success = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new ConfigValSecurityException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -49514,6 +57363,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -49532,6 +57382,113 @@ } } + private static class get_config_value_resultStandardSchemeFactory implements SchemeFactory { + public get_config_value_resultStandardScheme getScheme() { + return new get_config_value_resultStandardScheme(); + } + } + + private static class get_config_value_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_config_value_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new ConfigValSecurityException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_config_value_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_config_value_resultTupleSchemeFactory implements SchemeFactory { + public get_config_value_resultTupleScheme getScheme() { + return new get_config_value_resultTupleScheme(); + } + } + + private static class get_config_value_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_config_value_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_config_value_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new ConfigValSecurityException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class partition_name_to_vals_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -49539,6 +57496,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_vals_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_vals_argsTupleSchemeFactory()); + } + private String part_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -49600,7 +57563,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -49759,42 +57721,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -49815,6 +57746,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -49833,6 +57765,88 @@ } } + private static class partition_name_to_vals_argsStandardSchemeFactory implements SchemeFactory { + public partition_name_to_vals_argsStandardScheme getScheme() { + return new partition_name_to_vals_argsStandardScheme(); + } + } + + private static class partition_name_to_vals_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_vals_argsTupleSchemeFactory implements SchemeFactory { + public partition_name_to_vals_argsTupleScheme getScheme() { + return new partition_name_to_vals_argsTupleScheme(); + } + } + + private static class partition_name_to_vals_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPart_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class partition_name_to_vals_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -49841,6 +57855,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_vals_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_vals_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -49906,7 +57926,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -50153,71 +58172,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list253 = iprot.readListBegin(); - this.success = new ArrayList(_list253.size); - for (int _i254 = 0; _i254 < _list253.size; ++_i254) - { - String _elem255; // required - _elem255 = iprot.readString(); - this.success.add(_elem255); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter256 : this.success) - { - oprot.writeString(_iter256); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -50245,6 +58205,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -50263,6 +58224,145 @@ } } + private static class partition_name_to_vals_resultStandardSchemeFactory implements SchemeFactory { + public partition_name_to_vals_resultStandardScheme getScheme() { + return new partition_name_to_vals_resultStandardScheme(); + } + } + + private static class partition_name_to_vals_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list506 = iprot.readListBegin(); + struct.success = new ArrayList(_list506.size); + for (int _i507 = 0; _i507 < _list506.size; ++_i507) + { + String _elem508; // required + _elem508 = iprot.readString(); + struct.success.add(_elem508); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter509 : struct.success) + { + oprot.writeString(_iter509); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_vals_resultTupleSchemeFactory implements SchemeFactory { + public partition_name_to_vals_resultTupleScheme getScheme() { + return new partition_name_to_vals_resultTupleScheme(); + } + } + + private static class partition_name_to_vals_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter510 : struct.success) + { + oprot.writeString(_iter510); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list511 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list511.size); + for (int _i512 = 0; _i512 < _list511.size; ++_i512) + { + String _elem513; // required + _elem513 = iprot.readString(); + struct.success.add(_elem513); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class partition_name_to_spec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -50270,6 +58370,12 @@ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_spec_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_spec_argsTupleSchemeFactory()); + } + private String part_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -50331,7 +58437,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -50490,42 +58595,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PART_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.part_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -50546,6 +58620,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -50564,6 +58639,88 @@ } } + private static class partition_name_to_spec_argsStandardSchemeFactory implements SchemeFactory { + public partition_name_to_spec_argsStandardScheme getScheme() { + return new partition_name_to_spec_argsStandardScheme(); + } + } + + private static class partition_name_to_spec_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_spec_argsTupleSchemeFactory implements SchemeFactory { + public partition_name_to_spec_argsTupleScheme getScheme() { + return new partition_name_to_spec_argsTupleScheme(); + } + } + + private static class partition_name_to_spec_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPart_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + } + } + } public static class partition_name_to_spec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -50572,6 +58729,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_to_spec_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_to_spec_resultTupleSchemeFactory()); + } + private Map success; // required private MetaException o1; // required @@ -50637,7 +58800,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -50889,74 +59051,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map257 = iprot.readMapBegin(); - this.success = new HashMap(2*_map257.size); - for (int _i258 = 0; _i258 < _map257.size; ++_i258) - { - String _key259; // required - String _val260; // required - _key259 = iprot.readString(); - _val260 = iprot.readString(); - this.success.put(_key259, _val260); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (Map.Entry _iter261 : this.success.entrySet()) - { - oprot.writeString(_iter261.getKey()); - oprot.writeString(_iter261.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -50984,6 +59084,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -51002,6 +59103,151 @@ } } + private static class partition_name_to_spec_resultStandardSchemeFactory implements SchemeFactory { + public partition_name_to_spec_resultStandardScheme getScheme() { + return new partition_name_to_spec_resultStandardScheme(); + } + } + + private static class partition_name_to_spec_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map514 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map514.size); + for (int _i515 = 0; _i515 < _map514.size; ++_i515) + { + String _key516; // required + String _val517; // required + _key516 = iprot.readString(); + _val517 = iprot.readString(); + struct.success.put(_key516, _val517); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (Map.Entry _iter518 : struct.success.entrySet()) + { + oprot.writeString(_iter518.getKey()); + oprot.writeString(_iter518.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_to_spec_resultTupleSchemeFactory implements SchemeFactory { + public partition_name_to_spec_resultTupleScheme getScheme() { + return new partition_name_to_spec_resultTupleScheme(); + } + } + + private static class partition_name_to_spec_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter519 : struct.success.entrySet()) + { + oprot.writeString(_iter519.getKey()); + oprot.writeString(_iter519.getValue()); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map520 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap(2*_map520.size); + for (int _i521 = 0; _i521 < _map520.size; ++_i521) + { + String _key522; // required + String _val523; // required + _key522 = iprot.readString(); + _val523 = iprot.readString(); + struct.success.put(_key522, _val523); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class markPartitionForEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -51012,6 +59258,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new markPartitionForEvent_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new markPartitionForEvent_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Map part_vals; // required @@ -51089,7 +59341,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -51485,98 +59736,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map262 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map262.size); - for (int _i263 = 0; _i263 < _map262.size; ++_i263) - { - String _key264; // required - String _val265; // required - _key264 = iprot.readString(); - _val265 = iprot.readString(); - this.part_vals.put(_key264, _val265); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // EVENT_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.eventType = PartitionEventType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (Map.Entry _iter266 : this.part_vals.entrySet()) - { - oprot.writeString(_iter266.getKey()); - oprot.writeString(_iter266.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.eventType != null) { - oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); - oprot.writeI32(this.eventType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -51621,6 +59785,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -51639,6 +59804,195 @@ } } + private static class markPartitionForEvent_argsStandardSchemeFactory implements SchemeFactory { + public markPartitionForEvent_argsStandardScheme getScheme() { + return new markPartitionForEvent_argsStandardScheme(); + } + } + + private static class markPartitionForEvent_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map524 = iprot.readMapBegin(); + struct.part_vals = new HashMap(2*_map524.size); + for (int _i525 = 0; _i525 < _map524.size; ++_i525) + { + String _key526; // required + String _val527; // required + _key526 = iprot.readString(); + _val527 = iprot.readString(); + struct.part_vals.put(_key526, _val527); + } + iprot.readMapEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // EVENT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (Map.Entry _iter528 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter528.getKey()); + oprot.writeString(_iter528.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.eventType != null) { + oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); + oprot.writeI32(struct.eventType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class markPartitionForEvent_argsTupleSchemeFactory implements SchemeFactory { + public markPartitionForEvent_argsTupleScheme getScheme() { + return new markPartitionForEvent_argsTupleScheme(); + } + } + + private static class markPartitionForEvent_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetEventType()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (Map.Entry _iter529 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter529.getKey()); + oprot.writeString(_iter529.getValue()); + } + } + } + if (struct.isSetEventType()) { + oprot.writeI32(struct.eventType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map530 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new HashMap(2*_map530.size); + for (int _i531 = 0; _i531 < _map530.size; ++_i531) + { + String _key532; // required + String _val533; // required + _key532 = iprot.readString(); + _val533 = iprot.readString(); + struct.part_vals.put(_key532, _val533); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } + } + } + } public static class markPartitionForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -51651,6 +60005,12 @@ private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new markPartitionForEvent_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new markPartitionForEvent_resultTupleSchemeFactory()); + } + private MetaException o1; // required private NoSuchObjectException o2; // required private UnknownDBException o3; // required @@ -51732,7 +60092,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -52231,103 +60590,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new UnknownTableException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // O5 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o5 = new UnknownPartitionException(); - this.o5.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // O6 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o6 = new InvalidPartitionException(); - this.o6.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO5()) { - oprot.writeFieldBegin(O5_FIELD_DESC); - this.o5.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO6()) { - oprot.writeFieldBegin(O6_FIELD_DESC); - this.o6.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -52387,6 +60655,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -52405,6 +60674,215 @@ } } + private static class markPartitionForEvent_resultStandardSchemeFactory implements SchemeFactory { + public markPartitionForEvent_resultStandardScheme getScheme() { + return new markPartitionForEvent_resultStandardScheme(); + } + } + + private static class markPartitionForEvent_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // O5 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // O6 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o5 != null) { + oprot.writeFieldBegin(O5_FIELD_DESC); + struct.o5.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o6 != null) { + oprot.writeFieldBegin(O6_FIELD_DESC); + struct.o6.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class markPartitionForEvent_resultTupleSchemeFactory implements SchemeFactory { + public markPartitionForEvent_resultTupleScheme getScheme() { + return new markPartitionForEvent_resultTupleScheme(); + } + } + + private static class markPartitionForEvent_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + if (struct.isSetO3()) { + optionals.set(2); + } + if (struct.isSetO4()) { + optionals.set(3); + } + if (struct.isSetO5()) { + optionals.set(4); + } + if (struct.isSetO6()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + if (struct.isSetO5()) { + struct.o5.write(oprot); + } + if (struct.isSetO6()) { + struct.o6.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(3)) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + if (incoming.get(4)) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } + if (incoming.get(5)) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } + } + } + } public static class isPartitionMarkedForEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -52415,6 +60893,12 @@ private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isPartitionMarkedForEvent_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isPartitionMarkedForEvent_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private Map part_vals; // required @@ -52492,7 +60976,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -52888,98 +61371,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map267 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map267.size); - for (int _i268 = 0; _i268 < _map267.size; ++_i268) - { - String _key269; // required - String _val270; // required - _key269 = iprot.readString(); - _val270 = iprot.readString(); - this.part_vals.put(_key269, _val270); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // EVENT_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.eventType = PartitionEventType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (Map.Entry _iter271 : this.part_vals.entrySet()) - { - oprot.writeString(_iter271.getKey()); - oprot.writeString(_iter271.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.eventType != null) { - oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); - oprot.writeI32(this.eventType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -53024,6 +61420,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -53042,6 +61439,195 @@ } } + private static class isPartitionMarkedForEvent_argsStandardSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_argsStandardScheme getScheme() { + return new isPartitionMarkedForEvent_argsStandardScheme(); + } + } + + private static class isPartitionMarkedForEvent_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map534 = iprot.readMapBegin(); + struct.part_vals = new HashMap(2*_map534.size); + for (int _i535 = 0; _i535 < _map534.size; ++_i535) + { + String _key536; // required + String _val537; // required + _key536 = iprot.readString(); + _val537 = iprot.readString(); + struct.part_vals.put(_key536, _val537); + } + iprot.readMapEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // EVENT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); + for (Map.Entry _iter538 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter538.getKey()); + oprot.writeString(_iter538.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.eventType != null) { + oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); + oprot.writeI32(struct.eventType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isPartitionMarkedForEvent_argsTupleSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_argsTupleScheme getScheme() { + return new isPartitionMarkedForEvent_argsTupleScheme(); + } + } + + private static class isPartitionMarkedForEvent_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetEventType()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (Map.Entry _iter539 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter539.getKey()); + oprot.writeString(_iter539.getValue()); + } + } + } + if (struct.isSetEventType()) { + oprot.writeI32(struct.eventType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map540 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new HashMap(2*_map540.size); + for (int _i541 = 0; _i541 < _map540.size; ++_i541) + { + String _key542; // required + String _val543; // required + _key542 = iprot.readString(); + _val543 = iprot.readString(); + struct.part_vals.put(_key542, _val543); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.eventType = PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } + } + } + } public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -53055,6 +61641,12 @@ private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isPartitionMarkedForEvent_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isPartitionMarkedForEvent_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -53141,8 +61733,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -53191,8 +61782,7 @@ * Performs a deep copy on other. */ public isPartitionMarkedForEvent_result(isPartitionMarkedForEvent_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -53240,16 +61830,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -53710,115 +62300,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // O4 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o4 = new UnknownTableException(); - this.o4.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // O5 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o5 = new UnknownPartitionException(); - this.o5.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // O6 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o6 = new InvalidPartitionException(); - this.o6.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO5()) { - oprot.writeFieldBegin(O5_FIELD_DESC); - this.o5.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO6()) { - oprot.writeFieldBegin(O6_FIELD_DESC); - this.o6.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -53882,6 +62369,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -53894,12 +62382,246 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class isPartitionMarkedForEvent_resultStandardSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_resultStandardScheme getScheme() { + return new isPartitionMarkedForEvent_resultStandardScheme(); + } + } + + private static class isPartitionMarkedForEvent_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // O4 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // O5 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // O6 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o5 != null) { + oprot.writeFieldBegin(O5_FIELD_DESC); + struct.o5.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o6 != null) { + oprot.writeFieldBegin(O6_FIELD_DESC); + struct.o6.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isPartitionMarkedForEvent_resultTupleSchemeFactory implements SchemeFactory { + public isPartitionMarkedForEvent_resultTupleScheme getScheme() { + return new isPartitionMarkedForEvent_resultTupleScheme(); + } + } + + private static class isPartitionMarkedForEvent_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + if (struct.isSetO4()) { + optionals.set(4); + } + if (struct.isSetO5()) { + optionals.set(5); + } + if (struct.isSetO6()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + if (struct.isSetO5()) { + struct.o5.write(oprot); + } + if (struct.isSetO6()) { + struct.o6.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new UnknownDBException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new UnknownTableException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + if (incoming.get(5)) { + struct.o5 = new UnknownPartitionException(); + struct.o5.read(iprot); + struct.setO5IsSet(true); + } + if (incoming.get(6)) { + struct.o6 = new InvalidPartitionException(); + struct.o6.read(iprot); + struct.setO6IsSet(true); + } + } + } + } public static class add_index_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -53908,6 +62630,12 @@ private static final org.apache.thrift.protocol.TField NEW_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_index", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField INDEX_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("index_table", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_index_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_index_argsTupleSchemeFactory()); + } + private Index new_index; // required private Table index_table; // required @@ -53973,7 +62701,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -54200,56 +62927,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NEW_INDEX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_index = new Index(); - this.new_index.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // INDEX_TABLE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.index_table = new Table(); - this.index_table.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_index != null) { - oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); - this.new_index.write(oprot); - oprot.writeFieldEnd(); - } - if (this.index_table != null) { - oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); - this.index_table.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -54278,6 +62960,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_index != null) { + new_index.validate(); + } + if (index_table != null) { + index_table.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -54296,6 +62985,115 @@ } } + private static class add_index_argsStandardSchemeFactory implements SchemeFactory { + public add_index_argsStandardScheme getScheme() { + return new add_index_argsStandardScheme(); + } + } + + private static class add_index_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NEW_INDEX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_index = new Index(); + struct.new_index.read(iprot); + struct.setNew_indexIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INDEX_TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.index_table = new Table(); + struct.index_table.read(iprot); + struct.setIndex_tableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_index_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.new_index != null) { + oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); + struct.new_index.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + struct.index_table.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_index_argsTupleSchemeFactory implements SchemeFactory { + public add_index_argsTupleScheme getScheme() { + return new add_index_argsTupleScheme(); + } + } + + private static class add_index_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNew_index()) { + optionals.set(0); + } + if (struct.isSetIndex_table()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNew_index()) { + struct.new_index.write(oprot); + } + if (struct.isSetIndex_table()) { + struct.index_table.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.new_index = new Index(); + struct.new_index.read(iprot); + struct.setNew_indexIsSet(true); + } + if (incoming.get(1)) { + struct.index_table = new Table(); + struct.index_table.read(iprot); + struct.setIndex_tableIsSet(true); + } + } + } + } public static class add_index_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -54306,6 +63104,12 @@ private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_index_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_index_resultTupleSchemeFactory()); + } + private Index success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required @@ -54379,7 +63183,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -54742,79 +63545,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -54858,6 +63594,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -54876,6 +63616,165 @@ } } + private static class add_index_resultStandardSchemeFactory implements SchemeFactory { + public add_index_resultStandardScheme getScheme() { + return new add_index_resultStandardScheme(); + } + } + + private static class add_index_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, add_index_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_index_resultTupleSchemeFactory implements SchemeFactory { + public add_index_resultTupleScheme getScheme() { + return new add_index_resultTupleScheme(); + } + } + + private static class add_index_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + if (struct.isSetO3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + if (struct.isSetO3()) { + struct.o3.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new InvalidObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new AlreadyExistsException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + } public static class alter_index_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -54886,6 +63785,12 @@ private static final org.apache.thrift.protocol.TField IDX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("idx_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField NEW_IDX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_idx", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_index_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_index_argsTupleSchemeFactory()); + } + private String dbname; // required private String base_tbl_name; // required private String idx_name; // required @@ -54959,7 +63864,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -55322,79 +64226,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DBNAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbname = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // BASE_TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.base_tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // IDX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.idx_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // NEW_IDX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.new_idx = new Index(); - this.new_idx.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.base_tbl_name != null) { - oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); - oprot.writeString(this.base_tbl_name); - oprot.writeFieldEnd(); - } - if (this.idx_name != null) { - oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); - oprot.writeString(this.idx_name); - oprot.writeFieldEnd(); - } - if (this.new_idx != null) { - oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); - this.new_idx.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -55439,6 +64275,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (new_idx != null) { + new_idx.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -55457,6 +64297,159 @@ } } + private static class alter_index_argsStandardSchemeFactory implements SchemeFactory { + public alter_index_argsStandardScheme getScheme() { + return new alter_index_argsStandardScheme(); + } + } + + private static class alter_index_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_index_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DBNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // BASE_TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.base_tbl_name = iprot.readString(); + struct.setBase_tbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IDX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.idx_name = iprot.readString(); + struct.setIdx_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NEW_IDX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.new_idx = new Index(); + struct.new_idx.read(iprot); + struct.setNew_idxIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_index_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.base_tbl_name != null) { + oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); + oprot.writeString(struct.base_tbl_name); + oprot.writeFieldEnd(); + } + if (struct.idx_name != null) { + oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); + oprot.writeString(struct.idx_name); + oprot.writeFieldEnd(); + } + if (struct.new_idx != null) { + oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); + struct.new_idx.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_index_argsTupleSchemeFactory implements SchemeFactory { + public alter_index_argsTupleScheme getScheme() { + return new alter_index_argsTupleScheme(); + } + } + + private static class alter_index_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetBase_tbl_name()) { + optionals.set(1); + } + if (struct.isSetIdx_name()) { + optionals.set(2); + } + if (struct.isSetNew_idx()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetBase_tbl_name()) { + oprot.writeString(struct.base_tbl_name); + } + if (struct.isSetIdx_name()) { + oprot.writeString(struct.idx_name); + } + if (struct.isSetNew_idx()) { + struct.new_idx.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_index_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(1)) { + struct.base_tbl_name = iprot.readString(); + struct.setBase_tbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.idx_name = iprot.readString(); + struct.setIdx_nameIsSet(true); + } + if (incoming.get(3)) { + struct.new_idx = new Index(); + struct.new_idx.read(iprot); + struct.setNew_idxIsSet(true); + } + } + } + } public static class alter_index_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -55465,6 +64458,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_index_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_index_resultTupleSchemeFactory()); + } + private InvalidOperationException o1; // required private MetaException o2; // required @@ -55530,7 +64529,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -55757,55 +64755,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -55833,6 +64788,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -55851,6 +64807,115 @@ } } + private static class alter_index_resultStandardSchemeFactory implements SchemeFactory { + public alter_index_resultStandardScheme getScheme() { + return new alter_index_resultStandardScheme(); + } + } + + private static class alter_index_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_index_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, alter_index_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_index_resultTupleSchemeFactory implements SchemeFactory { + public alter_index_resultTupleScheme getScheme() { + return new alter_index_resultTupleScheme(); + } + } + + private static class alter_index_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_index_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new InvalidOperationException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class drop_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -55861,6 +64926,12 @@ private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_index_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_index_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String index_name; // required @@ -55935,8 +65006,7 @@ // isset id assignments private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -55973,8 +65043,7 @@ * Performs a deep copy on other. */ public drop_index_by_name_args(drop_index_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -56079,16 +65148,16 @@ } public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -56300,77 +65369,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INDEX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.index_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -56411,6 +65414,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -56424,13 +65428,162 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_index_by_name_argsStandardSchemeFactory implements SchemeFactory { + public drop_index_by_name_argsStandardScheme getScheme() { + return new drop_index_by_name_argsStandardScheme(); + } + } + + private static class drop_index_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // INDEX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DELETE_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(struct.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_index_by_name_argsTupleSchemeFactory implements SchemeFactory { + public drop_index_by_name_argsTupleScheme getScheme() { + return new drop_index_by_name_argsTupleScheme(); + } + } + + private static class drop_index_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetIndex_name()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetIndex_name()) { + oprot.writeString(struct.index_name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + } + } + } public static class drop_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -56440,6 +65593,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_index_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_index_by_name_resultTupleSchemeFactory()); + } + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -56510,8 +65669,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -56544,8 +65702,7 @@ * Performs a deep copy on other. */ public drop_index_by_name_result(drop_index_by_name_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); @@ -56577,16 +65734,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -56807,67 +65964,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -56899,6 +66001,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -56911,12 +66014,146 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_index_by_name_resultStandardSchemeFactory implements SchemeFactory { + public drop_index_by_name_resultStandardScheme getScheme() { + return new drop_index_by_name_resultStandardScheme(); + } + } + + private static class drop_index_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_index_by_name_resultTupleSchemeFactory implements SchemeFactory { + public drop_index_by_name_resultTupleScheme getScheme() { + return new drop_index_by_name_resultTupleScheme(); + } + } + + private static class drop_index_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -56926,6 +66163,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_by_name_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_by_name_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private String index_name; // required @@ -56995,7 +66238,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -57290,66 +66532,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INDEX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.index_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -57386,6 +66573,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -57404,6 +66592,134 @@ } } + private static class get_index_by_name_argsStandardSchemeFactory implements SchemeFactory { + public get_index_by_name_argsStandardScheme getScheme() { + return new get_index_by_name_argsStandardScheme(); + } + } + + private static class get_index_by_name_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_by_name_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // INDEX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_by_name_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + if (struct.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(struct.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_by_name_argsTupleSchemeFactory implements SchemeFactory { + public get_index_by_name_argsTupleScheme getScheme() { + return new get_index_by_name_argsTupleScheme(); + } + } + + private static class get_index_by_name_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetIndex_name()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetIndex_name()) { + oprot.writeString(struct.index_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.index_name = iprot.readString(); + struct.setIndex_nameIsSet(true); + } + } + } + } public static class get_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -57413,6 +66729,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_by_name_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_by_name_resultTupleSchemeFactory()); + } + private Index success; // required private MetaException o1; // required private NoSuchObjectException o2; // required @@ -57482,7 +66804,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -57777,67 +67098,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -57873,6 +67139,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -57891,6 +67161,140 @@ } } + private static class get_index_by_name_resultStandardSchemeFactory implements SchemeFactory { + public get_index_by_name_resultStandardScheme getScheme() { + return new get_index_by_name_resultStandardScheme(); + } + } + + private static class get_index_by_name_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_by_name_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_by_name_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_by_name_resultTupleSchemeFactory implements SchemeFactory { + public get_index_by_name_resultTupleScheme getScheme() { + return new get_index_by_name_resultTupleScheme(); + } + } + + private static class get_index_by_name_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Index(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new NoSuchObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_indexes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -57900,6 +67304,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_indexes_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_indexes_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_indexes; // required @@ -57970,8 +67380,7 @@ // isset id assignments private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -58006,8 +67415,7 @@ * Performs a deep copy on other. */ public get_indexes_args(get_indexes_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -58085,16 +67493,16 @@ } public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -58269,65 +67677,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_INDEXES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -58360,6 +67714,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -58373,13 +67728,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_indexes_argsStandardSchemeFactory implements SchemeFactory { + public get_indexes_argsStandardScheme getScheme() { + return new get_indexes_argsStandardScheme(); + } + } + + private static class get_indexes_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_INDEXES + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_indexes_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(struct.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_indexes_argsTupleSchemeFactory implements SchemeFactory { + public get_indexes_argsTupleScheme getScheme() { + return new get_indexes_argsTupleScheme(); + } + } + + private static class get_indexes_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_indexes_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_indexes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_indexes()) { + oprot.writeI16(struct.max_indexes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } + } + } + } public static class get_indexes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -58389,6 +67870,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_indexes_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_indexes_resultTupleSchemeFactory()); + } + private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // required @@ -58458,7 +67945,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -58773,84 +68259,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list272 = iprot.readListBegin(); - this.success = new ArrayList(_list272.size); - for (int _i273 = 0; _i273 < _list272.size; ++_i273) - { - Index _elem274; // required - _elem274 = new Index(); - _elem274.read(iprot); - this.success.add(_elem274); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Index _iter275 : this.success) - { - _iter275.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -58886,6 +68300,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -58904,6 +68319,172 @@ } } + private static class get_indexes_resultStandardSchemeFactory implements SchemeFactory { + public get_indexes_resultStandardScheme getScheme() { + return new get_indexes_resultStandardScheme(); + } + } + + private static class get_indexes_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list544 = iprot.readListBegin(); + struct.success = new ArrayList(_list544.size); + for (int _i545 = 0; _i545 < _list544.size; ++_i545) + { + Index _elem546; // required + _elem546 = new Index(); + _elem546.read(iprot); + struct.success.add(_elem546); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_indexes_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Index _iter547 : struct.success) + { + _iter547.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_indexes_resultTupleSchemeFactory implements SchemeFactory { + public get_indexes_resultTupleScheme getScheme() { + return new get_indexes_resultTupleScheme(); + } + } + + private static class get_indexes_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_indexes_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + if (struct.isSetO2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Index _iter548 : struct.success) + { + _iter548.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list549 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list549.size); + for (int _i550 = 0; _i550 < _list549.size; ++_i550) + { + Index _elem551; // required + _elem551 = new Index(); + _elem551.read(iprot); + struct.success.add(_elem551); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchObjectException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class get_index_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -58913,6 +68494,12 @@ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_names_argsTupleSchemeFactory()); + } + private String db_name; // required private String tbl_name; // required private short max_indexes; // required @@ -58983,8 +68570,7 @@ // isset id assignments private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -59019,8 +68605,7 @@ * Performs a deep copy on other. */ public get_index_names_args(get_index_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -59098,16 +68683,16 @@ } public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -59282,65 +68867,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.db_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // MAX_INDEXES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -59373,6 +68904,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -59386,13 +68918,139 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class get_index_names_argsStandardSchemeFactory implements SchemeFactory { + public get_index_names_argsStandardScheme getScheme() { + return new get_index_names_argsStandardScheme(); + } + } + + private static class get_index_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MAX_INDEXES + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.db_name); + oprot.writeFieldEnd(); + } + if (struct.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(struct.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_names_argsTupleSchemeFactory implements SchemeFactory { + public get_index_names_argsTupleScheme getScheme() { + return new get_index_names_argsTupleScheme(); + } + } + + private static class get_index_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_name()) { + optionals.set(0); + } + if (struct.isSetTbl_name()) { + optionals.set(1); + } + if (struct.isSetMax_indexes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTbl_name()) { + oprot.writeString(struct.tbl_name); + } + if (struct.isSetMax_indexes()) { + oprot.writeI16(struct.max_indexes); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.max_indexes = iprot.readI16(); + struct.setMax_indexesIsSet(true); + } + } + } + } public static class get_index_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -59401,6 +69059,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_index_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_index_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o2; // required @@ -59466,7 +69130,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -59713,71 +69376,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list276 = iprot.readListBegin(); - this.success = new ArrayList(_list276.size); - for (int _i277 = 0; _i277 < _list276.size; ++_i277) - { - String _elem278; // required - _elem278 = iprot.readString(); - this.success.add(_elem278); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O2 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter279 : this.success) - { - oprot.writeString(_iter279); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -59805,6 +69409,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -59823,6 +69428,145 @@ } } + private static class get_index_names_resultStandardSchemeFactory implements SchemeFactory { + public get_index_names_resultStandardScheme getScheme() { + return new get_index_names_resultStandardScheme(); + } + } + + private static class get_index_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list552 = iprot.readListBegin(); + struct.success = new ArrayList(_list552.size); + for (int _i553 = 0; _i553 < _list552.size; ++_i553) + { + String _elem554; // required + _elem554 = iprot.readString(); + struct.success.add(_elem554); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter555 : struct.success) + { + oprot.writeString(_iter555); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o2 != null) { + oprot.writeFieldBegin(O2_FIELD_DESC); + struct.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_index_names_resultTupleSchemeFactory implements SchemeFactory { + public get_index_names_resultTupleScheme getScheme() { + return new get_index_names_resultTupleScheme(); + } + } + + private static class get_index_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_index_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO2()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter556 : struct.success) + { + oprot.writeString(_iter556); + } + } + } + if (struct.isSetO2()) { + struct.o2.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list557 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list557.size); + for (int _i558 = 0; _i558 < _list557.size; ++_i558) + { + String _elem559; // required + _elem559 = iprot.readString(); + struct.success.add(_elem559); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + } public static class create_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -59830,6 +69574,12 @@ private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_role_argsTupleSchemeFactory()); + } + private Role role; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -59891,7 +69641,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60050,43 +69799,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.role = new Role(); - this.role.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role != null) { - oprot.writeFieldBegin(ROLE_FIELD_DESC); - this.role.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -60107,6 +69824,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (role != null) { + role.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -60125,6 +69846,90 @@ } } + private static class create_role_argsStandardSchemeFactory implements SchemeFactory { + public create_role_argsStandardScheme getScheme() { + return new create_role_argsStandardScheme(); + } + } + + private static class create_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.role = new Role(); + struct.role.read(iprot); + struct.setRoleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role != null) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + struct.role.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_role_argsTupleSchemeFactory implements SchemeFactory { + public create_role_argsTupleScheme getScheme() { + return new create_role_argsTupleScheme(); + } + } + + private static class create_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRole()) { + struct.role.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.role = new Role(); + struct.role.read(iprot); + struct.setRoleIsSet(true); + } + } + } + } public static class create_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -60133,6 +69938,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -60199,8 +70010,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60229,8 +70039,7 @@ * Performs a deep copy on other. */ public create_role_result(create_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -60258,16 +70067,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -60428,55 +70237,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -60500,6 +70266,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -60512,12 +70279,121 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class create_role_resultStandardSchemeFactory implements SchemeFactory { + public create_role_resultStandardScheme getScheme() { + return new create_role_resultStandardScheme(); + } + } + + private static class create_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, create_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_role_resultTupleSchemeFactory implements SchemeFactory { + public create_role_resultTupleScheme getScheme() { + return new create_role_resultTupleScheme(); + } + } + + private static class create_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class drop_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -60525,6 +70401,12 @@ private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_role_argsTupleSchemeFactory()); + } + private String role_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -60586,7 +70468,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60745,42 +70626,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.role_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role_name != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.role_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -60801,6 +70651,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -60819,6 +70670,88 @@ } } + private static class drop_role_argsStandardSchemeFactory implements SchemeFactory { + public drop_role_argsStandardScheme getScheme() { + return new drop_role_argsStandardScheme(); + } + } + + private static class drop_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.role_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_role_argsTupleSchemeFactory implements SchemeFactory { + public drop_role_argsTupleScheme getScheme() { + return new drop_role_argsTupleScheme(); + } + } + + private static class drop_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole_name()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRole_name()) { + oprot.writeString(struct.role_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } + } + } + } public static class drop_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -60827,6 +70760,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -60893,8 +70832,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -60923,8 +70861,7 @@ * Performs a deep copy on other. */ public drop_role_result(drop_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -60952,16 +70889,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -61122,55 +71059,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -61194,6 +71088,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -61206,19 +71101,134 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class drop_role_resultStandardSchemeFactory implements SchemeFactory { + public drop_role_resultStandardScheme getScheme() { + return new drop_role_resultStandardScheme(); + } + } + + private static class drop_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, drop_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_role_resultTupleSchemeFactory implements SchemeFactory { + public drop_role_resultTupleScheme getScheme() { + return new drop_role_resultTupleScheme(); + } + } + + private static class drop_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_role_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_role_names_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_role_names_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -61359,30 +71369,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -61396,6 +71387,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -61414,6 +71406,62 @@ } } + private static class get_role_names_argsStandardSchemeFactory implements SchemeFactory { + public get_role_names_argsStandardScheme getScheme() { + return new get_role_names_argsStandardScheme(); + } + } + + private static class get_role_names_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_role_names_argsTupleSchemeFactory implements SchemeFactory { + public get_role_names_argsTupleScheme getScheme() { + return new get_role_names_argsTupleScheme(); + } + } + + private static class get_role_names_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class get_role_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -61422,6 +71470,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_role_names_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_role_names_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -61487,7 +71541,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -61734,71 +71787,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list280 = iprot.readListBegin(); - this.success = new ArrayList(_list280.size); - for (int _i281 = 0; _i281 < _list280.size; ++_i281) - { - String _elem282; // required - _elem282 = iprot.readString(); - this.success.add(_elem282); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter283 : this.success) - { - oprot.writeString(_iter283); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -61826,6 +71820,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -61844,6 +71839,145 @@ } } + private static class get_role_names_resultStandardSchemeFactory implements SchemeFactory { + public get_role_names_resultStandardScheme getScheme() { + return new get_role_names_resultStandardScheme(); + } + } + + private static class get_role_names_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list560 = iprot.readListBegin(); + struct.success = new ArrayList(_list560.size); + for (int _i561 = 0; _i561 < _list560.size; ++_i561) + { + String _elem562; // required + _elem562 = iprot.readString(); + struct.success.add(_elem562); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter563 : struct.success) + { + oprot.writeString(_iter563); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_role_names_resultTupleSchemeFactory implements SchemeFactory { + public get_role_names_resultTupleScheme getScheme() { + return new get_role_names_resultTupleScheme(); + } + } + + private static class get_role_names_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter564 : struct.success) + { + oprot.writeString(_iter564); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list565 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list565.size); + for (int _i566 = 0; _i566 < _list565.size; ++_i566) + { + String _elem567; // required + _elem567 = iprot.readString(); + struct.success.add(_elem567); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class grant_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -61856,6 +71990,12 @@ private static final org.apache.thrift.protocol.TField GRANTOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorType", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grant_option", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_role_argsTupleSchemeFactory()); + } + private String role_name; // required private String principal_name; // required private PrincipalType principal_type; // required @@ -61946,8 +72086,7 @@ // isset id assignments private static final int __GRANT_OPTION_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -61992,8 +72131,7 @@ * Performs a deep copy on other. */ public grant_role_args(grant_role_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetRole_name()) { this.role_name = other.role_name; } @@ -62168,16 +72306,16 @@ } public void unsetGrant_option() { - __isset_bit_vector.clear(__GRANT_OPTION_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); } /** Returns true if field grant_option is set (has been assigned a value) and false otherwise */ public boolean isSetGrant_option() { - return __isset_bit_vector.get(__GRANT_OPTION_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); } public void setGrant_optionIsSet(boolean value) { - __isset_bit_vector.set(__GRANT_OPTION_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -62463,101 +72601,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.role_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // GRANTOR - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.grantor = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GRANTOR_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.grantorType = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // GRANT_OPTION - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.grant_option = iprot.readBool(); - setGrant_optionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role_name != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.role_name); - oprot.writeFieldEnd(); - } - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - if (this.grantor != null) { - oprot.writeFieldBegin(GRANTOR_FIELD_DESC); - oprot.writeString(this.grantor); - oprot.writeFieldEnd(); - } - if (this.grantorType != null) { - oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); - oprot.writeI32(this.grantorType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); - oprot.writeBool(this.grant_option); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -62614,6 +72662,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -62627,13 +72676,208 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class grant_role_argsStandardSchemeFactory implements SchemeFactory { + public grant_role_argsStandardScheme getScheme() { + return new grant_role_argsStandardScheme(); + } + } + + private static class grant_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GRANTOR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GRANTOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.grant_option = iprot.readBool(); + struct.setGrant_optionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.role_name); + oprot.writeFieldEnd(); + } + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(struct.grantor); + oprot.writeFieldEnd(); + } + if (struct.grantorType != null) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.grantorType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.grant_option); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_role_argsTupleSchemeFactory implements SchemeFactory { + public grant_role_argsTupleScheme getScheme() { + return new grant_role_argsTupleScheme(); + } + } + + private static class grant_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_name()) { + optionals.set(1); + } + if (struct.isSetPrincipal_type()) { + optionals.set(2); + } + if (struct.isSetGrantor()) { + optionals.set(3); + } + if (struct.isSetGrantorType()) { + optionals.set(4); + } + if (struct.isSetGrant_option()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetRole_name()) { + oprot.writeString(struct.role_name); + } + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + if (struct.isSetGrantor()) { + oprot.writeString(struct.grantor); + } + if (struct.isSetGrantorType()) { + oprot.writeI32(struct.grantorType.getValue()); + } + if (struct.isSetGrant_option()) { + oprot.writeBool(struct.grant_option); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(2)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + if (incoming.get(3)) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } + if (incoming.get(4)) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } + if (incoming.get(5)) { + struct.grant_option = iprot.readBool(); + struct.setGrant_optionIsSet(true); + } + } + } + } public static class grant_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -62642,6 +72886,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -62708,8 +72958,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -62738,8 +72987,7 @@ * Performs a deep copy on other. */ public grant_role_result(grant_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -62767,16 +73015,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -62937,55 +73185,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -63009,6 +73214,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -63021,12 +73227,121 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class grant_role_resultStandardSchemeFactory implements SchemeFactory { + public grant_role_resultStandardScheme getScheme() { + return new grant_role_resultStandardScheme(); + } + } + + private static class grant_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_role_resultTupleSchemeFactory implements SchemeFactory { + public grant_role_resultTupleScheme getScheme() { + return new grant_role_resultTupleScheme(); + } + } + + private static class grant_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class revoke_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -63036,6 +73351,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_role_argsTupleSchemeFactory()); + } + private String role_name; // required private String principal_name; // required private PrincipalType principal_type; // required @@ -63109,7 +73430,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -63412,66 +73732,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.role_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.role_name != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.role_name); - oprot.writeFieldEnd(); - } - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -63508,6 +73773,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -63526,6 +73792,134 @@ } } + private static class revoke_role_argsStandardSchemeFactory implements SchemeFactory { + public revoke_role_argsStandardScheme getScheme() { + return new revoke_role_argsStandardScheme(); + } + } + + private static class revoke_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_role_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.role_name); + oprot.writeFieldEnd(); + } + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_role_argsTupleSchemeFactory implements SchemeFactory { + public revoke_role_argsTupleScheme getScheme() { + return new revoke_role_argsTupleScheme(); + } + } + + private static class revoke_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRole_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_name()) { + optionals.set(1); + } + if (struct.isSetPrincipal_type()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetRole_name()) { + oprot.writeString(struct.role_name); + } + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.role_name = iprot.readString(); + struct.setRole_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(2)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + } + } public static class revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -63534,6 +73928,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_role_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -63600,8 +74000,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -63630,8 +74029,7 @@ * Performs a deep copy on other. */ public revoke_role_result(revoke_role_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -63659,16 +74057,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -63829,55 +74227,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -63901,6 +74256,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -63913,12 +74269,121 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class revoke_role_resultStandardSchemeFactory implements SchemeFactory { + public revoke_role_resultStandardScheme getScheme() { + return new revoke_role_resultStandardScheme(); + } + } + + private static class revoke_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_role_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_role_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_role_resultTupleSchemeFactory implements SchemeFactory { + public revoke_role_resultTupleScheme getScheme() { + return new revoke_role_resultTupleScheme(); + } + } + + private static class revoke_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class list_roles_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -63927,6 +74392,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_roles_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_roles_argsTupleSchemeFactory()); + } + private String principal_name; // required private PrincipalType principal_type; // required @@ -63996,7 +74467,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -64231,54 +74701,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -64307,6 +74734,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -64325,6 +74753,111 @@ } } + private static class list_roles_argsStandardSchemeFactory implements SchemeFactory { + public list_roles_argsStandardScheme getScheme() { + return new list_roles_argsStandardScheme(); + } + } + + private static class list_roles_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_roles_argsTupleSchemeFactory implements SchemeFactory { + public list_roles_argsTupleScheme getScheme() { + return new list_roles_argsTupleScheme(); + } + } + + private static class list_roles_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrincipal_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_type()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + } + } public static class list_roles_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -64333,6 +74866,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_roles_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_roles_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -64398,7 +74937,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -64645,72 +75183,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); - this.success = new ArrayList(_list284.size); - for (int _i285 = 0; _i285 < _list284.size; ++_i285) - { - Role _elem286; // required - _elem286 = new Role(); - _elem286.read(iprot); - this.success.add(_elem286); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Role _iter287 : this.success) - { - _iter287.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -64738,6 +75216,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -64756,6 +75235,147 @@ } } + private static class list_roles_resultStandardSchemeFactory implements SchemeFactory { + public list_roles_resultStandardScheme getScheme() { + return new list_roles_resultStandardScheme(); + } + } + + private static class list_roles_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list568 = iprot.readListBegin(); + struct.success = new ArrayList(_list568.size); + for (int _i569 = 0; _i569 < _list568.size; ++_i569) + { + Role _elem570; // required + _elem570 = new Role(); + _elem570.read(iprot); + struct.success.add(_elem570); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Role _iter571 : struct.success) + { + _iter571.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_roles_resultTupleSchemeFactory implements SchemeFactory { + public list_roles_resultTupleScheme getScheme() { + return new list_roles_resultTupleScheme(); + } + } + + private static class list_roles_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Role _iter572 : struct.success) + { + _iter572.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list573 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list573.size); + for (int _i574 = 0; _i574 < _list573.size; ++_i574) + { + Role _elem575; // required + _elem575 = new Role(); + _elem575.read(iprot); + struct.success.add(_elem575); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_privilege_set_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -64765,6 +75385,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_privilege_set_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_privilege_set_argsTupleSchemeFactory()); + } + private HiveObjectRef hiveObject; // required private String user_name; // required private List group_names; // required @@ -64834,7 +75460,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -65149,84 +75774,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // HIVE_OBJECT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.hiveObject = new HiveObjectRef(); - this.hiveObject.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); - this.group_names = new ArrayList(_list288.size); - for (int _i289 = 0; _i289 < _list288.size; ++_i289) - { - String _elem290; // required - _elem290 = iprot.readString(); - this.group_names.add(_elem290); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - this.hiveObject.write(oprot); - oprot.writeFieldEnd(); - } - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter291 : this.group_names) - { - oprot.writeString(_iter291); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -65263,6 +75815,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -65281,6 +75837,168 @@ } } + private static class get_privilege_set_argsStandardSchemeFactory implements SchemeFactory { + public get_privilege_set_argsStandardScheme getScheme() { + return new get_privilege_set_argsStandardScheme(); + } + } + + private static class get_privilege_set_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list576 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list576.size); + for (int _i577 = 0; _i577 < _list576.size; ++_i577) + { + String _elem578; // required + _elem578 = iprot.readString(); + struct.group_names.add(_elem578); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter579 : struct.group_names) + { + oprot.writeString(_iter579); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_privilege_set_argsTupleSchemeFactory implements SchemeFactory { + public get_privilege_set_argsTupleScheme getScheme() { + return new get_privilege_set_argsTupleScheme(); + } + } + + private static class get_privilege_set_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetHiveObject()) { + optionals.set(0); + } + if (struct.isSetUser_name()) { + optionals.set(1); + } + if (struct.isSetGroup_names()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter580 : struct.group_names) + { + oprot.writeString(_iter580); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + if (incoming.get(1)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list581 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list581.size); + for (int _i582 = 0; _i582 < _list581.size; ++_i582) + { + String _elem583; // required + _elem583 = iprot.readString(); + struct.group_names.add(_elem583); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class get_privilege_set_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -65289,6 +76007,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_privilege_set_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_privilege_set_resultTupleSchemeFactory()); + } + private PrincipalPrivilegeSet success; // required private MetaException o1; // required @@ -65354,7 +76078,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -65581,55 +76304,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new PrincipalPrivilegeSet(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -65657,6 +76337,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -65675,6 +76359,115 @@ } } + private static class get_privilege_set_resultStandardSchemeFactory implements SchemeFactory { + public get_privilege_set_resultStandardScheme getScheme() { + return new get_privilege_set_resultStandardScheme(); + } + } + + private static class get_privilege_set_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new PrincipalPrivilegeSet(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_privilege_set_resultTupleSchemeFactory implements SchemeFactory { + public get_privilege_set_resultTupleScheme getScheme() { + return new get_privilege_set_resultTupleScheme(); + } + } + + private static class get_privilege_set_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new PrincipalPrivilegeSet(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class list_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -65684,6 +76477,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField HIVE_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("hiveObject", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_privileges_argsTupleSchemeFactory()); + } + private String principal_name; // required private PrincipalType principal_type; // required private HiveObjectRef hiveObject; // required @@ -65757,7 +76556,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -66060,67 +76858,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principal_type = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // HIVE_OBJECT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.hiveObject = new HiveObjectRef(); - this.hiveObject.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.principal_name != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principal_name); - oprot.writeFieldEnd(); - } - if (this.principal_type != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principal_type.getValue()); - oprot.writeFieldEnd(); - } - if (this.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - this.hiveObject.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -66157,6 +76899,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -66175,6 +76921,136 @@ } } + private static class list_privileges_argsStandardSchemeFactory implements SchemeFactory { + public list_privileges_argsStandardScheme getScheme() { + return new list_privileges_argsStandardScheme(); + } + } + + private static class list_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principal_name); + oprot.writeFieldEnd(); + } + if (struct.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principal_type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_privileges_argsTupleSchemeFactory implements SchemeFactory { + public list_privileges_argsTupleScheme getScheme() { + return new list_privileges_argsTupleScheme(); + } + } + + private static class list_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrincipal_name()) { + optionals.set(0); + } + if (struct.isSetPrincipal_type()) { + optionals.set(1); + } + if (struct.isSetHiveObject()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetPrincipal_name()) { + oprot.writeString(struct.principal_name); + } + if (struct.isSetPrincipal_type()) { + oprot.writeI32(struct.principal_type.getValue()); + } + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + } + if (incoming.get(1)) { + struct.principal_type = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + if (incoming.get(2)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + } + } + } public static class list_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -66183,6 +77059,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new list_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new list_privileges_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -66248,7 +77130,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -66495,72 +77376,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); - this.success = new ArrayList(_list292.size); - for (int _i293 = 0; _i293 < _list292.size; ++_i293) - { - HiveObjectPrivilege _elem294; // required - _elem294 = new HiveObjectPrivilege(); - _elem294.read(iprot); - this.success.add(_elem294); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (HiveObjectPrivilege _iter295 : this.success) - { - _iter295.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -66588,6 +77409,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -66606,6 +77428,147 @@ } } + private static class list_privileges_resultStandardSchemeFactory implements SchemeFactory { + public list_privileges_resultStandardScheme getScheme() { + return new list_privileges_resultStandardScheme(); + } + } + + private static class list_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list584 = iprot.readListBegin(); + struct.success = new ArrayList(_list584.size); + for (int _i585 = 0; _i585 < _list584.size; ++_i585) + { + HiveObjectPrivilege _elem586; // required + _elem586 = new HiveObjectPrivilege(); + _elem586.read(iprot); + struct.success.add(_elem586); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (HiveObjectPrivilege _iter587 : struct.success) + { + _iter587.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class list_privileges_resultTupleSchemeFactory implements SchemeFactory { + public list_privileges_resultTupleScheme getScheme() { + return new list_privileges_resultTupleScheme(); + } + } + + private static class list_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (HiveObjectPrivilege _iter588 : struct.success) + { + _iter588.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list589 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list589.size); + for (int _i590 = 0; _i590 < _list589.size; ++_i590) + { + HiveObjectPrivilege _elem591; // required + _elem591 = new HiveObjectPrivilege(); + _elem591.read(iprot); + struct.success.add(_elem591); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class grant_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -66613,6 +77576,12 @@ private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_privileges_argsTupleSchemeFactory()); + } + private PrivilegeBag privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -66674,7 +77643,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -66833,43 +77801,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrivilegeBag(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -66890,6 +77826,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -66908,6 +77848,90 @@ } } + private static class grant_privileges_argsStandardSchemeFactory implements SchemeFactory { + public grant_privileges_argsStandardScheme getScheme() { + return new grant_privileges_argsStandardScheme(); + } + } + + private static class grant_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_privileges_argsTupleSchemeFactory implements SchemeFactory { + public grant_privileges_argsTupleScheme getScheme() { + return new grant_privileges_argsTupleScheme(); + } + } + + private static class grant_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivileges()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } public static class grant_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -66916,6 +77940,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_privileges_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -66982,8 +78012,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -67012,8 +78041,7 @@ * Performs a deep copy on other. */ public grant_privileges_result(grant_privileges_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -67041,16 +78069,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -67211,55 +78239,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -67283,6 +78268,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -67295,12 +78281,121 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class grant_privileges_resultStandardSchemeFactory implements SchemeFactory { + public grant_privileges_resultStandardScheme getScheme() { + return new grant_privileges_resultStandardScheme(); + } + } + + private static class grant_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_privileges_resultTupleSchemeFactory implements SchemeFactory { + public grant_privileges_resultTupleScheme getScheme() { + return new grant_privileges_resultTupleScheme(); + } + } + + private static class grant_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -67308,6 +78403,12 @@ private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_privileges_argsTupleSchemeFactory()); + } + private PrivilegeBag privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -67369,7 +78470,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -67528,43 +78628,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrivilegeBag(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -67585,6 +78653,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -67603,6 +78675,90 @@ } } + private static class revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { + public revoke_privileges_argsStandardScheme getScheme() { + return new revoke_privileges_argsStandardScheme(); + } + } + + private static class revoke_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { + public revoke_privileges_argsTupleScheme getScheme() { + return new revoke_privileges_argsTupleScheme(); + } + } + + private static class revoke_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivileges()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } public static class revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -67611,6 +78767,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new revoke_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new revoke_privileges_resultTupleSchemeFactory()); + } + private boolean success; // required private MetaException o1; // required @@ -67677,8 +78839,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -67707,8 +78868,7 @@ * Performs a deep copy on other. */ public revoke_privileges_result(revoke_privileges_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -67736,16 +78896,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -67906,55 +79066,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -67978,6 +79095,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -67990,12 +79108,121 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { + public revoke_privileges_resultStandardScheme getScheme() { + return new revoke_privileges_resultStandardScheme(); + } + } + + private static class revoke_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { + public revoke_privileges_resultTupleScheme getScheme() { + return new revoke_privileges_resultTupleScheme(); + } + } + + private static class revoke_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class set_ugi_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -68004,6 +79231,12 @@ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_ugi_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_ugi_argsTupleSchemeFactory()); + } + private String user_name; // required private List group_names; // required @@ -68069,7 +79302,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -68316,71 +79548,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // USER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.user_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // GROUP_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list296 = iprot.readListBegin(); - this.group_names = new ArrayList(_list296.size); - for (int _i297 = 0; _i297 < _list296.size; ++_i297) - { - String _elem298; // required - _elem298 = iprot.readString(); - this.group_names.add(_elem298); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.user_name != null) { - oprot.writeFieldBegin(USER_NAME_FIELD_DESC); - oprot.writeString(this.user_name); - oprot.writeFieldEnd(); - } - if (this.group_names != null) { - oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter299 : this.group_names) - { - oprot.writeString(_iter299); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -68409,6 +79581,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -68427,6 +79600,143 @@ } } + private static class set_ugi_argsStandardSchemeFactory implements SchemeFactory { + public set_ugi_argsStandardScheme getScheme() { + return new set_ugi_argsStandardScheme(); + } + } + + private static class set_ugi_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GROUP_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list592 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list592.size); + for (int _i593 = 0; _i593 < _list592.size; ++_i593) + { + String _elem594; // required + _elem594 = iprot.readString(); + struct.group_names.add(_elem594); + } + iprot.readListEnd(); + } + struct.setGroup_namesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(struct.user_name); + oprot.writeFieldEnd(); + } + if (struct.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); + for (String _iter595 : struct.group_names) + { + oprot.writeString(_iter595); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_ugi_argsTupleSchemeFactory implements SchemeFactory { + public set_ugi_argsTupleScheme getScheme() { + return new set_ugi_argsTupleScheme(); + } + } + + private static class set_ugi_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUser_name()) { + optionals.set(0); + } + if (struct.isSetGroup_names()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter596 : struct.group_names) + { + oprot.writeString(_iter596); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.user_name = iprot.readString(); + struct.setUser_nameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list597 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list597.size); + for (int _i598 = 0; _i598 < _list597.size; ++_i598) + { + String _elem599; // required + _elem599 = iprot.readString(); + struct.group_names.add(_elem599); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + } public static class set_ugi_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -68435,6 +79745,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_ugi_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_ugi_resultTupleSchemeFactory()); + } + private List success; // required private MetaException o1; // required @@ -68500,7 +79816,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -68747,71 +80062,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list300 = iprot.readListBegin(); - this.success = new ArrayList(_list300.size); - for (int _i301 = 0; _i301 < _list300.size; ++_i301) - { - String _elem302; // required - _elem302 = iprot.readString(); - this.success.add(_elem302); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter303 : this.success) - { - oprot.writeString(_iter303); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -68839,6 +80095,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -68857,6 +80114,145 @@ } } + private static class set_ugi_resultStandardSchemeFactory implements SchemeFactory { + public set_ugi_resultStandardScheme getScheme() { + return new set_ugi_resultStandardScheme(); + } + } + + private static class set_ugi_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list600 = iprot.readListBegin(); + struct.success = new ArrayList(_list600.size); + for (int _i601 = 0; _i601 < _list600.size; ++_i601) + { + String _elem602; // required + _elem602 = iprot.readString(); + struct.success.add(_elem602); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter603 : struct.success) + { + oprot.writeString(_iter603); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_ugi_resultTupleSchemeFactory implements SchemeFactory { + public set_ugi_resultTupleScheme getScheme() { + return new set_ugi_resultTupleScheme(); + } + } + + private static class set_ugi_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter604 : struct.success) + { + oprot.writeString(_iter604); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list605 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list605.size); + for (int _i606 = 0; _i606 < _list605.size; ++_i606) + { + String _elem607; // required + _elem607 = iprot.readString(); + struct.success.add(_elem607); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class get_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -68865,6 +80261,12 @@ private static final org.apache.thrift.protocol.TField TOKEN_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_owner", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("renewer_kerberos_principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_delegation_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_delegation_token_argsTupleSchemeFactory()); + } + private String token_owner; // required private String renewer_kerberos_principal_name; // required @@ -68930,7 +80332,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -69157,54 +80558,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TOKEN_OWNER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.token_owner = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.renewer_kerberos_principal_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.token_owner != null) { - oprot.writeFieldBegin(TOKEN_OWNER_FIELD_DESC); - oprot.writeString(this.token_owner); - oprot.writeFieldEnd(); - } - if (this.renewer_kerberos_principal_name != null) { - oprot.writeFieldBegin(RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.renewer_kerberos_principal_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -69233,6 +80591,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -69251,6 +80610,111 @@ } } + private static class get_delegation_token_argsStandardSchemeFactory implements SchemeFactory { + public get_delegation_token_argsStandardScheme getScheme() { + return new get_delegation_token_argsStandardScheme(); + } + } + + private static class get_delegation_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_delegation_token_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN_OWNER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_owner = iprot.readString(); + struct.setToken_ownerIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.renewer_kerberos_principal_name = iprot.readString(); + struct.setRenewer_kerberos_principal_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_delegation_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_owner != null) { + oprot.writeFieldBegin(TOKEN_OWNER_FIELD_DESC); + oprot.writeString(struct.token_owner); + oprot.writeFieldEnd(); + } + if (struct.renewer_kerberos_principal_name != null) { + oprot.writeFieldBegin(RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.renewer_kerberos_principal_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_delegation_token_argsTupleSchemeFactory implements SchemeFactory { + public get_delegation_token_argsTupleScheme getScheme() { + return new get_delegation_token_argsTupleScheme(); + } + } + + private static class get_delegation_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_owner()) { + optionals.set(0); + } + if (struct.isSetRenewer_kerberos_principal_name()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetToken_owner()) { + oprot.writeString(struct.token_owner); + } + if (struct.isSetRenewer_kerberos_principal_name()) { + oprot.writeString(struct.renewer_kerberos_principal_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.token_owner = iprot.readString(); + struct.setToken_ownerIsSet(true); + } + if (incoming.get(1)) { + struct.renewer_kerberos_principal_name = iprot.readString(); + struct.setRenewer_kerberos_principal_nameIsSet(true); + } + } + } + } public static class get_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -69259,6 +80723,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_delegation_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_delegation_token_resultTupleSchemeFactory()); + } + private String success; // required private MetaException o1; // required @@ -69324,7 +80794,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -69551,54 +81020,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.success = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -69626,6 +81053,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -69644,6 +81072,113 @@ } } + private static class get_delegation_token_resultStandardSchemeFactory implements SchemeFactory { + public get_delegation_token_resultStandardScheme getScheme() { + return new get_delegation_token_resultStandardScheme(); + } + } + + private static class get_delegation_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_delegation_token_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_delegation_token_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_delegation_token_resultTupleSchemeFactory implements SchemeFactory { + public get_delegation_token_resultTupleScheme getScheme() { + return new get_delegation_token_resultTupleScheme(); + } + } + + private static class get_delegation_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class renew_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -69651,6 +81186,12 @@ private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new renew_delegation_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new renew_delegation_token_argsTupleSchemeFactory()); + } + private String token_str_form; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -69712,7 +81253,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -69871,42 +81411,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TOKEN_STR_FORM - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.token_str_form = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.token_str_form != null) { - oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); - oprot.writeString(this.token_str_form); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -69927,6 +81436,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -69945,6 +81455,88 @@ } } + private static class renew_delegation_token_argsStandardSchemeFactory implements SchemeFactory { + public renew_delegation_token_argsStandardScheme getScheme() { + return new renew_delegation_token_argsStandardScheme(); + } + } + + private static class renew_delegation_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN_STR_FORM + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_str_form != null) { + oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); + oprot.writeString(struct.token_str_form); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class renew_delegation_token_argsTupleSchemeFactory implements SchemeFactory { + public renew_delegation_token_argsTupleScheme getScheme() { + return new renew_delegation_token_argsTupleScheme(); + } + } + + private static class renew_delegation_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_str_form()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken_str_form()) { + oprot.writeString(struct.token_str_form); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } + } + } + } public static class renew_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -69953,6 +81545,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new renew_delegation_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new renew_delegation_token_resultTupleSchemeFactory()); + } + private long success; // required private MetaException o1; // required @@ -70019,8 +81617,7 @@ // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -70049,8 +81646,7 @@ * Performs a deep copy on other. */ public renew_delegation_token_result(renew_delegation_token_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -70078,16 +81674,16 @@ } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -70248,55 +81844,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.I64) { - this.success = iprot.readI64(); - setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI64(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -70320,6 +81873,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -70332,12 +81886,121 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class renew_delegation_token_resultStandardSchemeFactory implements SchemeFactory { + public renew_delegation_token_resultStandardScheme getScheme() { + return new renew_delegation_token_resultStandardScheme(); + } + } + + private static class renew_delegation_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class renew_delegation_token_resultTupleSchemeFactory implements SchemeFactory { + public renew_delegation_token_resultTupleScheme getScheme() { + return new renew_delegation_token_resultTupleScheme(); + } + } + + private static class renew_delegation_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetO1()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } public static class cancel_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -70345,6 +82008,12 @@ private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancel_delegation_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancel_delegation_token_argsTupleSchemeFactory()); + } + private String token_str_form; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -70406,7 +82075,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -70565,42 +82233,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TOKEN_STR_FORM - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.token_str_form = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.token_str_form != null) { - oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); - oprot.writeString(this.token_str_form); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -70621,6 +82258,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -70639,6 +82277,88 @@ } } + private static class cancel_delegation_token_argsStandardSchemeFactory implements SchemeFactory { + public cancel_delegation_token_argsStandardScheme getScheme() { + return new cancel_delegation_token_argsStandardScheme(); + } + } + + private static class cancel_delegation_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TOKEN_STR_FORM + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_str_form != null) { + oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); + oprot.writeString(struct.token_str_form); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancel_delegation_token_argsTupleSchemeFactory implements SchemeFactory { + public cancel_delegation_token_argsTupleScheme getScheme() { + return new cancel_delegation_token_argsTupleScheme(); + } + } + + private static class cancel_delegation_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_str_form()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken_str_form()) { + oprot.writeString(struct.token_str_form); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token_str_form = iprot.readString(); + struct.setToken_str_formIsSet(true); + } + } + } + } public static class cancel_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -70646,6 +82366,12 @@ private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancel_delegation_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancel_delegation_token_resultTupleSchemeFactory()); + } + private MetaException o1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -70707,7 +82433,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -70866,43 +82591,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -70922,6 +82616,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -70940,6 +82635,90 @@ } } + private static class cancel_delegation_token_resultStandardSchemeFactory implements SchemeFactory { + public cancel_delegation_token_resultStandardScheme getScheme() { + return new cancel_delegation_token_resultStandardScheme(); + } + } + + private static class cancel_delegation_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // O1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.o1 != null) { + oprot.writeFieldBegin(O1_FIELD_DESC); + struct.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancel_delegation_token_resultTupleSchemeFactory implements SchemeFactory { + public cancel_delegation_token_resultTupleScheme getScheme() { + return new cancel_delegation_token_resultTupleScheme(); + } + } + + private static class cancel_delegation_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetO1()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + } } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField FIELD_SCHEMAS_FIELD_DESC = new org.apache.thrift.protocol.TField("fieldSchemas", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SchemaStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SchemaTupleSchemeFactory()); + } + private List fieldSchemas; // required private Map properties; // required @@ -92,7 +108,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -364,92 +379,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // FIELD_SCHEMAS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); - this.fieldSchemas = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) - { - FieldSchema _elem112; // required - _elem112 = new FieldSchema(); - _elem112.read(iprot); - this.fieldSchemas.add(_elem112); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PROPERTIES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map113 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map113.size); - for (int _i114 = 0; _i114 < _map113.size; ++_i114) - { - String _key115; // required - String _val116; // required - _key115 = iprot.readString(); - _val116 = iprot.readString(); - this.properties.put(_key115, _val116); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.fieldSchemas != null) { - oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter117 : this.fieldSchemas) - { - _iter117.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.properties != null) { - oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size())); - for (Map.Entry _iter118 : this.properties.entrySet()) - { - oprot.writeString(_iter118.getKey()); - oprot.writeString(_iter118.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -478,6 +412,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -496,5 +431,182 @@ } } + private static class SchemaStandardSchemeFactory implements SchemeFactory { + public SchemaStandardScheme getScheme() { + return new SchemaStandardScheme(); + } + } + + private static class SchemaStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Schema struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FIELD_SCHEMAS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); + struct.fieldSchemas = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) + { + FieldSchema _elem222; // required + _elem222 = new FieldSchema(); + _elem222.read(iprot); + struct.fieldSchemas.add(_elem222); + } + iprot.readListEnd(); + } + struct.setFieldSchemasIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PROPERTIES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map223 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map223.size); + for (int _i224 = 0; _i224 < _map223.size; ++_i224) + { + String _key225; // required + String _val226; // required + _key225 = iprot.readString(); + _val226 = iprot.readString(); + struct.properties.put(_key225, _val226); + } + iprot.readMapEnd(); + } + struct.setPropertiesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Schema struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fieldSchemas != null) { + oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fieldSchemas.size())); + for (FieldSchema _iter227 : struct.fieldSchemas) + { + _iter227.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.properties != null) { + oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size())); + for (Map.Entry _iter228 : struct.properties.entrySet()) + { + oprot.writeString(_iter228.getKey()); + oprot.writeString(_iter228.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SchemaTupleSchemeFactory implements SchemeFactory { + public SchemaTupleScheme getScheme() { + return new SchemaTupleScheme(); + } + } + + private static class SchemaTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Schema struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFieldSchemas()) { + optionals.set(0); + } + if (struct.isSetProperties()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetFieldSchemas()) { + { + oprot.writeI32(struct.fieldSchemas.size()); + for (FieldSchema _iter229 : struct.fieldSchemas) + { + _iter229.write(oprot); + } + } + } + if (struct.isSetProperties()) { + { + oprot.writeI32(struct.properties.size()); + for (Map.Entry _iter230 : struct.properties.entrySet()) + { + oprot.writeString(_iter230.getKey()); + oprot.writeString(_iter230.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Schema struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fieldSchemas = new ArrayList(_list231.size); + for (int _i232 = 0; _i232 < _list231.size; ++_i232) + { + FieldSchema _elem233; // required + _elem233 = new FieldSchema(); + _elem233.read(iprot); + struct.fieldSchemas.add(_elem233); + } + } + struct.setFieldSchemasIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map234 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.properties = new HashMap(2*_map234.size); + for (int _i235 = 0; _i235 < _map234.size; ++_i235) + { + String _key236; // required + String _val237; // required + _key236 = iprot.readString(); + _val237 = iprot.readString(); + struct.properties.put(_key236, _val237); + } + } + struct.setPropertiesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -26,6 +36,12 @@ private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrivilegeBagStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrivilegeBagTupleSchemeFactory()); + } + private List privileges; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -266,60 +281,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - this.privileges = new ArrayList(_list8.size); - for (int _i9 = 0; _i9 < _list8.size; ++_i9) - { - HiveObjectPrivilege _elem10; // required - _elem10 = new HiveObjectPrivilege(); - _elem10.read(iprot); - this.privileges.add(_elem10); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.privileges.size())); - for (HiveObjectPrivilege _iter11 : this.privileges) - { - _iter11.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -340,6 +306,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -358,5 +325,121 @@ } } + private static class PrivilegeBagStandardSchemeFactory implements SchemeFactory { + public PrivilegeBagStandardScheme getScheme() { + return new PrivilegeBagStandardScheme(); + } + } + + private static class PrivilegeBagStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrivilegeBag struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); + struct.privileges = new ArrayList(_list16.size); + for (int _i17 = 0; _i17 < _list16.size; ++_i17) + { + HiveObjectPrivilege _elem18; // required + _elem18 = new HiveObjectPrivilege(); + _elem18.read(iprot); + struct.privileges.add(_elem18); + } + iprot.readListEnd(); + } + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, PrivilegeBag struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.privileges.size())); + for (HiveObjectPrivilege _iter19 : struct.privileges) + { + _iter19.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrivilegeBagTupleSchemeFactory implements SchemeFactory { + public PrivilegeBagTupleScheme getScheme() { + return new PrivilegeBagTupleScheme(); + } + } + + private static class PrivilegeBagTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivileges()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPrivileges()) { + { + oprot.writeI32(struct.privileges.size()); + for (HiveObjectPrivilege _iter20 : struct.privileges) + { + _iter20.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrivilegeBag struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.privileges = new ArrayList(_list21.size); + for (int _i22 = 0; _i22 < _list21.size; ++_i22) + { + HiveObjectPrivilege _elem23; // required + _elem23 = new HiveObjectPrivilege(); + _elem23.read(iprot); + struct.privileges.add(_elem23); + } + } + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class AlreadyExistsException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class AlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExistsException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AlreadyExistsExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AlreadyExistsExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class AlreadyExistsExceptionStandardSchemeFactory implements SchemeFactory { + public AlreadyExistsExceptionStandardScheme getScheme() { + return new AlreadyExistsExceptionStandardScheme(); + } + } + + private static class AlreadyExistsExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AlreadyExistsException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AlreadyExistsException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AlreadyExistsExceptionTupleSchemeFactory implements SchemeFactory { + public AlreadyExistsExceptionTupleScheme getScheme() { + return new AlreadyExistsExceptionTupleScheme(); + } + } + + private static class AlreadyExistsExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField GROUP_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("groupPrivileges", org.apache.thrift.protocol.TType.MAP, (short)2); private static final org.apache.thrift.protocol.TField ROLE_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("rolePrivileges", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrincipalPrivilegeSetStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrincipalPrivilegeSetTupleSchemeFactory()); + } + private Map> userPrivileges; // required private Map> groupPrivileges; // required private Map> rolePrivileges; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -479,231 +494,407 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // USER_PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); - this.userPrivileges = new HashMap>(2*_map12.size); - for (int _i13 = 0; _i13 < _map12.size; ++_i13) + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrincipalPrivilegeSet("); + boolean first = true; + + sb.append("userPrivileges:"); + if (this.userPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.userPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("groupPrivileges:"); + if (this.groupPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.groupPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("rolePrivileges:"); + if (this.rolePrivileges == null) { + sb.append("null"); + } else { + sb.append(this.rolePrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class PrincipalPrivilegeSetStandardSchemeFactory implements SchemeFactory { + public PrincipalPrivilegeSetStandardScheme getScheme() { + return new PrincipalPrivilegeSetStandardScheme(); + } + } + + private static class PrincipalPrivilegeSetStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - String _key14; // required - List _val15; // required - _key14 = iprot.readString(); + org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); + struct.userPrivileges = new HashMap>(2*_map24.size); + for (int _i25 = 0; _i25 < _map24.size; ++_i25) { - org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); - _val15 = new ArrayList(_list16.size); - for (int _i17 = 0; _i17 < _list16.size; ++_i17) + String _key26; // required + List _val27; // required + _key26 = iprot.readString(); { - PrivilegeGrantInfo _elem18; // required - _elem18 = new PrivilegeGrantInfo(); - _elem18.read(iprot); - _val15.add(_elem18); + org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); + _val27 = new ArrayList(_list28.size); + for (int _i29 = 0; _i29 < _list28.size; ++_i29) + { + PrivilegeGrantInfo _elem30; // required + _elem30 = new PrivilegeGrantInfo(); + _elem30.read(iprot); + _val27.add(_elem30); + } + iprot.readListEnd(); } - iprot.readListEnd(); + struct.userPrivileges.put(_key26, _val27); } - this.userPrivileges.put(_key14, _val15); + iprot.readMapEnd(); } - iprot.readMapEnd(); + struct.setUserPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // GROUP_PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map19 = iprot.readMapBegin(); - this.groupPrivileges = new HashMap>(2*_map19.size); - for (int _i20 = 0; _i20 < _map19.size; ++_i20) + break; + case 2: // GROUP_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - String _key21; // required - List _val22; // required - _key21 = iprot.readString(); + org.apache.thrift.protocol.TMap _map31 = iprot.readMapBegin(); + struct.groupPrivileges = new HashMap>(2*_map31.size); + for (int _i32 = 0; _i32 < _map31.size; ++_i32) { - org.apache.thrift.protocol.TList _list23 = iprot.readListBegin(); - _val22 = new ArrayList(_list23.size); - for (int _i24 = 0; _i24 < _list23.size; ++_i24) + String _key33; // required + List _val34; // required + _key33 = iprot.readString(); { - PrivilegeGrantInfo _elem25; // required - _elem25 = new PrivilegeGrantInfo(); - _elem25.read(iprot); - _val22.add(_elem25); + org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); + _val34 = new ArrayList(_list35.size); + for (int _i36 = 0; _i36 < _list35.size; ++_i36) + { + PrivilegeGrantInfo _elem37; // required + _elem37 = new PrivilegeGrantInfo(); + _elem37.read(iprot); + _val34.add(_elem37); + } + iprot.readListEnd(); } - iprot.readListEnd(); + struct.groupPrivileges.put(_key33, _val34); } - this.groupPrivileges.put(_key21, _val22); + iprot.readMapEnd(); } - iprot.readMapEnd(); + struct.setGroupPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // ROLE_PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin(); - this.rolePrivileges = new HashMap>(2*_map26.size); - for (int _i27 = 0; _i27 < _map26.size; ++_i27) + break; + case 3: // ROLE_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - String _key28; // required - List _val29; // required - _key28 = iprot.readString(); + org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin(); + struct.rolePrivileges = new HashMap>(2*_map38.size); + for (int _i39 = 0; _i39 < _map38.size; ++_i39) { - org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); - _val29 = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) + String _key40; // required + List _val41; // required + _key40 = iprot.readString(); { - PrivilegeGrantInfo _elem32; // required - _elem32 = new PrivilegeGrantInfo(); - _elem32.read(iprot); - _val29.add(_elem32); + org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); + _val41 = new ArrayList(_list42.size); + for (int _i43 = 0; _i43 < _list42.size; ++_i43) + { + PrivilegeGrantInfo _elem44; // required + _elem44 = new PrivilegeGrantInfo(); + _elem44.read(iprot); + _val41.add(_elem44); + } + iprot.readListEnd(); } - iprot.readListEnd(); + struct.rolePrivileges.put(_key40, _val41); } - this.rolePrivileges.put(_key28, _val29); + iprot.readMapEnd(); } - iprot.readMapEnd(); + struct.setRolePrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); } - iprot.readFieldEnd(); + iprot.readStructEnd(); + struct.validate(); } - iprot.readStructEnd(); - validate(); - } - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); + public void write(org.apache.thrift.protocol.TProtocol oprot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + struct.validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.userPrivileges != null) { - oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.userPrivileges.size())); - for (Map.Entry> _iter33 : this.userPrivileges.entrySet()) + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userPrivileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); { - oprot.writeString(_iter33.getKey()); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.userPrivileges.size())); + for (Map.Entry> _iter45 : struct.userPrivileges.entrySet()) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter33.getValue().size())); - for (PrivilegeGrantInfo _iter34 : _iter33.getValue()) + oprot.writeString(_iter45.getKey()); { - _iter34.write(oprot); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter45.getValue().size())); + for (PrivilegeGrantInfo _iter46 : _iter45.getValue()) + { + _iter46.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeMapEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); - } - if (this.groupPrivileges != null) { - oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.groupPrivileges.size())); - for (Map.Entry> _iter35 : this.groupPrivileges.entrySet()) + if (struct.groupPrivileges != null) { + oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); { - oprot.writeString(_iter35.getKey()); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.groupPrivileges.size())); + for (Map.Entry> _iter47 : struct.groupPrivileges.entrySet()) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter35.getValue().size())); - for (PrivilegeGrantInfo _iter36 : _iter35.getValue()) + oprot.writeString(_iter47.getKey()); { - _iter36.write(oprot); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter47.getValue().size())); + for (PrivilegeGrantInfo _iter48 : _iter47.getValue()) + { + _iter48.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeMapEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); - } - if (this.rolePrivileges != null) { - oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.rolePrivileges.size())); - for (Map.Entry> _iter37 : this.rolePrivileges.entrySet()) + if (struct.rolePrivileges != null) { + oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); { - oprot.writeString(_iter37.getKey()); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.rolePrivileges.size())); + for (Map.Entry> _iter49 : struct.rolePrivileges.entrySet()) { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter37.getValue().size())); - for (PrivilegeGrantInfo _iter38 : _iter37.getValue()) + oprot.writeString(_iter49.getKey()); { - _iter38.write(oprot); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter49.getValue().size())); + for (PrivilegeGrantInfo _iter50 : _iter49.getValue()) + { + _iter50.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeMapEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("PrincipalPrivilegeSet("); - boolean first = true; - - sb.append("userPrivileges:"); - if (this.userPrivileges == null) { - sb.append("null"); - } else { - sb.append(this.userPrivileges); + private static class PrincipalPrivilegeSetTupleSchemeFactory implements SchemeFactory { + public PrincipalPrivilegeSetTupleScheme getScheme() { + return new PrincipalPrivilegeSetTupleScheme(); } - first = false; - if (!first) sb.append(", "); - sb.append("groupPrivileges:"); - if (this.groupPrivileges == null) { - sb.append("null"); - } else { - sb.append(this.groupPrivileges); - } - first = false; - if (!first) sb.append(", "); - sb.append("rolePrivileges:"); - if (this.rolePrivileges == null) { - sb.append("null"); - } else { - sb.append(this.rolePrivileges); - } - first = false; - sb.append(")"); - return sb.toString(); } - public void validate() throws org.apache.thrift.TException { - // check for required fields - } + private static class PrincipalPrivilegeSetTupleScheme extends TupleScheme { - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserPrivileges()) { + optionals.set(0); + } + if (struct.isSetGroupPrivileges()) { + optionals.set(1); + } + if (struct.isSetRolePrivileges()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserPrivileges()) { + { + oprot.writeI32(struct.userPrivileges.size()); + for (Map.Entry> _iter51 : struct.userPrivileges.entrySet()) + { + oprot.writeString(_iter51.getKey()); + { + oprot.writeI32(_iter51.getValue().size()); + for (PrivilegeGrantInfo _iter52 : _iter51.getValue()) + { + _iter52.write(oprot); + } + } + } + } + } + if (struct.isSetGroupPrivileges()) { + { + oprot.writeI32(struct.groupPrivileges.size()); + for (Map.Entry> _iter53 : struct.groupPrivileges.entrySet()) + { + oprot.writeString(_iter53.getKey()); + { + oprot.writeI32(_iter53.getValue().size()); + for (PrivilegeGrantInfo _iter54 : _iter53.getValue()) + { + _iter54.write(oprot); + } + } + } + } + } + if (struct.isSetRolePrivileges()) { + { + oprot.writeI32(struct.rolePrivileges.size()); + for (Map.Entry> _iter55 : struct.rolePrivileges.entrySet()) + { + oprot.writeString(_iter55.getKey()); + { + oprot.writeI32(_iter55.getValue().size()); + for (PrivilegeGrantInfo _iter56 : _iter55.getValue()) + { + _iter56.write(oprot); + } + } + } + } + } } - } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map57 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.userPrivileges = new HashMap>(2*_map57.size); + for (int _i58 = 0; _i58 < _map57.size; ++_i58) + { + String _key59; // required + List _val60; // required + _key59 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val60 = new ArrayList(_list61.size); + for (int _i62 = 0; _i62 < _list61.size; ++_i62) + { + PrivilegeGrantInfo _elem63; // required + _elem63 = new PrivilegeGrantInfo(); + _elem63.read(iprot); + _val60.add(_elem63); + } + } + struct.userPrivileges.put(_key59, _val60); + } + } + struct.setUserPrivilegesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map64 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.groupPrivileges = new HashMap>(2*_map64.size); + for (int _i65 = 0; _i65 < _map64.size; ++_i65) + { + String _key66; // required + List _val67; // required + _key66 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val67 = new ArrayList(_list68.size); + for (int _i69 = 0; _i69 < _list68.size; ++_i69) + { + PrivilegeGrantInfo _elem70; // required + _elem70 = new PrivilegeGrantInfo(); + _elem70.read(iprot); + _val67.add(_elem70); + } + } + struct.groupPrivileges.put(_key66, _val67); + } + } + struct.setGroupPrivilegesIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map71 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.rolePrivileges = new HashMap>(2*_map71.size); + for (int _i72 = 0; _i72 < _map71.size; ++_i72) + { + String _key73; // required + List _val74; // required + _key73 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val74 = new ArrayList(_list75.size); + for (int _i76 = 0; _i76 < _list75.size; ++_i76) + { + PrivilegeGrantInfo _elem77; // required + _elem77 = new PrivilegeGrantInfo(); + _elem77.read(iprot); + _val74.add(_elem77); + } + } + struct.rolePrivileges.put(_key73, _val74); + } + } + struct.setRolePrivilegesIsSet(true); + } } } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new FieldSchemaStandardSchemeFactory()); + schemes.put(TupleScheme.class, new FieldSchemaTupleSchemeFactory()); + } + private String name; // required private String type; // required private String comment; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -392,66 +407,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // COMMENT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.comment = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); - oprot.writeFieldEnd(); - } - if (this.comment != null) { - oprot.writeFieldBegin(COMMENT_FIELD_DESC); - oprot.writeString(this.comment); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -488,6 +448,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -506,5 +467,133 @@ } } + private static class FieldSchemaStandardSchemeFactory implements SchemeFactory { + public FieldSchemaStandardScheme getScheme() { + return new FieldSchemaStandardScheme(); + } + } + + private static class FieldSchemaStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, FieldSchema struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COMMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, FieldSchema struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(struct.type); + oprot.writeFieldEnd(); + } + if (struct.comment != null) { + oprot.writeFieldBegin(COMMENT_FIELD_DESC); + oprot.writeString(struct.comment); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class FieldSchemaTupleSchemeFactory implements SchemeFactory { + public FieldSchemaTupleScheme getScheme() { + return new FieldSchemaTupleScheme(); + } + } + + private static class FieldSchemaTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, FieldSchema struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetType()) { + optionals.set(1); + } + if (struct.isSetComment()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetType()) { + oprot.writeString(struct.type); + } + if (struct.isSetComment()) { + oprot.writeString(struct.comment); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, FieldSchema struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.type = iprot.readString(); + struct.setTypeIsSet(true); + } + if (incoming.get(2)) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class MetaException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class MetaException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MetaException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MetaExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MetaExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class MetaExceptionStandardSchemeFactory implements SchemeFactory { + public MetaExceptionStandardScheme getScheme() { + return new MetaExceptionStandardScheme(); + } + } + + private static class MetaExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MetaException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, MetaException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MetaExceptionTupleSchemeFactory implements SchemeFactory { + public MetaExceptionTupleScheme getScheme() { + return new MetaExceptionTupleScheme(); + } + } + + private static class MetaExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MetaException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MetaException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class NoSuchObjectException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class NoSuchObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchObjectException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NoSuchObjectExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NoSuchObjectExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class NoSuchObjectExceptionStandardSchemeFactory implements SchemeFactory { + public NoSuchObjectExceptionStandardScheme getScheme() { + return new NoSuchObjectExceptionStandardScheme(); + } + } + + private static class NoSuchObjectExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchObjectException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, NoSuchObjectException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NoSuchObjectExceptionTupleSchemeFactory implements SchemeFactory { + public NoSuchObjectExceptionTupleScheme getScheme() { + return new NoSuchObjectExceptionTupleScheme(); + } + } + + private static class NoSuchObjectExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -33,6 +43,12 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)7); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)8); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionTupleSchemeFactory()); + } + private List values; // required private String dbName; // required private String tableName; // required @@ -40,7 +56,7 @@ private int lastAccessTime; // required private StorageDescriptor sd; // required private Map parameters; // required - private PrincipalPrivilegeSet privileges; // required + private PrincipalPrivilegeSet privileges; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -124,8 +140,8 @@ // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; private static final int __LASTACCESSTIME_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PRIVILEGES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -180,8 +196,7 @@ * Performs a deep copy on other. */ public Partition(Partition other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetValues()) { List __this__values = new ArrayList(); for (String other_element : other.values) { @@ -332,16 +347,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -354,16 +369,16 @@ } public void unsetLastAccessTime() { - __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } public void setLastAccessTimeIsSet(boolean value) { - __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); } public StorageDescriptor getSd() { @@ -803,165 +818,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // VALUES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list96 = iprot.readListBegin(); - this.values = new ArrayList(_list96.size); - for (int _i97 = 0; _i97 < _list96.size; ++_i97) - { - String _elem98; // required - _elem98 = iprot.readString(); - this.values.add(_elem98); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LAST_ACCESS_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.lastAccessTime = iprot.readI32(); - setLastAccessTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // SD - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map99 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map99.size); - for (int _i100 = 0; _i100 < _map99.size; ++_i100) - { - String _key101; // required - String _val102; // required - _key101 = iprot.readString(); - _val102 = iprot.readString(); - this.parameters.put(_key101, _val102); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrincipalPrivilegeSet(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.values != null) { - oprot.writeFieldBegin(VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.values.size())); - for (String _iter103 : this.values) - { - oprot.writeString(_iter103); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter104 : this.parameters.entrySet()) - { - oprot.writeString(_iter104.getKey()); - oprot.writeString(_iter104.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.privileges != null) { - if (isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1032,6 +893,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (sd != null) { + sd.validate(); + } + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1045,12 +913,327 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class PartitionStandardSchemeFactory implements SchemeFactory { + public PartitionStandardScheme getScheme() { + return new PartitionStandardScheme(); + } + } + + private static class PartitionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Partition struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list192 = iprot.readListBegin(); + struct.values = new ArrayList(_list192.size); + for (int _i193 = 0; _i193 < _list192.size; ++_i193) + { + String _elem194; // required + _elem194 = iprot.readString(); + struct.values.add(_elem194); + } + iprot.readListEnd(); + } + struct.setValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LAST_ACCESS_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SD + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map195 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map195.size); + for (int _i196 = 0; _i196 < _map195.size; ++_i196) + { + String _key197; // required + String _val198; // required + _key197 = iprot.readString(); + _val198 = iprot.readString(); + struct.parameters.put(_key197, _val198); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Partition struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); + for (String _iter199 : struct.values) + { + oprot.writeString(_iter199); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(struct.lastAccessTime); + oprot.writeFieldEnd(); + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter200 : struct.parameters.entrySet()) + { + oprot.writeString(_iter200.getKey()); + oprot.writeString(_iter200.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionTupleSchemeFactory implements SchemeFactory { + public PartitionTupleScheme getScheme() { + return new PartitionTupleScheme(); + } + } + + private static class PartitionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Partition struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetValues()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetTableName()) { + optionals.set(2); + } + if (struct.isSetCreateTime()) { + optionals.set(3); + } + if (struct.isSetLastAccessTime()) { + optionals.set(4); + } + if (struct.isSetSd()) { + optionals.set(5); + } + if (struct.isSetParameters()) { + optionals.set(6); + } + if (struct.isSetPrivileges()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetValues()) { + { + oprot.writeI32(struct.values.size()); + for (String _iter201 : struct.values) + { + oprot.writeString(_iter201); + } + } + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter202 : struct.parameters.entrySet()) + { + oprot.writeString(_iter202.getKey()); + oprot.writeString(_iter202.getValue()); + } + } + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Partition struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.values = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) + { + String _elem205; // required + _elem205 = iprot.readString(); + struct.values.add(_elem205); + } + } + struct.setValuesIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(3)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(4)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(5)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + if (incoming.get(6)) { + { + org.apache.thrift.protocol.TMap _map206 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map206.size); + for (int _i207 = 0; _i207 < _map206.size; ++_i207) + { + String _key208; // required + String _val209; // required + _key208 = iprot.readString(); + _val209 = iprot.readString(); + struct.parameters.put(_key208, _val209); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(7)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java (revision 0) @@ -0,0 +1,74 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class hive_metastoreConstants { + + public static final String DDL_TIME = "transient_lastDdlTime"; + + public static final String HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__"; + + public static final String HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__"; + + public static final String HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__"; + + public static final String IS_ARCHIVED = "is_archived"; + + public static final String ORIGINAL_LOCATION = "original_location"; + + public static final String META_TABLE_COLUMNS = "columns"; + + public static final String META_TABLE_COLUMN_TYPES = "columns.types"; + + public static final String BUCKET_FIELD_NAME = "bucket_field_name"; + + public static final String BUCKET_COUNT = "bucket_count"; + + public static final String FIELD_TO_DIMENSION = "field_to_dimension"; + + public static final String META_TABLE_NAME = "name"; + + public static final String META_TABLE_DB = "db"; + + public static final String META_TABLE_LOCATION = "location"; + + public static final String META_TABLE_SERDE = "serde"; + + public static final String META_TABLE_PARTITION_COLUMNS = "partition_columns"; + + public static final String FILE_INPUT_FORMAT = "file.inputformat"; + + public static final String FILE_OUTPUT_FORMAT = "file.outputformat"; + + public static final String META_TABLE_STORAGE = "storage_handler"; + +} Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField SERIALIZATION_LIB_FIELD_DESC = new org.apache.thrift.protocol.TField("serializationLib", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SerDeInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SerDeInfoTupleSchemeFactory()); + } + private String name; // required private String serializationLib; // required private Map parameters; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -417,86 +432,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // SERIALIZATION_LIB - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.serializationLib = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map44.size); - for (int _i45 = 0; _i45 < _map44.size; ++_i45) - { - String _key46; // required - String _val47; // required - _key46 = iprot.readString(); - _val47 = iprot.readString(); - this.parameters.put(_key46, _val47); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.serializationLib != null) { - oprot.writeFieldBegin(SERIALIZATION_LIB_FIELD_DESC); - oprot.writeString(this.serializationLib); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter48 : this.parameters.entrySet()) - { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -533,6 +473,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -551,5 +492,171 @@ } } + private static class SerDeInfoStandardSchemeFactory implements SchemeFactory { + public SerDeInfoStandardScheme getScheme() { + return new SerDeInfoStandardScheme(); + } + } + + private static class SerDeInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SerDeInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SERIALIZATION_LIB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.serializationLib = iprot.readString(); + struct.setSerializationLibIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map88 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map88.size); + for (int _i89 = 0; _i89 < _map88.size; ++_i89) + { + String _key90; // required + String _val91; // required + _key90 = iprot.readString(); + _val91 = iprot.readString(); + struct.parameters.put(_key90, _val91); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, SerDeInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.serializationLib != null) { + oprot.writeFieldBegin(SERIALIZATION_LIB_FIELD_DESC); + oprot.writeString(struct.serializationLib); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter92 : struct.parameters.entrySet()) + { + oprot.writeString(_iter92.getKey()); + oprot.writeString(_iter92.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SerDeInfoTupleSchemeFactory implements SchemeFactory { + public SerDeInfoTupleScheme getScheme() { + return new SerDeInfoTupleScheme(); + } + } + + private static class SerDeInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SerDeInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetSerializationLib()) { + optionals.set(1); + } + if (struct.isSetParameters()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetSerializationLib()) { + oprot.writeString(struct.serializationLib); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter93 : struct.parameters.entrySet()) + { + oprot.writeString(_iter93.getKey()); + oprot.writeString(_iter93.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SerDeInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.serializationLib = iprot.readString(); + struct.setSerializationLibIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map94 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map94.size); + for (int _i95 = 0; _i95 < _map94.size; ++_i95) + { + String _key96; // required + String _val97; // required + _key96 = iprot.readString(); + _val97 = iprot.readString(); + struct.parameters.put(_key96, _val97); + } + } + struct.setParametersIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ConfigValSecurityException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class ConfigValSecurityException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConfigValSecurityException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ConfigValSecurityExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ConfigValSecurityExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class ConfigValSecurityExceptionStandardSchemeFactory implements SchemeFactory { + public ConfigValSecurityExceptionStandardScheme getScheme() { + return new ConfigValSecurityExceptionStandardScheme(); + } + } + + private static class ConfigValSecurityExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ConfigValSecurityExceptionTupleSchemeFactory implements SchemeFactory { + public ConfigValSecurityExceptionTupleScheme getScheme() { + return new ConfigValSecurityExceptionTupleScheme(); + } + } + + private static class ConfigValSecurityExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ConfigValSecurityException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,6 +40,12 @@ private static final org.apache.thrift.protocol.TField PART_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("partValues", org.apache.thrift.protocol.TType.LIST, (short)4); private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveObjectRefStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveObjectRefTupleSchemeFactory()); + } + private HiveObjectType objectType; // required private String dbName; // required private String objectName; // required @@ -111,7 +127,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -570,107 +585,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // OBJECT_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.objectType = HiveObjectType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OBJECT_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.objectName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // PART_VALUES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - this.partValues = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; // required - _elem6 = iprot.readString(); - this.partValues.add(_elem6); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // COLUMN_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.columnName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.objectType != null) { - oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC); - oprot.writeI32(this.objectType.getValue()); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.objectName != null) { - oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); - oprot.writeString(this.objectName); - oprot.writeFieldEnd(); - } - if (this.partValues != null) { - oprot.writeFieldBegin(PART_VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.partValues.size())); - for (String _iter7 : this.partValues) - { - oprot.writeString(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.columnName != null) { - oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); - oprot.writeString(this.columnName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -723,6 +642,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -741,5 +661,211 @@ } } + private static class HiveObjectRefStandardSchemeFactory implements SchemeFactory { + public HiveObjectRefStandardScheme getScheme() { + return new HiveObjectRefStandardScheme(); + } + } + + private static class HiveObjectRefStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveObjectRef struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // OBJECT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.objectType = HiveObjectType.findByValue(iprot.readI32()); + struct.setObjectTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OBJECT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.objectName = iprot.readString(); + struct.setObjectNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PART_VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.partValues = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + String _elem10; // required + _elem10 = iprot.readString(); + struct.partValues.add(_elem10); + } + iprot.readListEnd(); + } + struct.setPartValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.columnName = iprot.readString(); + struct.setColumnNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveObjectRef struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.objectType != null) { + oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC); + oprot.writeI32(struct.objectType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.objectName != null) { + oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); + oprot.writeString(struct.objectName); + oprot.writeFieldEnd(); + } + if (struct.partValues != null) { + oprot.writeFieldBegin(PART_VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partValues.size())); + for (String _iter11 : struct.partValues) + { + oprot.writeString(_iter11); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.columnName != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.columnName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveObjectRefTupleSchemeFactory implements SchemeFactory { + public HiveObjectRefTupleScheme getScheme() { + return new HiveObjectRefTupleScheme(); + } + } + + private static class HiveObjectRefTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetObjectType()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetObjectName()) { + optionals.set(2); + } + if (struct.isSetPartValues()) { + optionals.set(3); + } + if (struct.isSetColumnName()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetObjectType()) { + oprot.writeI32(struct.objectType.getValue()); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetObjectName()) { + oprot.writeString(struct.objectName); + } + if (struct.isSetPartValues()) { + { + oprot.writeI32(struct.partValues.size()); + for (String _iter12 : struct.partValues) + { + oprot.writeString(_iter12); + } + } + } + if (struct.isSetColumnName()) { + oprot.writeString(struct.columnName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.objectType = HiveObjectType.findByValue(iprot.readI32()); + struct.setObjectTypeIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.objectName = iprot.readString(); + struct.setObjectNameIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partValues = new ArrayList(_list13.size); + for (int _i14 = 0; _i14 < _list13.size; ++_i14) + { + String _elem15; // required + _elem15 = iprot.readString(); + struct.partValues.add(_elem15); + } + } + struct.setPartValuesIsSet(true); + } + if (incoming.get(4)) { + struct.columnName = iprot.readString(); + struct.setColumnNameIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("comments", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new VersionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new VersionTupleSchemeFactory()); + } + private String version; // required private String comments; // required @@ -92,7 +108,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -319,54 +334,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // VERSION - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.version = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // COMMENTS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.comments = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeString(this.version); - oprot.writeFieldEnd(); - } - if (this.comments != null) { - oprot.writeFieldBegin(COMMENTS_FIELD_DESC); - oprot.writeString(this.comments); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -395,6 +367,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -413,5 +386,110 @@ } } + private static class VersionStandardSchemeFactory implements SchemeFactory { + public VersionStandardScheme getScheme() { + return new VersionStandardScheme(); + } + } + + private static class VersionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Version struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COMMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.comments = iprot.readString(); + struct.setCommentsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Version struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeString(struct.version); + oprot.writeFieldEnd(); + } + if (struct.comments != null) { + oprot.writeFieldBegin(COMMENTS_FIELD_DESC); + oprot.writeString(struct.comments); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class VersionTupleSchemeFactory implements SchemeFactory { + public VersionTupleScheme getScheme() { + return new VersionTupleScheme(); + } + } + + private static class VersionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Version struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetVersion()) { + optionals.set(0); + } + if (struct.isSetComments()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetVersion()) { + oprot.writeString(struct.version); + } + if (struct.isSetComments()) { + oprot.writeString(struct.comments); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Version struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.version = iprot.readString(); + struct.setVersionIsSet(true); + } + if (incoming.get(1)) { + struct.comments = iprot.readString(); + struct.setCommentsIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidOperationException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidOperationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperationException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidOperationExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidOperationExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidOperationExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidOperationExceptionStandardScheme getScheme() { + return new InvalidOperationExceptionStandardScheme(); + } + } + + private static class InvalidOperationExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidOperationException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidOperationException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidOperationExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidOperationExceptionTupleScheme getScheme() { + return new InvalidOperationExceptionTupleScheme(); + } + } + + private static class InvalidOperationExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidOperationException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidOperationException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -38,6 +48,12 @@ private static final org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)12); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)13); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TableStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TableTupleSchemeFactory()); + } + private String tableName; // required private String dbName; // required private String owner; // required @@ -50,7 +66,7 @@ private String viewOriginalText; // required private String viewExpandedText; // required private String tableType; // required - private PrincipalPrivilegeSet privileges; // required + private PrincipalPrivilegeSet privileges; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -150,8 +166,8 @@ private static final int __CREATETIME_ISSET_ID = 0; private static final int __LASTACCESSTIME_ISSET_ID = 1; private static final int __RETENTION_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PRIVILEGES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -227,8 +243,7 @@ * Performs a deep copy on other. */ public Table(Table other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetTableName()) { this.tableName = other.tableName; } @@ -383,16 +398,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -405,16 +420,16 @@ } public void unsetLastAccessTime() { - __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } public void setLastAccessTimeIsSet(boolean value) { - __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); } public int getRetention() { @@ -427,16 +442,16 @@ } public void unsetRetention() { - __isset_bit_vector.clear(__RETENTION_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETENTION_ISSET_ID); } /** Returns true if field retention is set (has been assigned a value) and false otherwise */ public boolean isSetRetention() { - return __isset_bit_vector.get(__RETENTION_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __RETENTION_ISSET_ID); } public void setRetentionIsSet(boolean value) { - __isset_bit_vector.set(__RETENTION_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETENTION_ISSET_ID, value); } public StorageDescriptor getSd() { @@ -1168,225 +1183,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OWNER - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.owner = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LAST_ACCESS_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.lastAccessTime = iprot.readI32(); - setLastAccessTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // RETENTION - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.retention = iprot.readI32(); - setRetentionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // SD - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // PARTITION_KEYS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(); - this.partitionKeys = new ArrayList(_list87.size); - for (int _i88 = 0; _i88 < _list87.size; ++_i88) - { - FieldSchema _elem89; // required - _elem89 = new FieldSchema(); - _elem89.read(iprot); - this.partitionKeys.add(_elem89); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map90.size); - for (int _i91 = 0; _i91 < _map90.size; ++_i91) - { - String _key92; // required - String _val93; // required - _key92 = iprot.readString(); - _val93 = iprot.readString(); - this.parameters.put(_key92, _val93); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // VIEW_ORIGINAL_TEXT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.viewOriginalText = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 11: // VIEW_EXPANDED_TEXT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.viewExpandedText = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 12: // TABLE_TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.tableType = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 13: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrincipalPrivilegeSet(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.tableName != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.tableName); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.owner != null) { - oprot.writeFieldBegin(OWNER_FIELD_DESC); - oprot.writeString(this.owner); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RETENTION_FIELD_DESC); - oprot.writeI32(this.retention); - oprot.writeFieldEnd(); - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.partitionKeys != null) { - oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.partitionKeys.size())); - for (FieldSchema _iter94 : this.partitionKeys) - { - _iter94.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter95 : this.parameters.entrySet()) - { - oprot.writeString(_iter95.getKey()); - oprot.writeString(_iter95.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.viewOriginalText != null) { - oprot.writeFieldBegin(VIEW_ORIGINAL_TEXT_FIELD_DESC); - oprot.writeString(this.viewOriginalText); - oprot.writeFieldEnd(); - } - if (this.viewExpandedText != null) { - oprot.writeFieldBegin(VIEW_EXPANDED_TEXT_FIELD_DESC); - oprot.writeString(this.viewExpandedText); - oprot.writeFieldEnd(); - } - if (this.tableType != null) { - oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); - oprot.writeString(this.tableType); - oprot.writeFieldEnd(); - } - if (this.privileges != null) { - if (isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1493,6 +1294,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (sd != null) { + sd.validate(); + } + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1506,12 +1314,442 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class TableStandardSchemeFactory implements SchemeFactory { + public TableStandardScheme getScheme() { + return new TableStandardScheme(); + } + } + + private static class TableStandardScheme extends StandardScheme
{ + + public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OWNER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LAST_ACCESS_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // RETENTION + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.retention = iprot.readI32(); + struct.setRetentionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SD + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // PARTITION_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list174 = iprot.readListBegin(); + struct.partitionKeys = new ArrayList(_list174.size); + for (int _i175 = 0; _i175 < _list174.size; ++_i175) + { + FieldSchema _elem176; // required + _elem176 = new FieldSchema(); + _elem176.read(iprot); + struct.partitionKeys.add(_elem176); + } + iprot.readListEnd(); + } + struct.setPartitionKeysIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map177 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map177.size); + for (int _i178 = 0; _i178 < _map177.size; ++_i178) + { + String _key179; // required + String _val180; // required + _key179 = iprot.readString(); + _val180 = iprot.readString(); + struct.parameters.put(_key179, _val180); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // VIEW_ORIGINAL_TEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.viewOriginalText = iprot.readString(); + struct.setViewOriginalTextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // VIEW_EXPANDED_TEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.viewExpandedText = iprot.readString(); + struct.setViewExpandedTextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // TABLE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableType = iprot.readString(); + struct.setTableTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Table struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.owner != null) { + oprot.writeFieldBegin(OWNER_FIELD_DESC); + oprot.writeString(struct.owner); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(struct.lastAccessTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RETENTION_FIELD_DESC); + oprot.writeI32(struct.retention); + oprot.writeFieldEnd(); + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.partitionKeys != null) { + oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitionKeys.size())); + for (FieldSchema _iter181 : struct.partitionKeys) + { + _iter181.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter182 : struct.parameters.entrySet()) + { + oprot.writeString(_iter182.getKey()); + oprot.writeString(_iter182.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.viewOriginalText != null) { + oprot.writeFieldBegin(VIEW_ORIGINAL_TEXT_FIELD_DESC); + oprot.writeString(struct.viewOriginalText); + oprot.writeFieldEnd(); + } + if (struct.viewExpandedText != null) { + oprot.writeFieldBegin(VIEW_EXPANDED_TEXT_FIELD_DESC); + oprot.writeString(struct.viewExpandedText); + oprot.writeFieldEnd(); + } + if (struct.tableType != null) { + oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); + oprot.writeString(struct.tableType); + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TableTupleSchemeFactory implements SchemeFactory { + public TableTupleScheme getScheme() { + return new TableTupleScheme(); + } + } + + private static class TableTupleScheme extends TupleScheme
{ + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Table struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetOwner()) { + optionals.set(2); + } + if (struct.isSetCreateTime()) { + optionals.set(3); + } + if (struct.isSetLastAccessTime()) { + optionals.set(4); + } + if (struct.isSetRetention()) { + optionals.set(5); + } + if (struct.isSetSd()) { + optionals.set(6); + } + if (struct.isSetPartitionKeys()) { + optionals.set(7); + } + if (struct.isSetParameters()) { + optionals.set(8); + } + if (struct.isSetViewOriginalText()) { + optionals.set(9); + } + if (struct.isSetViewExpandedText()) { + optionals.set(10); + } + if (struct.isSetTableType()) { + optionals.set(11); + } + if (struct.isSetPrivileges()) { + optionals.set(12); + } + oprot.writeBitSet(optionals, 13); + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetOwner()) { + oprot.writeString(struct.owner); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetRetention()) { + oprot.writeI32(struct.retention); + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + if (struct.isSetPartitionKeys()) { + { + oprot.writeI32(struct.partitionKeys.size()); + for (FieldSchema _iter183 : struct.partitionKeys) + { + _iter183.write(oprot); + } + } + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter184 : struct.parameters.entrySet()) + { + oprot.writeString(_iter184.getKey()); + oprot.writeString(_iter184.getValue()); + } + } + } + if (struct.isSetViewOriginalText()) { + oprot.writeString(struct.viewOriginalText); + } + if (struct.isSetViewExpandedText()) { + oprot.writeString(struct.viewExpandedText); + } + if (struct.isSetTableType()) { + oprot.writeString(struct.tableType); + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(13); + if (incoming.get(0)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + } + if (incoming.get(3)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(4)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(5)) { + struct.retention = iprot.readI32(); + struct.setRetentionIsSet(true); + } + if (incoming.get(6)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + if (incoming.get(7)) { + { + org.apache.thrift.protocol.TList _list185 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitionKeys = new ArrayList(_list185.size); + for (int _i186 = 0; _i186 < _list185.size; ++_i186) + { + FieldSchema _elem187; // required + _elem187 = new FieldSchema(); + _elem187.read(iprot); + struct.partitionKeys.add(_elem187); + } + } + struct.setPartitionKeysIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TMap _map188 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map188.size); + for (int _i189 = 0; _i189 < _map188.size; ++_i189) + { + String _key190; // required + String _val191; // required + _key190 = iprot.readString(); + _val191 = iprot.readString(); + struct.parameters.put(_key190, _val191); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(9)) { + struct.viewOriginalText = iprot.readString(); + struct.setViewOriginalTextIsSet(true); + } + if (incoming.get(10)) { + struct.viewExpandedText = iprot.readString(); + struct.setViewExpandedTextIsSet(true); + } + if (incoming.get(11)) { + struct.tableType = iprot.readString(); + struct.setTableTypeIsSet(true); + } + if (incoming.get(12)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class IndexAlreadyExistsException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class IndexAlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IndexAlreadyExistsException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IndexAlreadyExistsExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IndexAlreadyExistsExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class IndexAlreadyExistsExceptionStandardSchemeFactory implements SchemeFactory { + public IndexAlreadyExistsExceptionStandardScheme getScheme() { + return new IndexAlreadyExistsExceptionStandardScheme(); + } + } + + private static class IndexAlreadyExistsExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IndexAlreadyExistsExceptionTupleSchemeFactory implements SchemeFactory { + public IndexAlreadyExistsExceptionTupleScheme getScheme() { + return new IndexAlreadyExistsExceptionTupleScheme(); + } + } + + private static class IndexAlreadyExistsExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,6 +39,12 @@ private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principalType", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField GRANT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("grantInfo", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveObjectPrivilegeStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveObjectPrivilegeTupleSchemeFactory()); + } + private HiveObjectRef hiveObject; // required private String principalName; // required private PrincipalType principalType; // required @@ -106,7 +122,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -477,80 +492,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // HIVE_OBJECT - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.hiveObject = new HiveObjectRef(); - this.hiveObject.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // PRINCIPAL_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.principalName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PRINCIPAL_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.principalType = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // GRANT_INFO - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.grantInfo = new PrivilegeGrantInfo(); - this.grantInfo.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.hiveObject != null) { - oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); - this.hiveObject.write(oprot); - oprot.writeFieldEnd(); - } - if (this.principalName != null) { - oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); - oprot.writeString(this.principalName); - oprot.writeFieldEnd(); - } - if (this.principalType != null) { - oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(this.principalType.getValue()); - oprot.writeFieldEnd(); - } - if (this.grantInfo != null) { - oprot.writeFieldBegin(GRANT_INFO_FIELD_DESC); - this.grantInfo.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -595,6 +541,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (hiveObject != null) { + hiveObject.validate(); + } + if (grantInfo != null) { + grantInfo.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -613,5 +566,160 @@ } } + private static class HiveObjectPrivilegeStandardSchemeFactory implements SchemeFactory { + public HiveObjectPrivilegeStandardScheme getScheme() { + return new HiveObjectPrivilegeStandardScheme(); + } + } + + private static class HiveObjectPrivilegeStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // HIVE_OBJECT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRINCIPAL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.principalName = iprot.readString(); + struct.setPrincipalNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principalType = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GRANT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.grantInfo = new PrivilegeGrantInfo(); + struct.grantInfo.read(iprot); + struct.setGrantInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + struct.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(struct.principalName); + oprot.writeFieldEnd(); + } + if (struct.principalType != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.principalType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.grantInfo != null) { + oprot.writeFieldBegin(GRANT_INFO_FIELD_DESC); + struct.grantInfo.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveObjectPrivilegeTupleSchemeFactory implements SchemeFactory { + public HiveObjectPrivilegeTupleScheme getScheme() { + return new HiveObjectPrivilegeTupleScheme(); + } + } + + private static class HiveObjectPrivilegeTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetHiveObject()) { + optionals.set(0); + } + if (struct.isSetPrincipalName()) { + optionals.set(1); + } + if (struct.isSetPrincipalType()) { + optionals.set(2); + } + if (struct.isSetGrantInfo()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetHiveObject()) { + struct.hiveObject.write(oprot); + } + if (struct.isSetPrincipalName()) { + oprot.writeString(struct.principalName); + } + if (struct.isSetPrincipalType()) { + oprot.writeI32(struct.principalType.getValue()); + } + if (struct.isSetGrantInfo()) { + struct.grantInfo.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveObjectPrivilege struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.hiveObject = new HiveObjectRef(); + struct.hiveObject.read(iprot); + struct.setHiveObjectIsSet(true); + } + if (incoming.get(1)) { + struct.principalName = iprot.readString(); + struct.setPrincipalNameIsSet(true); + } + if (incoming.get(2)) { + struct.principalType = PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } + if (incoming.get(3)) { + struct.grantInfo = new PrivilegeGrantInfo(); + struct.grantInfo.read(iprot); + struct.setGrantInfoIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField SKEWED_COL_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColValues", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColValueLocationMaps", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SkewedInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SkewedInfoTupleSchemeFactory()); + } + private List skewedColNames; // required private List> skewedColValues; // required private Map,String> skewedColValueLocationMaps; // required @@ -97,7 +113,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -466,154 +481,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // SKEWED_COL_NAMES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(); - this.skewedColNames = new ArrayList(_list49.size); - for (int _i50 = 0; _i50 < _list49.size; ++_i50) - { - String _elem51; // required - _elem51 = iprot.readString(); - this.skewedColNames.add(_elem51); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // SKEWED_COL_VALUES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(); - this.skewedColValues = new ArrayList>(_list52.size); - for (int _i53 = 0; _i53 < _list52.size; ++_i53) - { - List _elem54; // required - { - org.apache.thrift.protocol.TList _list55 = iprot.readListBegin(); - _elem54 = new ArrayList(_list55.size); - for (int _i56 = 0; _i56 < _list55.size; ++_i56) - { - String _elem57; // required - _elem57 = iprot.readString(); - _elem54.add(_elem57); - } - iprot.readListEnd(); - } - this.skewedColValues.add(_elem54); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // SKEWED_COL_VALUE_LOCATION_MAPS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin(); - this.skewedColValueLocationMaps = new HashMap,String>(2*_map58.size); - for (int _i59 = 0; _i59 < _map58.size; ++_i59) - { - List _key60; // required - String _val61; // required - { - org.apache.thrift.protocol.TList _list62 = iprot.readListBegin(); - _key60 = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) - { - String _elem64; // required - _elem64 = iprot.readString(); - _key60.add(_elem64); - } - iprot.readListEnd(); - } - _val61 = iprot.readString(); - this.skewedColValueLocationMaps.put(_key60, _val61); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.skewedColNames != null) { - oprot.writeFieldBegin(SKEWED_COL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.skewedColNames.size())); - for (String _iter65 : this.skewedColNames) - { - oprot.writeString(_iter65); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.skewedColValues != null) { - oprot.writeFieldBegin(SKEWED_COL_VALUES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, this.skewedColValues.size())); - for (List _iter66 : this.skewedColValues) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter66.size())); - for (String _iter67 : _iter66) - { - oprot.writeString(_iter67); - } - oprot.writeListEnd(); - } - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.skewedColValueLocationMaps != null) { - oprot.writeFieldBegin(SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, this.skewedColValueLocationMaps.size())); - for (Map.Entry, String> _iter68 : this.skewedColValueLocationMaps.entrySet()) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter68.getKey().size())); - for (String _iter69 : _iter68.getKey()) - { - oprot.writeString(_iter69); - } - oprot.writeListEnd(); - } - oprot.writeString(_iter68.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -650,6 +522,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -668,5 +541,299 @@ } } + private static class SkewedInfoStandardSchemeFactory implements SchemeFactory { + public SkewedInfoStandardScheme getScheme() { + return new SkewedInfoStandardScheme(); + } + } + + private static class SkewedInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SKEWED_COL_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); + struct.skewedColNames = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) + { + String _elem100; // required + _elem100 = iprot.readString(); + struct.skewedColNames.add(_elem100); + } + iprot.readListEnd(); + } + struct.setSkewedColNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SKEWED_COL_VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(); + struct.skewedColValues = new ArrayList>(_list101.size); + for (int _i102 = 0; _i102 < _list101.size; ++_i102) + { + List _elem103; // required + { + org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); + _elem103 = new ArrayList(_list104.size); + for (int _i105 = 0; _i105 < _list104.size; ++_i105) + { + String _elem106; // required + _elem106 = iprot.readString(); + _elem103.add(_elem106); + } + iprot.readListEnd(); + } + struct.skewedColValues.add(_elem103); + } + iprot.readListEnd(); + } + struct.setSkewedColValuesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SKEWED_COL_VALUE_LOCATION_MAPS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map107 = iprot.readMapBegin(); + struct.skewedColValueLocationMaps = new HashMap,String>(2*_map107.size); + for (int _i108 = 0; _i108 < _map107.size; ++_i108) + { + List _key109; // required + String _val110; // required + { + org.apache.thrift.protocol.TList _list111 = iprot.readListBegin(); + _key109 = new ArrayList(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) + { + String _elem113; // required + _elem113 = iprot.readString(); + _key109.add(_elem113); + } + iprot.readListEnd(); + } + _val110 = iprot.readString(); + struct.skewedColValueLocationMaps.put(_key109, _val110); + } + iprot.readMapEnd(); + } + struct.setSkewedColValueLocationMapsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, SkewedInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.skewedColNames != null) { + oprot.writeFieldBegin(SKEWED_COL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.skewedColNames.size())); + for (String _iter114 : struct.skewedColNames) + { + oprot.writeString(_iter114); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedColValues != null) { + oprot.writeFieldBegin(SKEWED_COL_VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.skewedColValues.size())); + for (List _iter115 : struct.skewedColValues) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter115.size())); + for (String _iter116 : _iter115) + { + oprot.writeString(_iter116); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedColValueLocationMaps != null) { + oprot.writeFieldBegin(SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, struct.skewedColValueLocationMaps.size())); + for (Map.Entry, String> _iter117 : struct.skewedColValueLocationMaps.entrySet()) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter117.getKey().size())); + for (String _iter118 : _iter117.getKey()) + { + oprot.writeString(_iter118); + } + oprot.writeListEnd(); + } + oprot.writeString(_iter117.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SkewedInfoTupleSchemeFactory implements SchemeFactory { + public SkewedInfoTupleScheme getScheme() { + return new SkewedInfoTupleScheme(); + } + } + + private static class SkewedInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSkewedColNames()) { + optionals.set(0); + } + if (struct.isSetSkewedColValues()) { + optionals.set(1); + } + if (struct.isSetSkewedColValueLocationMaps()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSkewedColNames()) { + { + oprot.writeI32(struct.skewedColNames.size()); + for (String _iter119 : struct.skewedColNames) + { + oprot.writeString(_iter119); + } + } + } + if (struct.isSetSkewedColValues()) { + { + oprot.writeI32(struct.skewedColValues.size()); + for (List _iter120 : struct.skewedColValues) + { + { + oprot.writeI32(_iter120.size()); + for (String _iter121 : _iter120) + { + oprot.writeString(_iter121); + } + } + } + } + } + if (struct.isSetSkewedColValueLocationMaps()) { + { + oprot.writeI32(struct.skewedColValueLocationMaps.size()); + for (Map.Entry, String> _iter122 : struct.skewedColValueLocationMaps.entrySet()) + { + { + oprot.writeI32(_iter122.getKey().size()); + for (String _iter123 : _iter122.getKey()) + { + oprot.writeString(_iter123); + } + } + oprot.writeString(_iter122.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list124 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.skewedColNames = new ArrayList(_list124.size); + for (int _i125 = 0; _i125 < _list124.size; ++_i125) + { + String _elem126; // required + _elem126 = iprot.readString(); + struct.skewedColNames.add(_elem126); + } + } + struct.setSkewedColNamesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.skewedColValues = new ArrayList>(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) + { + List _elem129; // required + { + org.apache.thrift.protocol.TList _list130 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _elem129 = new ArrayList(_list130.size); + for (int _i131 = 0; _i131 < _list130.size; ++_i131) + { + String _elem132; // required + _elem132 = iprot.readString(); + _elem129.add(_elem132); + } + } + struct.skewedColValues.add(_elem129); + } + } + struct.setSkewedColValuesIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map133 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.skewedColValueLocationMaps = new HashMap,String>(2*_map133.size); + for (int _i134 = 0; _i134 < _map133.size; ++_i134) + { + List _key135; // required + String _val136; // required + { + org.apache.thrift.protocol.TList _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _key135 = new ArrayList(_list137.size); + for (int _i138 = 0; _i138 < _list137.size; ++_i138) + { + String _elem139; // required + _elem139 = iprot.readString(); + _key135.add(_elem139); + } + } + _val136 = iprot.readString(); + struct.skewedColValueLocationMaps.put(_key135, _val136); + } + } + struct.setSkewedColValueLocationMapsIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RoleStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RoleTupleSchemeFactory()); + } + private String roleName; // required private int createTime; // required private String ownerName; // required @@ -98,8 +114,7 @@ // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -132,8 +147,7 @@ * Performs a deep copy on other. */ public Role(Role other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetRoleName()) { this.roleName = other.roleName; } @@ -188,16 +202,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public String getOwnerName() { @@ -395,65 +409,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // ROLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.roleName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OWNER_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.ownerName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.roleName != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(this.roleName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - if (this.ownerName != null) { - oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); - oprot.writeString(this.ownerName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -486,6 +446,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -499,12 +460,138 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class RoleStandardSchemeFactory implements SchemeFactory { + public RoleStandardScheme getScheme() { + return new RoleStandardScheme(); + } + } + + private static class RoleStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Role struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OWNER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ownerName = iprot.readString(); + struct.setOwnerNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Role struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.roleName != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.roleName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + if (struct.ownerName != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(struct.ownerName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RoleTupleSchemeFactory implements SchemeFactory { + public RoleTupleScheme getScheme() { + return new RoleTupleScheme(); + } + } + + private static class RoleTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Role struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRoleName()) { + optionals.set(0); + } + if (struct.isSetCreateTime()) { + optionals.set(1); + } + if (struct.isSetOwnerName()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetRoleName()) { + oprot.writeString(struct.roleName); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetOwnerName()) { + oprot.writeString(struct.ownerName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Role struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } + if (incoming.get(1)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(2)) { + struct.ownerName = iprot.readString(); + struct.setOwnerNameIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -36,6 +46,12 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)10); private static final org.apache.thrift.protocol.TField SKEWED_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedInfo", org.apache.thrift.protocol.TType.STRUCT, (short)11); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new StorageDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new StorageDescriptorTupleSchemeFactory()); + } + private List cols; // required private String location; // required private String inputFormat; // required @@ -46,7 +62,7 @@ private List bucketCols; // required private List sortCols; // required private Map parameters; // required - private SkewedInfo skewedInfo; // required + private SkewedInfo skewedInfo; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -139,8 +155,8 @@ // isset id assignments private static final int __COMPRESSED_ISSET_ID = 0; private static final int __NUMBUCKETS_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.SKEWED_INFO}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -209,8 +225,7 @@ * Performs a deep copy on other. */ public StorageDescriptor(StorageDescriptor other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetCols()) { List __this__cols = new ArrayList(); for (FieldSchema other_element : other.cols) { @@ -404,16 +419,16 @@ } public void unsetCompressed() { - __isset_bit_vector.clear(__COMPRESSED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSED_ISSET_ID); } /** Returns true if field compressed is set (has been assigned a value) and false otherwise */ public boolean isSetCompressed() { - return __isset_bit_vector.get(__COMPRESSED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID); } public void setCompressedIsSet(boolean value) { - __isset_bit_vector.set(__COMPRESSED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value); } public int getNumBuckets() { @@ -426,16 +441,16 @@ } public void unsetNumBuckets() { - __isset_bit_vector.clear(__NUMBUCKETS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID); } /** Returns true if field numBuckets is set (has been assigned a value) and false otherwise */ public boolean isSetNumBuckets() { - return __isset_bit_vector.get(__NUMBUCKETS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID); } public void setNumBucketsIsSet(boolean value) { - __isset_bit_vector.set(__NUMBUCKETS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID, value); } public SerDeInfo getSerdeInfo() { @@ -1062,237 +1077,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // COLS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list70 = iprot.readListBegin(); - this.cols = new ArrayList(_list70.size); - for (int _i71 = 0; _i71 < _list70.size; ++_i71) - { - FieldSchema _elem72; // required - _elem72 = new FieldSchema(); - _elem72.read(iprot); - this.cols.add(_elem72); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // LOCATION - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.location = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INPUT_FORMAT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.inputFormat = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // OUTPUT_FORMAT - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.outputFormat = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // COMPRESSED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.compressed = iprot.readBool(); - setCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // NUM_BUCKETS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.numBuckets = iprot.readI32(); - setNumBucketsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // SERDE_INFO - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.serdeInfo = new SerDeInfo(); - this.serdeInfo.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // BUCKET_COLS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list73 = iprot.readListBegin(); - this.bucketCols = new ArrayList(_list73.size); - for (int _i74 = 0; _i74 < _list73.size; ++_i74) - { - String _elem75; // required - _elem75 = iprot.readString(); - this.bucketCols.add(_elem75); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // SORT_COLS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list76 = iprot.readListBegin(); - this.sortCols = new ArrayList(_list76.size); - for (int _i77 = 0; _i77 < _list76.size; ++_i77) - { - Order _elem78; // required - _elem78 = new Order(); - _elem78.read(iprot); - this.sortCols.add(_elem78); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map79 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map79.size); - for (int _i80 = 0; _i80 < _map79.size; ++_i80) - { - String _key81; // required - String _val82; // required - _key81 = iprot.readString(); - _val82 = iprot.readString(); - this.parameters.put(_key81, _val82); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 11: // SKEWED_INFO - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.skewedInfo = new SkewedInfo(); - this.skewedInfo.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.cols != null) { - oprot.writeFieldBegin(COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.cols.size())); - for (FieldSchema _iter83 : this.cols) - { - _iter83.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.location != null) { - oprot.writeFieldBegin(LOCATION_FIELD_DESC); - oprot.writeString(this.location); - oprot.writeFieldEnd(); - } - if (this.inputFormat != null) { - oprot.writeFieldBegin(INPUT_FORMAT_FIELD_DESC); - oprot.writeString(this.inputFormat); - oprot.writeFieldEnd(); - } - if (this.outputFormat != null) { - oprot.writeFieldBegin(OUTPUT_FORMAT_FIELD_DESC); - oprot.writeString(this.outputFormat); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); - oprot.writeBool(this.compressed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_BUCKETS_FIELD_DESC); - oprot.writeI32(this.numBuckets); - oprot.writeFieldEnd(); - if (this.serdeInfo != null) { - oprot.writeFieldBegin(SERDE_INFO_FIELD_DESC); - this.serdeInfo.write(oprot); - oprot.writeFieldEnd(); - } - if (this.bucketCols != null) { - oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.bucketCols.size())); - for (String _iter84 : this.bucketCols) - { - oprot.writeString(_iter84); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.sortCols != null) { - oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.sortCols.size())); - for (Order _iter85 : this.sortCols) - { - _iter85.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter86 : this.parameters.entrySet()) - { - oprot.writeString(_iter86.getKey()); - oprot.writeString(_iter86.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.skewedInfo != null) { - if (isSetSkewedInfo()) { - oprot.writeFieldBegin(SKEWED_INFO_FIELD_DESC); - this.skewedInfo.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1387,6 +1176,13 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (serdeInfo != null) { + serdeInfo.validate(); + } + if (skewedInfo != null) { + skewedInfo.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1400,12 +1196,464 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class StorageDescriptorStandardSchemeFactory implements SchemeFactory { + public StorageDescriptorStandardScheme getScheme() { + return new StorageDescriptorStandardScheme(); + } + } + + private static class StorageDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, StorageDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list140 = iprot.readListBegin(); + struct.cols = new ArrayList(_list140.size); + for (int _i141 = 0; _i141 < _list140.size; ++_i141) + { + FieldSchema _elem142; // required + _elem142 = new FieldSchema(); + _elem142.read(iprot); + struct.cols.add(_elem142); + } + iprot.readListEnd(); + } + struct.setColsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LOCATION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.location = iprot.readString(); + struct.setLocationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // INPUT_FORMAT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.inputFormat = iprot.readString(); + struct.setInputFormatIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // OUTPUT_FORMAT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.outputFormat = iprot.readString(); + struct.setOutputFormatIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COMPRESSED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.compressed = iprot.readBool(); + struct.setCompressedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // NUM_BUCKETS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numBuckets = iprot.readI32(); + struct.setNumBucketsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SERDE_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serdeInfo = new SerDeInfo(); + struct.serdeInfo.read(iprot); + struct.setSerdeInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // BUCKET_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list143 = iprot.readListBegin(); + struct.bucketCols = new ArrayList(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) + { + String _elem145; // required + _elem145 = iprot.readString(); + struct.bucketCols.add(_elem145); + } + iprot.readListEnd(); + } + struct.setBucketColsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // SORT_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); + struct.sortCols = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) + { + Order _elem148; // required + _elem148 = new Order(); + _elem148.read(iprot); + struct.sortCols.add(_elem148); + } + iprot.readListEnd(); + } + struct.setSortColsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map149 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map149.size); + for (int _i150 = 0; _i150 < _map149.size; ++_i150) + { + String _key151; // required + String _val152; // required + _key151 = iprot.readString(); + _val152 = iprot.readString(); + struct.parameters.put(_key151, _val152); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // SKEWED_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.skewedInfo = new SkewedInfo(); + struct.skewedInfo.read(iprot); + struct.setSkewedInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, StorageDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.cols != null) { + oprot.writeFieldBegin(COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size())); + for (FieldSchema _iter153 : struct.cols) + { + _iter153.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.location != null) { + oprot.writeFieldBegin(LOCATION_FIELD_DESC); + oprot.writeString(struct.location); + oprot.writeFieldEnd(); + } + if (struct.inputFormat != null) { + oprot.writeFieldBegin(INPUT_FORMAT_FIELD_DESC); + oprot.writeString(struct.inputFormat); + oprot.writeFieldEnd(); + } + if (struct.outputFormat != null) { + oprot.writeFieldBegin(OUTPUT_FORMAT_FIELD_DESC); + oprot.writeString(struct.outputFormat); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); + oprot.writeBool(struct.compressed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_BUCKETS_FIELD_DESC); + oprot.writeI32(struct.numBuckets); + oprot.writeFieldEnd(); + if (struct.serdeInfo != null) { + oprot.writeFieldBegin(SERDE_INFO_FIELD_DESC); + struct.serdeInfo.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.bucketCols != null) { + oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bucketCols.size())); + for (String _iter154 : struct.bucketCols) + { + oprot.writeString(_iter154); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.sortCols != null) { + oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.sortCols.size())); + for (Order _iter155 : struct.sortCols) + { + _iter155.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter156 : struct.parameters.entrySet()) + { + oprot.writeString(_iter156.getKey()); + oprot.writeString(_iter156.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedInfo != null) { + if (struct.isSetSkewedInfo()) { + oprot.writeFieldBegin(SKEWED_INFO_FIELD_DESC); + struct.skewedInfo.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class StorageDescriptorTupleSchemeFactory implements SchemeFactory { + public StorageDescriptorTupleScheme getScheme() { + return new StorageDescriptorTupleScheme(); + } + } + + private static class StorageDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCols()) { + optionals.set(0); + } + if (struct.isSetLocation()) { + optionals.set(1); + } + if (struct.isSetInputFormat()) { + optionals.set(2); + } + if (struct.isSetOutputFormat()) { + optionals.set(3); + } + if (struct.isSetCompressed()) { + optionals.set(4); + } + if (struct.isSetNumBuckets()) { + optionals.set(5); + } + if (struct.isSetSerdeInfo()) { + optionals.set(6); + } + if (struct.isSetBucketCols()) { + optionals.set(7); + } + if (struct.isSetSortCols()) { + optionals.set(8); + } + if (struct.isSetParameters()) { + optionals.set(9); + } + if (struct.isSetSkewedInfo()) { + optionals.set(10); + } + oprot.writeBitSet(optionals, 11); + if (struct.isSetCols()) { + { + oprot.writeI32(struct.cols.size()); + for (FieldSchema _iter157 : struct.cols) + { + _iter157.write(oprot); + } + } + } + if (struct.isSetLocation()) { + oprot.writeString(struct.location); + } + if (struct.isSetInputFormat()) { + oprot.writeString(struct.inputFormat); + } + if (struct.isSetOutputFormat()) { + oprot.writeString(struct.outputFormat); + } + if (struct.isSetCompressed()) { + oprot.writeBool(struct.compressed); + } + if (struct.isSetNumBuckets()) { + oprot.writeI32(struct.numBuckets); + } + if (struct.isSetSerdeInfo()) { + struct.serdeInfo.write(oprot); + } + if (struct.isSetBucketCols()) { + { + oprot.writeI32(struct.bucketCols.size()); + for (String _iter158 : struct.bucketCols) + { + oprot.writeString(_iter158); + } + } + } + if (struct.isSetSortCols()) { + { + oprot.writeI32(struct.sortCols.size()); + for (Order _iter159 : struct.sortCols) + { + _iter159.write(oprot); + } + } + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter160 : struct.parameters.entrySet()) + { + oprot.writeString(_iter160.getKey()); + oprot.writeString(_iter160.getValue()); + } + } + } + if (struct.isSetSkewedInfo()) { + struct.skewedInfo.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, StorageDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(11); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list161 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.cols = new ArrayList(_list161.size); + for (int _i162 = 0; _i162 < _list161.size; ++_i162) + { + FieldSchema _elem163; // required + _elem163 = new FieldSchema(); + _elem163.read(iprot); + struct.cols.add(_elem163); + } + } + struct.setColsIsSet(true); + } + if (incoming.get(1)) { + struct.location = iprot.readString(); + struct.setLocationIsSet(true); + } + if (incoming.get(2)) { + struct.inputFormat = iprot.readString(); + struct.setInputFormatIsSet(true); + } + if (incoming.get(3)) { + struct.outputFormat = iprot.readString(); + struct.setOutputFormatIsSet(true); + } + if (incoming.get(4)) { + struct.compressed = iprot.readBool(); + struct.setCompressedIsSet(true); + } + if (incoming.get(5)) { + struct.numBuckets = iprot.readI32(); + struct.setNumBucketsIsSet(true); + } + if (incoming.get(6)) { + struct.serdeInfo = new SerDeInfo(); + struct.serdeInfo.read(iprot); + struct.setSerdeInfoIsSet(true); + } + if (incoming.get(7)) { + { + org.apache.thrift.protocol.TList _list164 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.bucketCols = new ArrayList(_list164.size); + for (int _i165 = 0; _i165 < _list164.size; ++_i165) + { + String _elem166; // required + _elem166 = iprot.readString(); + struct.bucketCols.add(_elem166); + } + } + struct.setBucketColsIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TList _list167 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.sortCols = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) + { + Order _elem169; // required + _elem169 = new Order(); + _elem169.read(iprot); + struct.sortCols.add(_elem169); + } + } + struct.setSortColsIsSet(true); + } + if (incoming.get(9)) { + { + org.apache.thrift.protocol.TMap _map170 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map170.size); + for (int _i171 = 0; _i171 < _map170.size; ++_i171) + { + String _key172; // required + String _val173; // required + _key172 = iprot.readString(); + _val173 = iprot.readString(); + struct.parameters.put(_key172, _val173); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(10)) { + struct.skewedInfo = new SkewedInfo(); + struct.skewedInfo.read(iprot); + struct.setSkewedInfoIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,11 +40,17 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)4); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DatabaseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DatabaseTupleSchemeFactory()); + } + private String name; // required private String description; // required private String locationUri; // required private Map parameters; // required - private PrincipalPrivilegeSet privileges; // required + private PrincipalPrivilegeSet privileges; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -107,7 +123,7 @@ } // isset id assignments - + private _Fields optionals[] = {_Fields.PRIVILEGES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -561,113 +577,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DESCRIPTION - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.description = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // LOCATION_URI - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.locationUri = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map39 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map39.size); - for (int _i40 = 0; _i40 < _map39.size; ++_i40) - { - String _key41; // required - String _val42; // required - _key41 = iprot.readString(); - _val42 = iprot.readString(); - this.parameters.put(_key41, _val42); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // PRIVILEGES - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.privileges = new PrincipalPrivilegeSet(); - this.privileges.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.description != null) { - oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); - oprot.writeString(this.description); - oprot.writeFieldEnd(); - } - if (this.locationUri != null) { - oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); - oprot.writeString(this.locationUri); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter43 : this.parameters.entrySet()) - { - oprot.writeString(_iter43.getKey()); - oprot.writeString(_iter43.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.privileges != null) { - if (isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - this.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -722,6 +636,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (privileges != null) { + privileges.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -740,5 +658,221 @@ } } + private static class DatabaseStandardSchemeFactory implements SchemeFactory { + public DatabaseStandardScheme getScheme() { + return new DatabaseStandardScheme(); + } + } + + private static class DatabaseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Database struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DESCRIPTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LOCATION_URI + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.locationUri = iprot.readString(); + struct.setLocationUriIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map78 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map78.size); + for (int _i79 = 0; _i79 < _map78.size; ++_i79) + { + String _key80; // required + String _val81; // required + _key80 = iprot.readString(); + _val81 = iprot.readString(); + struct.parameters.put(_key80, _val81); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Database struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.description != null) { + oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); + oprot.writeString(struct.description); + oprot.writeFieldEnd(); + } + if (struct.locationUri != null) { + oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); + oprot.writeString(struct.locationUri); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter82 : struct.parameters.entrySet()) + { + oprot.writeString(_iter82.getKey()); + oprot.writeString(_iter82.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DatabaseTupleSchemeFactory implements SchemeFactory { + public DatabaseTupleScheme getScheme() { + return new DatabaseTupleScheme(); + } + } + + private static class DatabaseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Database struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetDescription()) { + optionals.set(1); + } + if (struct.isSetLocationUri()) { + optionals.set(2); + } + if (struct.isSetParameters()) { + optionals.set(3); + } + if (struct.isSetPrivileges()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDescription()) { + oprot.writeString(struct.description); + } + if (struct.isSetLocationUri()) { + oprot.writeString(struct.locationUri); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter83 : struct.parameters.entrySet()) + { + oprot.writeString(_iter83.getKey()); + oprot.writeString(_iter83.getValue()); + } + } + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Database struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } + if (incoming.get(2)) { + struct.locationUri = iprot.readString(); + struct.setLocationUriIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map84.size); + for (int _i85 = 0; _i85 < _map84.size; ++_i85) + { + String _key86; // required + String _val87; // required + _key86 = iprot.readString(); + _val87 = iprot.readString(); + struct.parameters.put(_key86, _val87); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(4)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -35,6 +45,12 @@ private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)9); private static final org.apache.thrift.protocol.TField DEFERRED_REBUILD_FIELD_DESC = new org.apache.thrift.protocol.TField("deferredRebuild", org.apache.thrift.protocol.TType.BOOL, (short)10); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IndexStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IndexTupleSchemeFactory()); + } + private String indexName; // required private String indexHandlerClass; // required private String dbName; // required @@ -135,8 +151,7 @@ private static final int __CREATETIME_ISSET_ID = 0; private static final int __LASTACCESSTIME_ISSET_ID = 1; private static final int __DEFERREDREBUILD_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -201,8 +216,7 @@ * Performs a deep copy on other. */ public Index(Index other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetIndexName()) { this.indexName = other.indexName; } @@ -364,16 +378,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -386,16 +400,16 @@ } public void unsetLastAccessTime() { - __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); } public void setLastAccessTimeIsSet(boolean value) { - __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); } public String getIndexTableName() { @@ -488,16 +502,16 @@ } public void unsetDeferredRebuild() { - __isset_bit_vector.clear(__DEFERREDREBUILD_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID); } /** Returns true if field deferredRebuild is set (has been assigned a value) and false otherwise */ public boolean isSetDeferredRebuild() { - return __isset_bit_vector.get(__DEFERREDREBUILD_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID); } public void setDeferredRebuildIsSet(boolean value) { - __isset_bit_vector.set(__DEFERREDREBUILD_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -931,168 +945,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // INDEX_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.indexName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // INDEX_HANDLER_CLASS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.indexHandlerClass = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // DB_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.dbName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // ORIG_TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.origTableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // LAST_ACCESS_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.lastAccessTime = iprot.readI32(); - setLastAccessTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // INDEX_TABLE_NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.indexTableName = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // SD - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.sd = new StorageDescriptor(); - this.sd.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 9: // PARAMETERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map105 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map105.size); - for (int _i106 = 0; _i106 < _map105.size; ++_i106) - { - String _key107; // required - String _val108; // required - _key107 = iprot.readString(); - _val108 = iprot.readString(); - this.parameters.put(_key107, _val108); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 10: // DEFERRED_REBUILD - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deferredRebuild = iprot.readBool(); - setDeferredRebuildIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.indexName != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.indexName); - oprot.writeFieldEnd(); - } - if (this.indexHandlerClass != null) { - oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC); - oprot.writeString(this.indexHandlerClass); - oprot.writeFieldEnd(); - } - if (this.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.dbName); - oprot.writeFieldEnd(); - } - if (this.origTableName != null) { - oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC); - oprot.writeString(this.origTableName); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); - oprot.writeI32(this.lastAccessTime); - oprot.writeFieldEnd(); - if (this.indexTableName != null) { - oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC); - oprot.writeString(this.indexTableName); - oprot.writeFieldEnd(); - } - if (this.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - this.sd.write(oprot); - oprot.writeFieldEnd(); - } - if (this.parameters != null) { - oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size())); - for (Map.Entry _iter109 : this.parameters.entrySet()) - { - oprot.writeString(_iter109.getKey()); - oprot.writeString(_iter109.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC); - oprot.writeBool(this.deferredRebuild); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1173,6 +1030,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (sd != null) { + sd.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1186,12 +1047,335 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class IndexStandardSchemeFactory implements SchemeFactory { + public IndexStandardScheme getScheme() { + return new IndexStandardScheme(); + } + } + + private static class IndexStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Index struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // INDEX_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.indexName = iprot.readString(); + struct.setIndexNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INDEX_HANDLER_CLASS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.indexHandlerClass = iprot.readString(); + struct.setIndexHandlerClassIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ORIG_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.origTableName = iprot.readString(); + struct.setOrigTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // LAST_ACCESS_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // INDEX_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.indexTableName = iprot.readString(); + struct.setIndexTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // SD + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map210 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map210.size); + for (int _i211 = 0; _i211 < _map210.size; ++_i211) + { + String _key212; // required + String _val213; // required + _key212 = iprot.readString(); + _val213 = iprot.readString(); + struct.parameters.put(_key212, _val213); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // DEFERRED_REBUILD + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.deferredRebuild = iprot.readBool(); + struct.setDeferredRebuildIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Index struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.indexName != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(struct.indexName); + oprot.writeFieldEnd(); + } + if (struct.indexHandlerClass != null) { + oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC); + oprot.writeString(struct.indexHandlerClass); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.origTableName != null) { + oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.origTableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC); + oprot.writeI32(struct.lastAccessTime); + oprot.writeFieldEnd(); + if (struct.indexTableName != null) { + oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.indexTableName); + oprot.writeFieldEnd(); + } + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size())); + for (Map.Entry _iter214 : struct.parameters.entrySet()) + { + oprot.writeString(_iter214.getKey()); + oprot.writeString(_iter214.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC); + oprot.writeBool(struct.deferredRebuild); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IndexTupleSchemeFactory implements SchemeFactory { + public IndexTupleScheme getScheme() { + return new IndexTupleScheme(); + } + } + + private static class IndexTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Index struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIndexName()) { + optionals.set(0); + } + if (struct.isSetIndexHandlerClass()) { + optionals.set(1); + } + if (struct.isSetDbName()) { + optionals.set(2); + } + if (struct.isSetOrigTableName()) { + optionals.set(3); + } + if (struct.isSetCreateTime()) { + optionals.set(4); + } + if (struct.isSetLastAccessTime()) { + optionals.set(5); + } + if (struct.isSetIndexTableName()) { + optionals.set(6); + } + if (struct.isSetSd()) { + optionals.set(7); + } + if (struct.isSetParameters()) { + optionals.set(8); + } + if (struct.isSetDeferredRebuild()) { + optionals.set(9); + } + oprot.writeBitSet(optionals, 10); + if (struct.isSetIndexName()) { + oprot.writeString(struct.indexName); + } + if (struct.isSetIndexHandlerClass()) { + oprot.writeString(struct.indexHandlerClass); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetOrigTableName()) { + oprot.writeString(struct.origTableName); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetIndexTableName()) { + oprot.writeString(struct.indexTableName); + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter215 : struct.parameters.entrySet()) + { + oprot.writeString(_iter215.getKey()); + oprot.writeString(_iter215.getValue()); + } + } + } + if (struct.isSetDeferredRebuild()) { + oprot.writeBool(struct.deferredRebuild); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Index struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(10); + if (incoming.get(0)) { + struct.indexName = iprot.readString(); + struct.setIndexNameIsSet(true); + } + if (incoming.get(1)) { + struct.indexHandlerClass = iprot.readString(); + struct.setIndexHandlerClassIsSet(true); + } + if (incoming.get(2)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(3)) { + struct.origTableName = iprot.readString(); + struct.setOrigTableNameIsSet(true); + } + if (incoming.get(4)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(5)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(6)) { + struct.indexTableName = iprot.readString(); + struct.setIndexTableNameIsSet(true); + } + if (incoming.get(7)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TMap _map216 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.parameters = new HashMap(2*_map216.size); + for (int _i217 = 0; _i217 < _map216.size; ++_i217) + { + String _key218; // required + String _val219; // required + _key218 = iprot.readString(); + _val219 = iprot.readString(); + struct.parameters.put(_key218, _val219); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(9)) { + struct.deferredRebuild = iprot.readBool(); + struct.setDeferredRebuildIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UnknownPartitionException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class UnknownPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownPartitionException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnknownPartitionExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnknownPartitionExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class UnknownPartitionExceptionStandardSchemeFactory implements SchemeFactory { + public UnknownPartitionExceptionStandardScheme getScheme() { + return new UnknownPartitionExceptionStandardScheme(); + } + } + + private static class UnknownPartitionExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownPartitionException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownPartitionException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnknownPartitionExceptionTupleSchemeFactory implements SchemeFactory { + public UnknownPartitionExceptionTupleScheme getScheme() { + return new UnknownPartitionExceptionTupleScheme(); + } + } + + private static class UnknownPartitionExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnknownPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnknownPartitionException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -26,6 +36,12 @@ private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new EnvironmentContextStandardSchemeFactory()); + schemes.put(TupleScheme.class, new EnvironmentContextTupleSchemeFactory()); + } + private Map properties; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -271,62 +286,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PROPERTIES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map119 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map119.size); - for (int _i120 = 0; _i120 < _map119.size; ++_i120) - { - String _key121; // required - String _val122; // required - _key121 = iprot.readString(); - _val122 = iprot.readString(); - this.properties.put(_key121, _val122); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.properties != null) { - oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size())); - for (Map.Entry _iter123 : this.properties.entrySet()) - { - oprot.writeString(_iter123.getKey()); - oprot.writeString(_iter123.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -347,6 +311,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -365,5 +330,125 @@ } } + private static class EnvironmentContextStandardSchemeFactory implements SchemeFactory { + public EnvironmentContextStandardScheme getScheme() { + return new EnvironmentContextStandardScheme(); + } + } + + private static class EnvironmentContextStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, EnvironmentContext struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PROPERTIES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map238 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map238.size); + for (int _i239 = 0; _i239 < _map238.size; ++_i239) + { + String _key240; // required + String _val241; // required + _key240 = iprot.readString(); + _val241 = iprot.readString(); + struct.properties.put(_key240, _val241); + } + iprot.readMapEnd(); + } + struct.setPropertiesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, EnvironmentContext struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.properties != null) { + oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size())); + for (Map.Entry _iter242 : struct.properties.entrySet()) + { + oprot.writeString(_iter242.getKey()); + oprot.writeString(_iter242.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class EnvironmentContextTupleSchemeFactory implements SchemeFactory { + public EnvironmentContextTupleScheme getScheme() { + return new EnvironmentContextTupleScheme(); + } + } + + private static class EnvironmentContextTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, EnvironmentContext struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetProperties()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetProperties()) { + { + oprot.writeI32(struct.properties.size()); + for (Map.Entry _iter243 : struct.properties.entrySet()) + { + oprot.writeString(_iter243.getKey()); + oprot.writeString(_iter243.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, EnvironmentContext struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map244 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.properties = new HashMap(2*_map244.size); + for (int _i245 = 0; _i245 < _map244.size; ++_i245) + { + String _key246; // required + String _val247; // required + _key246 = iprot.readString(); + _val247 = iprot.readString(); + struct.properties.put(_key246, _val247); + } + } + struct.setPropertiesIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField COL_FIELD_DESC = new org.apache.thrift.protocol.TField("col", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("order", org.apache.thrift.protocol.TType.I32, (short)2); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OrderStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OrderTupleSchemeFactory()); + } + private String col; // required private int order; // required @@ -93,8 +109,7 @@ // isset id assignments private static final int __ORDER_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -123,8 +138,7 @@ * Performs a deep copy on other. */ public Order(Order other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetCol()) { this.col = other.col; } @@ -175,16 +189,16 @@ } public void unsetOrder() { - __isset_bit_vector.clear(__ORDER_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDER_ISSET_ID); } /** Returns true if field order is set (has been assigned a value) and false otherwise */ public boolean isSetOrder() { - return __isset_bit_vector.get(__ORDER_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __ORDER_ISSET_ID); } public void setOrderIsSet(boolean value) { - __isset_bit_vector.set(__ORDER_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDER_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -322,53 +336,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // COL - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.col = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ORDER - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.order = iprot.readI32(); - setOrderIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.col != null) { - oprot.writeFieldBegin(COL_FIELD_DESC); - oprot.writeString(this.col); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ORDER_FIELD_DESC); - oprot.writeI32(this.order); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -393,6 +365,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -406,12 +379,115 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class OrderStandardSchemeFactory implements SchemeFactory { + public OrderStandardScheme getScheme() { + return new OrderStandardScheme(); + } + } + + private static class OrderStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Order struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // COL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col = iprot.readString(); + struct.setColIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ORDER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.order = iprot.readI32(); + struct.setOrderIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Order struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.col != null) { + oprot.writeFieldBegin(COL_FIELD_DESC); + oprot.writeString(struct.col); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ORDER_FIELD_DESC); + oprot.writeI32(struct.order); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OrderTupleSchemeFactory implements SchemeFactory { + public OrderTupleScheme getScheme() { + return new OrderTupleScheme(); + } + } + + private static class OrderTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetCol()) { + optionals.set(0); + } + if (struct.isSetOrder()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetCol()) { + oprot.writeString(struct.col); + } + if (struct.isSetOrder()) { + oprot.writeI32(struct.order); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.col = iprot.readString(); + struct.setColIsSet(true); + } + if (incoming.get(1)) { + struct.order = iprot.readI32(); + struct.setOrderIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -29,10 +39,16 @@ private static final org.apache.thrift.protocol.TField TYPE2_FIELD_DESC = new org.apache.thrift.protocol.TField("type2", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TypeStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TypeTupleSchemeFactory()); + } + private String name; // required - private String type1; // required - private String type2; // required - private List fields; // required + private String type1; // optional + private String type2; // optional + private List fields; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -102,7 +118,7 @@ } // isset id assignments - + private _Fields optionals[] = {_Fields.TYPE1,_Fields.TYPE2,_Fields.FIELDS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -479,102 +495,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NAME - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TYPE1 - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type1 = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TYPE2 - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.type2 = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // FIELDS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.fields = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - FieldSchema _elem2; // required - _elem2 = new FieldSchema(); - _elem2.read(iprot); - this.fields.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.type1 != null) { - if (isSetType1()) { - oprot.writeFieldBegin(TYPE1_FIELD_DESC); - oprot.writeString(this.type1); - oprot.writeFieldEnd(); - } - } - if (this.type2 != null) { - if (isSetType2()) { - oprot.writeFieldBegin(TYPE2_FIELD_DESC); - oprot.writeString(this.type2); - oprot.writeFieldEnd(); - } - } - if (this.fields != null) { - if (isSetFields()) { - oprot.writeFieldBegin(FIELDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fields.size())); - for (FieldSchema _iter3 : this.fields) - { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -625,6 +550,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -643,5 +569,196 @@ } } + private static class TypeStandardSchemeFactory implements SchemeFactory { + public TypeStandardScheme getScheme() { + return new TypeStandardScheme(); + } + } + + private static class TypeStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Type struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TYPE1 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type1 = iprot.readString(); + struct.setType1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TYPE2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.type2 = iprot.readString(); + struct.setType2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // FIELDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.fields = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + FieldSchema _elem2; // required + _elem2 = new FieldSchema(); + _elem2.read(iprot); + struct.fields.add(_elem2); + } + iprot.readListEnd(); + } + struct.setFieldsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Type struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.type1 != null) { + if (struct.isSetType1()) { + oprot.writeFieldBegin(TYPE1_FIELD_DESC); + oprot.writeString(struct.type1); + oprot.writeFieldEnd(); + } + } + if (struct.type2 != null) { + if (struct.isSetType2()) { + oprot.writeFieldBegin(TYPE2_FIELD_DESC); + oprot.writeString(struct.type2); + oprot.writeFieldEnd(); + } + } + if (struct.fields != null) { + if (struct.isSetFields()) { + oprot.writeFieldBegin(FIELDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fields.size())); + for (FieldSchema _iter3 : struct.fields) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TypeTupleSchemeFactory implements SchemeFactory { + public TypeTupleScheme getScheme() { + return new TypeTupleScheme(); + } + } + + private static class TypeTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Type struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetType1()) { + optionals.set(1); + } + if (struct.isSetType2()) { + optionals.set(2); + } + if (struct.isSetFields()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetType1()) { + oprot.writeString(struct.type1); + } + if (struct.isSetType2()) { + oprot.writeString(struct.type2); + } + if (struct.isSetFields()) { + { + oprot.writeI32(struct.fields.size()); + for (FieldSchema _iter4 : struct.fields) + { + _iter4.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Type struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.type1 = iprot.readString(); + struct.setType1IsSet(true); + } + if (incoming.get(2)) { + struct.type2 = iprot.readString(); + struct.setType2IsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fields = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + FieldSchema _elem7; // required + _elem7 = new FieldSchema(); + _elem7.read(iprot); + struct.fields.add(_elem7); + } + } + struct.setFieldsIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UnknownDBException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class UnknownDBException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownDBException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnknownDBExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnknownDBExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class UnknownDBExceptionStandardSchemeFactory implements SchemeFactory { + public UnknownDBExceptionStandardScheme getScheme() { + return new UnknownDBExceptionStandardScheme(); + } + } + + private static class UnknownDBExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownDBException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownDBException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnknownDBExceptionTupleSchemeFactory implements SchemeFactory { + public UnknownDBExceptionTupleScheme getScheme() { + return new UnknownDBExceptionTupleScheme(); + } + } + + private static class UnknownDBExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnknownDBException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnknownDBException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UnknownTableException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class UnknownTableException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownTableException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnknownTableExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnknownTableExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class UnknownTableExceptionStandardSchemeFactory implements SchemeFactory { + public UnknownTableExceptionStandardScheme getScheme() { + return new UnknownTableExceptionStandardScheme(); + } + } + + private static class UnknownTableExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownTableException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownTableException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnknownTableExceptionTupleSchemeFactory implements SchemeFactory { + public UnknownTableExceptionTupleScheme getScheme() { + return new UnknownTableExceptionTupleScheme(); + } + } + + private static class UnknownTableExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnknownTableException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnknownTableException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,11 +31,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidObjectException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class InvalidObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidObjectException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InvalidObjectExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidObjectExceptionTupleSchemeFactory()); + } + private String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,7 +103,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -246,42 +261,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -302,6 +286,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -320,5 +305,87 @@ } } + private static class InvalidObjectExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidObjectExceptionStandardScheme getScheme() { + return new InvalidObjectExceptionStandardScheme(); + } + } + + private static class InvalidObjectExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidObjectException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidObjectException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InvalidObjectExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidObjectExceptionTupleScheme getScheme() { + return new InvalidObjectExceptionTupleScheme(); + } + } + + private static class InvalidObjectExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InvalidObjectException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (revision 1403799) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.metastore.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,6 +40,12 @@ private static final org.apache.thrift.protocol.TField GRANTOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorType", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grantOption", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrivilegeGrantInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrivilegeGrantInfoTupleSchemeFactory()); + } + private String privilege; // required private int createTime; // required private String grantor; // required @@ -113,8 +129,7 @@ // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; private static final int __GRANTOPTION_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -156,8 +171,7 @@ * Performs a deep copy on other. */ public PrivilegeGrantInfo(PrivilegeGrantInfo other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetPrivilege()) { this.privilege = other.privilege; } @@ -219,16 +233,16 @@ } public void unsetCreateTime() { - __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); } /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ public boolean isSetCreateTime() { - return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } public String getGrantor() { @@ -295,16 +309,16 @@ } public void unsetGrantOption() { - __isset_bit_vector.clear(__GRANTOPTION_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); } /** Returns true if field grantOption is set (has been assigned a value) and false otherwise */ public boolean isSetGrantOption() { - return __isset_bit_vector.get(__GRANTOPTION_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); } public void setGrantOptionIsSet(boolean value) { - __isset_bit_vector.set(__GRANTOPTION_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -553,88 +567,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // PRIVILEGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.privilege = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // CREATE_TIME - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.createTime = iprot.readI32(); - setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // GRANTOR - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.grantor = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // GRANTOR_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.grantorType = PrincipalType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // GRANT_OPTION - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.grantOption = iprot.readBool(); - setGrantOptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.privilege != null) { - oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC); - oprot.writeString(this.privilege); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(this.createTime); - oprot.writeFieldEnd(); - if (this.grantor != null) { - oprot.writeFieldBegin(GRANTOR_FIELD_DESC); - oprot.writeString(this.grantor); - oprot.writeFieldEnd(); - } - if (this.grantorType != null) { - oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); - oprot.writeI32(this.grantorType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); - oprot.writeBool(this.grantOption); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -679,6 +616,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -692,12 +630,182 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class PrivilegeGrantInfoStandardSchemeFactory implements SchemeFactory { + public PrivilegeGrantInfoStandardScheme getScheme() { + return new PrivilegeGrantInfoStandardScheme(); + } + } + + private static class PrivilegeGrantInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PRIVILEGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.privilege = iprot.readString(); + struct.setPrivilegeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // GRANTOR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // GRANTOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.privilege != null) { + oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC); + oprot.writeString(struct.privilege); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + if (struct.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(struct.grantor); + oprot.writeFieldEnd(); + } + if (struct.grantorType != null) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.grantorType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.grantOption); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrivilegeGrantInfoTupleSchemeFactory implements SchemeFactory { + public PrivilegeGrantInfoTupleScheme getScheme() { + return new PrivilegeGrantInfoTupleScheme(); + } + } + + private static class PrivilegeGrantInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPrivilege()) { + optionals.set(0); + } + if (struct.isSetCreateTime()) { + optionals.set(1); + } + if (struct.isSetGrantor()) { + optionals.set(2); + } + if (struct.isSetGrantorType()) { + optionals.set(3); + } + if (struct.isSetGrantOption()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetPrivilege()) { + oprot.writeString(struct.privilege); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetGrantor()) { + oprot.writeString(struct.grantor); + } + if (struct.isSetGrantorType()) { + oprot.writeI32(struct.grantorType.getValue()); + } + if (struct.isSetGrantOption()) { + oprot.writeBool(struct.grantOption); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrivilegeGrantInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.privilege = iprot.readString(); + struct.setPrivilegeIsSet(true); + } + if (incoming.get(1)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(2)) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } + if (incoming.get(3)) { + struct.grantorType = PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } + if (incoming.get(4)) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } + } + } + } Index: metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php =================================================================== --- metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php (revision 0) +++ metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php (revision 0) @@ -0,0 +1,20234 @@ +send_create_database($database); + $this->recv_create_database(); + } + + public function send_create_database(\metastore\Database $database) + { + $args = new \metastore\ThriftHiveMetastore_create_database_args(); + $args->database = $database; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_database_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_create_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_database($name) + { + $this->send_get_database($name); + return $this->recv_get_database(); + } + + public function send_get_database($name) + { + $args = new \metastore\ThriftHiveMetastore_get_database_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_database_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_database failed: unknown result"); + } + + public function drop_database($name, $deleteData, $cascade) + { + $this->send_drop_database($name, $deleteData, $cascade); + $this->recv_drop_database(); + } + + public function send_drop_database($name, $deleteData, $cascade) + { + $args = new \metastore\ThriftHiveMetastore_drop_database_args(); + $args->name = $name; + $args->deleteData = $deleteData; + $args->cascade = $cascade; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_database_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_databases($pattern) + { + $this->send_get_databases($pattern); + return $this->recv_get_databases(); + } + + public function send_get_databases($pattern) + { + $args = new \metastore\ThriftHiveMetastore_get_databases_args(); + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_databases', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_databases() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_databases_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_databases_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_databases failed: unknown result"); + } + + public function get_all_databases() + { + $this->send_get_all_databases(); + return $this->recv_get_all_databases(); + } + + public function send_get_all_databases() + { + $args = new \metastore\ThriftHiveMetastore_get_all_databases_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_databases', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_databases() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_databases_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_all_databases_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_all_databases failed: unknown result"); + } + + public function alter_database($dbname, \metastore\Database $db) + { + $this->send_alter_database($dbname, $db); + $this->recv_alter_database(); + } + + public function send_alter_database($dbname, \metastore\Database $db) + { + $args = new \metastore\ThriftHiveMetastore_alter_database_args(); + $args->dbname = $dbname; + $args->db = $db; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_database_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function get_type($name) + { + $this->send_get_type($name); + return $this->recv_get_type(); + } + + public function send_get_type($name) + { + $args = new \metastore\ThriftHiveMetastore_get_type_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_type() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_type_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_type_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_type failed: unknown result"); + } + + public function create_type(\metastore\Type $type) + { + $this->send_create_type($type); + return $this->recv_create_type(); + } + + public function send_create_type(\metastore\Type $type) + { + $args = new \metastore\ThriftHiveMetastore_create_type_args(); + $args->type = $type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_type() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_type_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_create_type_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("create_type failed: unknown result"); + } + + public function drop_type($type) + { + $this->send_drop_type($type); + return $this->recv_drop_type(); + } + + public function send_drop_type($type) + { + $args = new \metastore\ThriftHiveMetastore_drop_type_args(); + $args->type = $type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_type() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_type_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_type_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("drop_type failed: unknown result"); + } + + public function get_type_all($name) + { + $this->send_get_type_all($name); + return $this->recv_get_type_all(); + } + + public function send_get_type_all($name) + { + $args = new \metastore\ThriftHiveMetastore_get_type_all_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_type_all', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_type_all', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_type_all() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_type_all_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_type_all_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_type_all failed: unknown result"); + } + + public function get_fields($db_name, $table_name) + { + $this->send_get_fields($db_name, $table_name); + return $this->recv_get_fields(); + } + + public function send_get_fields($db_name, $table_name) + { + $args = new \metastore\ThriftHiveMetastore_get_fields_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_fields', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_fields', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_fields() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_fields_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_fields_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("get_fields failed: unknown result"); + } + + public function get_schema($db_name, $table_name) + { + $this->send_get_schema($db_name, $table_name); + return $this->recv_get_schema(); + } + + public function send_get_schema($db_name, $table_name) + { + $args = new \metastore\ThriftHiveMetastore_get_schema_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_schema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_schema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_schema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_schema_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_schema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("get_schema failed: unknown result"); + } + + public function create_table(\metastore\Table $tbl) + { + $this->send_create_table($tbl); + $this->recv_create_table(); + } + + public function send_create_table(\metastore\Table $tbl) + { + $args = new \metastore\ThriftHiveMetastore_create_table_args(); + $args->tbl = $tbl; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_table_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_create_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + return; + } + + public function create_table_with_environment_context(\metastore\Table $tbl, \metastore\EnvironmentContext $environment_context) + { + $this->send_create_table_with_environment_context($tbl, $environment_context); + $this->recv_create_table_with_environment_context(); + } + + public function send_create_table_with_environment_context(\metastore\Table $tbl, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_create_table_with_environment_context_args(); + $args->tbl = $tbl; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_table_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_table_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_table_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_table_with_environment_context_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_create_table_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + return; + } + + public function drop_table($dbname, $name, $deleteData) + { + $this->send_drop_table($dbname, $name, $deleteData); + $this->recv_drop_table(); + } + + public function send_drop_table($dbname, $name, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_table_args(); + $args->dbname = $dbname; + $args->name = $name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_table_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_tables($db_name, $pattern) + { + $this->send_get_tables($db_name, $pattern); + return $this->recv_get_tables(); + } + + public function send_get_tables($db_name, $pattern) + { + $args = new \metastore\ThriftHiveMetastore_get_tables_args(); + $args->db_name = $db_name; + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_tables', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_tables() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_tables_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_tables_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_tables failed: unknown result"); + } + + public function get_all_tables($db_name) + { + $this->send_get_all_tables($db_name); + return $this->recv_get_all_tables(); + } + + public function send_get_all_tables($db_name) + { + $args = new \metastore\ThriftHiveMetastore_get_all_tables_args(); + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_tables', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_tables() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_tables_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_all_tables_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_all_tables failed: unknown result"); + } + + public function get_table($dbname, $tbl_name) + { + $this->send_get_table($dbname, $tbl_name); + return $this->recv_get_table(); + } + + public function send_get_table($dbname, $tbl_name) + { + $args = new \metastore\ThriftHiveMetastore_get_table_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_table failed: unknown result"); + } + + public function get_table_objects_by_name($dbname, $tbl_names) + { + $this->send_get_table_objects_by_name($dbname, $tbl_names); + return $this->recv_get_table_objects_by_name(); + } + + public function send_get_table_objects_by_name($dbname, $tbl_names) + { + $args = new \metastore\ThriftHiveMetastore_get_table_objects_by_name_args(); + $args->dbname = $dbname; + $args->tbl_names = $tbl_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_objects_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_objects_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_objects_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_objects_by_name_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_table_objects_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("get_table_objects_by_name failed: unknown result"); + } + + public function get_table_names_by_filter($dbname, $filter, $max_tables) + { + $this->send_get_table_names_by_filter($dbname, $filter, $max_tables); + return $this->recv_get_table_names_by_filter(); + } + + public function send_get_table_names_by_filter($dbname, $filter, $max_tables) + { + $args = new \metastore\ThriftHiveMetastore_get_table_names_by_filter_args(); + $args->dbname = $dbname; + $args->filter = $filter; + $args->max_tables = $max_tables; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_names_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_names_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_names_by_filter() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_names_by_filter_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_table_names_by_filter_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("get_table_names_by_filter failed: unknown result"); + } + + public function alter_table($dbname, $tbl_name, \metastore\Table $new_tbl) + { + $this->send_alter_table($dbname, $tbl_name, $new_tbl); + $this->recv_alter_table(); + } + + public function send_alter_table($dbname, $tbl_name, \metastore\Table $new_tbl) + { + $args = new \metastore\ThriftHiveMetastore_alter_table_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $args->new_tbl = $new_tbl; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_table_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function alter_table_with_environment_context($dbname, $tbl_name, \metastore\Table $new_tbl, \metastore\EnvironmentContext $environment_context) + { + $this->send_alter_table_with_environment_context($dbname, $tbl_name, $new_tbl, $environment_context); + $this->recv_alter_table_with_environment_context(); + } + + public function send_alter_table_with_environment_context($dbname, $tbl_name, \metastore\Table $new_tbl, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_alter_table_with_environment_context_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $args->new_tbl = $new_tbl; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_table_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_table_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_table_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_table_with_environment_context_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_table_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function add_partition(\metastore\Partition $new_part) + { + $this->send_add_partition($new_part); + return $this->recv_add_partition(); + } + + public function send_add_partition(\metastore\Partition $new_part) + { + $args = new \metastore\ThriftHiveMetastore_add_partition_args(); + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partition_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_add_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("add_partition failed: unknown result"); + } + + public function add_partition_with_environment_context(\metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $this->send_add_partition_with_environment_context($new_part, $environment_context); + return $this->recv_add_partition_with_environment_context(); + } + + public function send_add_partition_with_environment_context(\metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_add_partition_with_environment_context_args(); + $args->new_part = $new_part; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partition_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partition_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partition_with_environment_context_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_add_partition_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("add_partition_with_environment_context failed: unknown result"); + } + + public function add_partitions($new_parts) + { + $this->send_add_partitions($new_parts); + return $this->recv_add_partitions(); + } + + public function send_add_partitions($new_parts) + { + $args = new \metastore\ThriftHiveMetastore_add_partitions_args(); + $args->new_parts = $new_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partitions() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partitions_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_add_partitions_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("add_partitions failed: unknown result"); + } + + public function append_partition($db_name, $tbl_name, $part_vals) + { + $this->send_append_partition($db_name, $tbl_name, $part_vals); + return $this->recv_append_partition(); + } + + public function send_append_partition($db_name, $tbl_name, $part_vals) + { + $args = new \metastore\ThriftHiveMetastore_append_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_append_partition_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_append_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("append_partition failed: unknown result"); + } + + public function append_partition_by_name($db_name, $tbl_name, $part_name) + { + $this->send_append_partition_by_name($db_name, $tbl_name, $part_name); + return $this->recv_append_partition_by_name(); + } + + public function send_append_partition_by_name($db_name, $tbl_name, $part_name) + { + $args = new \metastore\ThriftHiveMetastore_append_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_append_partition_by_name_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_append_partition_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("append_partition_by_name failed: unknown result"); + } + + public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData) + { + $this->send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData); + return $this->recv_drop_partition(); + } + + public function send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_partition_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("drop_partition failed: unknown result"); + } + + public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) + { + $this->send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData); + return $this->recv_drop_partition_by_name(); + } + + public function send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_partition_by_name_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_partition_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("drop_partition_by_name failed: unknown result"); + } + + public function get_partition($db_name, $tbl_name, $part_vals) + { + $this->send_get_partition($db_name, $tbl_name, $part_vals); + return $this->recv_get_partition(); + } + + public function send_get_partition($db_name, $tbl_name, $part_vals) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partition failed: unknown result"); + } + + public function get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $this->send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names); + return $this->recv_get_partition_with_auth(); + } + + public function send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_with_auth() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_with_auth_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partition_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partition_with_auth failed: unknown result"); + } + + public function get_partition_by_name($db_name, $tbl_name, $part_name) + { + $this->send_get_partition_by_name($db_name, $tbl_name, $part_name); + return $this->recv_get_partition_by_name(); + } + + public function send_get_partition_by_name($db_name, $tbl_name, $part_name) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_by_name_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partition_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partition_by_name failed: unknown result"); + } + + public function get_partitions($db_name, $tbl_name, $max_parts) + { + $this->send_get_partitions($db_name, $tbl_name, $max_parts); + return $this->recv_get_partitions(); + } + + public function send_get_partitions($db_name, $tbl_name, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partitions failed: unknown result"); + } + + public function get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_with_auth(); + } + + public function send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_with_auth() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_with_auth_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partitions_with_auth failed: unknown result"); + } + + public function get_partition_names($db_name, $tbl_name, $max_parts) + { + $this->send_get_partition_names($db_name, $tbl_name, $max_parts); + return $this->recv_get_partition_names(); + } + + public function send_get_partition_names($db_name, $tbl_name, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partition_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partition_names failed: unknown result"); + } + + public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $this->send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts); + return $this->recv_get_partitions_ps(); + } + + public function send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_ps_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_ps_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_ps_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partitions_ps failed: unknown result"); + } + + public function get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_ps_with_auth(); + } + + public function send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_ps_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps_with_auth() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_ps_with_auth_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_ps_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partitions_ps_with_auth failed: unknown result"); + } + + public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); + return $this->recv_get_partition_names_ps(); + } + + public function send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_names_ps_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_names_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_names_ps', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_names_ps() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_names_ps_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partition_names_ps_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partition_names_ps failed: unknown result"); + } + + public function get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $this->send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts); + return $this->recv_get_partitions_by_filter(); + } + + public function send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_by_filter_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->filter = $filter; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_by_filter() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_by_filter_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_by_filter_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partitions_by_filter failed: unknown result"); + } + + public function get_partitions_by_names($db_name, $tbl_name, $names) + { + $this->send_get_partitions_by_names($db_name, $tbl_name, $names); + return $this->recv_get_partitions_by_names(); + } + + public function send_get_partitions_by_names($db_name, $tbl_name, $names) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_by_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->names = $names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_by_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_by_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_by_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_by_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_partitions_by_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_partitions_by_names failed: unknown result"); + } + + public function alter_partition($db_name, $tbl_name, \metastore\Partition $new_part) + { + $this->send_alter_partition($db_name, $tbl_name, $new_part); + $this->recv_alter_partition(); + } + + public function send_alter_partition($db_name, $tbl_name, \metastore\Partition $new_part) + { + $args = new \metastore\ThriftHiveMetastore_alter_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partition_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function alter_partitions($db_name, $tbl_name, $new_parts) + { + $this->send_alter_partitions($db_name, $tbl_name, $new_parts); + $this->recv_alter_partitions(); + } + + public function send_alter_partitions($db_name, $tbl_name, $new_parts) + { + $args = new \metastore\ThriftHiveMetastore_alter_partitions_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_parts = $new_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partitions() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partitions_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_partitions_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function alter_partition_with_environment_context($db_name, $tbl_name, \metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $this->send_alter_partition_with_environment_context($db_name, $tbl_name, $new_part, $environment_context); + $this->recv_alter_partition_with_environment_context(); + } + + public function send_alter_partition_with_environment_context($db_name, $tbl_name, \metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_alter_partition_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_part = $new_part; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partition_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partition_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partition_with_environment_context_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_partition_with_environment_context_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function rename_partition($db_name, $tbl_name, $part_vals, \metastore\Partition $new_part) + { + $this->send_rename_partition($db_name, $tbl_name, $part_vals, $new_part); + $this->recv_rename_partition(); + } + + public function send_rename_partition($db_name, $tbl_name, $part_vals, \metastore\Partition $new_part) + { + $args = new \metastore\ThriftHiveMetastore_rename_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'rename_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('rename_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_rename_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_rename_partition_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_rename_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function get_config_value($name, $defaultValue) + { + $this->send_get_config_value($name, $defaultValue); + return $this->recv_get_config_value(); + } + + public function send_get_config_value($name, $defaultValue) + { + $args = new \metastore\ThriftHiveMetastore_get_config_value_args(); + $args->name = $name; + $args->defaultValue = $defaultValue; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_config_value', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_config_value', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_config_value() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_config_value_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_config_value_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_config_value failed: unknown result"); + } + + public function partition_name_to_vals($part_name) + { + $this->send_partition_name_to_vals($part_name); + return $this->recv_partition_name_to_vals(); + } + + public function send_partition_name_to_vals($part_name) + { + $args = new \metastore\ThriftHiveMetastore_partition_name_to_vals_args(); + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_to_vals', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_to_vals', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_to_vals() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_partition_name_to_vals_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_partition_name_to_vals_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("partition_name_to_vals failed: unknown result"); + } + + public function partition_name_to_spec($part_name) + { + $this->send_partition_name_to_spec($part_name); + return $this->recv_partition_name_to_spec(); + } + + public function send_partition_name_to_spec($part_name) + { + $args = new \metastore\ThriftHiveMetastore_partition_name_to_spec_args(); + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_to_spec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_to_spec', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_to_spec() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_partition_name_to_spec_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_partition_name_to_spec_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("partition_name_to_spec failed: unknown result"); + } + + public function markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $this->send_markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType); + $this->recv_markPartitionForEvent(); + } + + public function send_markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $args = new \metastore\ThriftHiveMetastore_markPartitionForEvent_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->eventType = $eventType; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'markPartitionForEvent', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('markPartitionForEvent', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_markPartitionForEvent() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_markPartitionForEvent_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_markPartitionForEvent_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + if ($result->o5 !== null) { + throw $result->o5; + } + if ($result->o6 !== null) { + throw $result->o6; + } + return; + } + + public function isPartitionMarkedForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $this->send_isPartitionMarkedForEvent($db_name, $tbl_name, $part_vals, $eventType); + return $this->recv_isPartitionMarkedForEvent(); + } + + public function send_isPartitionMarkedForEvent($db_name, $tbl_name, $part_vals, $eventType) + { + $args = new \metastore\ThriftHiveMetastore_isPartitionMarkedForEvent_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->eventType = $eventType; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'isPartitionMarkedForEvent', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('isPartitionMarkedForEvent', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_isPartitionMarkedForEvent() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_isPartitionMarkedForEvent_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_isPartitionMarkedForEvent_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + if ($result->o5 !== null) { + throw $result->o5; + } + if ($result->o6 !== null) { + throw $result->o6; + } + throw new \Exception("isPartitionMarkedForEvent failed: unknown result"); + } + + public function add_index(\metastore\Index $new_index, \metastore\Table $index_table) + { + $this->send_add_index($new_index, $index_table); + return $this->recv_add_index(); + } + + public function send_add_index(\metastore\Index $new_index, \metastore\Table $index_table) + { + $args = new \metastore\ThriftHiveMetastore_add_index_args(); + $args->new_index = $new_index; + $args->index_table = $index_table; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_index', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_index() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_index_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_add_index_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new \Exception("add_index failed: unknown result"); + } + + public function alter_index($dbname, $base_tbl_name, $idx_name, \metastore\Index $new_idx) + { + $this->send_alter_index($dbname, $base_tbl_name, $idx_name, $new_idx); + $this->recv_alter_index(); + } + + public function send_alter_index($dbname, $base_tbl_name, $idx_name, \metastore\Index $new_idx) + { + $args = new \metastore\ThriftHiveMetastore_alter_index_args(); + $args->dbname = $dbname; + $args->base_tbl_name = $base_tbl_name; + $args->idx_name = $idx_name; + $args->new_idx = $new_idx; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_index', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_index() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_index_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_alter_index_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) + { + $this->send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData); + return $this->recv_drop_index_by_name(); + } + + public function send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) + { + $args = new \metastore\ThriftHiveMetastore_drop_index_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->index_name = $index_name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_index_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_index_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_index_by_name_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_index_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("drop_index_by_name failed: unknown result"); + } + + public function get_index_by_name($db_name, $tbl_name, $index_name) + { + $this->send_get_index_by_name($db_name, $tbl_name, $index_name); + return $this->recv_get_index_by_name(); + } + + public function send_get_index_by_name($db_name, $tbl_name, $index_name) + { + $args = new \metastore\ThriftHiveMetastore_get_index_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->index_name = $index_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_index_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_index_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_index_by_name_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_index_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_index_by_name failed: unknown result"); + } + + public function get_indexes($db_name, $tbl_name, $max_indexes) + { + $this->send_get_indexes($db_name, $tbl_name, $max_indexes); + return $this->recv_get_indexes(); + } + + public function send_get_indexes($db_name, $tbl_name, $max_indexes) + { + $args = new \metastore\ThriftHiveMetastore_get_indexes_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_indexes = $max_indexes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_indexes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_indexes', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_indexes() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_indexes_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_indexes_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_indexes failed: unknown result"); + } + + public function get_index_names($db_name, $tbl_name, $max_indexes) + { + $this->send_get_index_names($db_name, $tbl_name, $max_indexes); + return $this->recv_get_index_names(); + } + + public function send_get_index_names($db_name, $tbl_name, $max_indexes) + { + $args = new \metastore\ThriftHiveMetastore_get_index_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_indexes = $max_indexes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_index_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_index_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_index_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_index_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_index_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new \Exception("get_index_names failed: unknown result"); + } + + public function create_role(\metastore\Role $role) + { + $this->send_create_role($role); + return $this->recv_create_role(); + } + + public function send_create_role(\metastore\Role $role) + { + $args = new \metastore\ThriftHiveMetastore_create_role_args(); + $args->role = $role; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_create_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("create_role failed: unknown result"); + } + + public function drop_role($role_name) + { + $this->send_drop_role($role_name); + return $this->recv_drop_role(); + } + + public function send_drop_role($role_name) + { + $args = new \metastore\ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_drop_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("drop_role failed: unknown result"); + } + + public function get_role_names() + { + $this->send_get_role_names(); + return $this->recv_get_role_names(); + } + + public function send_get_role_names() + { + $args = new \metastore\ThriftHiveMetastore_get_role_names_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_role_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_role_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_role_names failed: unknown result"); + } + + public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + { + $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + return $this->recv_grant_role(); + } + + public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + { + $args = new \metastore\ThriftHiveMetastore_grant_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->grantor = $grantor; + $args->grantorType = $grantorType; + $args->grant_option = $grant_option; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_grant_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("grant_role failed: unknown result"); + } + + public function revoke_role($role_name, $principal_name, $principal_type) + { + $this->send_revoke_role($role_name, $principal_name, $principal_type); + return $this->recv_revoke_role(); + } + + public function send_revoke_role($role_name, $principal_name, $principal_type) + { + $args = new \metastore\ThriftHiveMetastore_revoke_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_revoke_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("revoke_role failed: unknown result"); + } + + public function list_roles($principal_name, $principal_type) + { + $this->send_list_roles($principal_name, $principal_type); + return $this->recv_list_roles(); + } + + public function send_list_roles($principal_name, $principal_type) + { + $args = new \metastore\ThriftHiveMetastore_list_roles_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_roles() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_list_roles_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("list_roles failed: unknown result"); + } + + public function get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) + { + $this->send_get_privilege_set($hiveObject, $user_name, $group_names); + return $this->recv_get_privilege_set(); + } + + public function send_get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_get_privilege_set_args(); + $args->hiveObject = $hiveObject; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_privilege_set() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_privilege_set failed: unknown result"); + } + + public function list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) + { + $this->send_list_privileges($principal_name, $principal_type, $hiveObject); + return $this->recv_list_privileges(); + } + + public function send_list_privileges($principal_name, $principal_type, \metastore\HiveObjectRef $hiveObject) + { + $args = new \metastore\ThriftHiveMetastore_list_privileges_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->hiveObject = $hiveObject; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_list_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_list_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("list_privileges failed: unknown result"); + } + + public function grant_privileges(\metastore\PrivilegeBag $privileges) + { + $this->send_grant_privileges($privileges); + return $this->recv_grant_privileges(); + } + + public function send_grant_privileges(\metastore\PrivilegeBag $privileges) + { + $args = new \metastore\ThriftHiveMetastore_grant_privileges_args(); + $args->privileges = $privileges; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_grant_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("grant_privileges failed: unknown result"); + } + + public function revoke_privileges(\metastore\PrivilegeBag $privileges) + { + $this->send_revoke_privileges($privileges); + return $this->recv_revoke_privileges(); + } + + public function send_revoke_privileges(\metastore\PrivilegeBag $privileges) + { + $args = new \metastore\ThriftHiveMetastore_revoke_privileges_args(); + $args->privileges = $privileges; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_revoke_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_revoke_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("revoke_privileges failed: unknown result"); + } + + public function set_ugi($user_name, $group_names) + { + $this->send_set_ugi($user_name, $group_names); + return $this->recv_set_ugi(); + } + + public function send_set_ugi($user_name, $group_names) + { + $args = new \metastore\ThriftHiveMetastore_set_ugi_args(); + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_ugi() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_set_ugi_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_set_ugi_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("set_ugi failed: unknown result"); + } + + public function get_delegation_token($token_owner, $renewer_kerberos_principal_name) + { + $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name); + return $this->recv_get_delegation_token(); + } + + public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name) + { + $args = new \metastore\ThriftHiveMetastore_get_delegation_token_args(); + $args->token_owner = $token_owner; + $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_delegation_token() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_delegation_token_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_get_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("get_delegation_token failed: unknown result"); + } + + public function renew_delegation_token($token_str_form) + { + $this->send_renew_delegation_token($token_str_form); + return $this->recv_renew_delegation_token(); + } + + public function send_renew_delegation_token($token_str_form) + { + $args = new \metastore\ThriftHiveMetastore_renew_delegation_token_args(); + $args->token_str_form = $token_str_form; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_renew_delegation_token() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_renew_delegation_token_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_renew_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new \Exception("renew_delegation_token failed: unknown result"); + } + + public function cancel_delegation_token($token_str_form) + { + $this->send_cancel_delegation_token($token_str_form); + $this->recv_cancel_delegation_token(); + } + + public function send_cancel_delegation_token($token_str_form) + { + $args = new \metastore\ThriftHiveMetastore_cancel_delegation_token_args(); + $args->token_str_form = $token_str_form; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_cancel_delegation_token() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_cancel_delegation_token_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_cancel_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHiveMetastore_create_database_args { + static $_TSPEC; + + public $database = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => '\metastore\Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->database = new \metastore\Database(); + $xfer += $this->database->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args'); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_database_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_database_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Database', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Database(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_database_args { + static $_TSPEC; + + public $name = null; + public $deleteData = null; + public $cascade = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'cascade', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['cascade'])) { + $this->cascade = $vals['cascade']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->cascade); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + if ($this->cascade !== null) { + $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 3); + $xfer += $output->writeBool($this->cascade); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_databases_args { + static $_TSPEC; + + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args'); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size220 = 0; + $_etype223 = 0; + $xfer += $input->readListBegin($_etype223, $_size220); + for ($_i224 = 0; $_i224 < $_size220; ++$_i224) + { + $elem225 = null; + $xfer += $input->readString($elem225); + $this->success []= $elem225; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter226) + { + $xfer += $output->writeString($iter226); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_databases_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size227 = 0; + $_etype230 = 0; + $xfer += $input->readListBegin($_etype230, $_size227); + for ($_i231 = 0; $_i231 < $_size227; ++$_i231) + { + $elem232 = null; + $xfer += $input->readString($elem232); + $this->success []= $elem232; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter233) + { + $xfer += $output->writeString($iter233); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_database_args { + static $_TSPEC; + + public $dbname = null; + public $db = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'db', + 'type' => TType::STRUCT, + 'class' => '\metastore\Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['db'])) { + $this->db = $vals['db']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->db = new \metastore\Database(); + $xfer += $this->db->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->db !== null) { + if (!is_object($this->db)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('db', TType::STRUCT, 2); + $xfer += $this->db->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Type(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->type = new \metastore\Type(); + $xfer += $this->type->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); + if ($this->type !== null) { + if (!is_object($this->type)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); + $xfer += $this->type->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 1); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_all_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_type_all_result { + static $_TSPEC; + + public $success = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Type', + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::MAP) { + $this->success = array(); + $_size234 = 0; + $_ktype235 = 0; + $_vtype236 = 0; + $xfer += $input->readMapBegin($_ktype235, $_vtype236, $_size234); + for ($_i238 = 0; $_i238 < $_size234; ++$_i238) + { + $key239 = ''; + $val240 = new \metastore\Type(); + $xfer += $input->readString($key239); + $val240 = new \metastore\Type(); + $xfer += $val240->read($input); + $this->success[$key239] = $val240; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + { + foreach ($this->success as $kiter241 => $viter242) + { + $xfer += $output->writeString($kiter241); + $xfer += $viter242->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_fields_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_fields_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size243 = 0; + $_etype246 = 0; + $xfer += $input->readListBegin($_etype246, $_size243); + for ($_i247 = 0; $_i247 < $_size243; ++$_i247) + { + $elem248 = null; + $elem248 = new \metastore\FieldSchema(); + $xfer += $elem248->read($input); + $this->success []= $elem248; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter249) + { + $xfer += $iter249->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_schema_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_schema_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size250 = 0; + $_etype253 = 0; + $xfer += $input->readListBegin($_etype253, $_size250); + for ($_i254 = 0; $_i254 < $_size250; ++$_i254) + { + $elem255 = null; + $elem255 = new \metastore\FieldSchema(); + $xfer += $elem255->read($input); + $this->success []= $elem255; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter256) + { + $xfer += $iter256->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_args { + static $_TSPEC; + + public $tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->tbl = new \metastore\Table(); + $xfer += $this->tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\NoSuchObjectException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_with_environment_context_args { + static $_TSPEC; + + public $tbl = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + 2 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_with_environment_context_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->tbl = new \metastore\Table(); + $xfer += $this->tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_with_environment_context_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_with_environment_context_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\NoSuchObjectException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_table_args { + static $_TSPEC; + + public $dbname = null; + public $name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_table_result { + static $_TSPEC; + + public $o1 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_tables_args { + static $_TSPEC; + + public $db_name = null; + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_tables_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size257 = 0; + $_etype260 = 0; + $xfer += $input->readListBegin($_etype260, $_size257); + for ($_i261 = 0; $_i261 < $_size257; ++$_i261) + { + $elem262 = null; + $xfer += $input->readString($elem262); + $this->success []= $elem262; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter263) + { + $xfer += $output->writeString($iter263); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_tables_args { + static $_TSPEC; + + public $db_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_tables_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size264 = 0; + $_etype267 = 0; + $xfer += $input->readListBegin($_etype267, $_size264); + for ($_i268 = 0; $_i268 < $_size264; ++$_i268) + { + $elem269 = null; + $xfer += $input->readString($elem269); + $this->success []= $elem269; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter270) + { + $xfer += $output->writeString($iter270); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Table(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_objects_by_name_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_names'])) { + $this->tbl_names = $vals['tbl_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_objects_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->tbl_names = array(); + $_size271 = 0; + $_etype274 = 0; + $xfer += $input->readListBegin($_etype274, $_size271); + for ($_i275 = 0; $_i275 < $_size271; ++$_i275) + { + $elem276 = null; + $xfer += $input->readString($elem276); + $this->tbl_names []= $elem276; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_names !== null) { + if (!is_array($this->tbl_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->tbl_names)); + { + foreach ($this->tbl_names as $iter277) + { + $xfer += $output->writeString($iter277); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_objects_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_objects_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size278 = 0; + $_etype281 = 0; + $xfer += $input->readListBegin($_etype281, $_size278); + for ($_i282 = 0; $_i282 < $_size278; ++$_i282) + { + $elem283 = null; + $elem283 = new \metastore\Table(); + $xfer += $elem283->read($input); + $this->success []= $elem283; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter284) + { + $xfer += $iter284->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_names_by_filter_args { + static $_TSPEC; + + public $dbname = null; + public $filter = null; + public $max_tables = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'filter', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_tables', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_tables'])) { + $this->max_tables = $vals['max_tables']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_names_by_filter_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_tables); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_tables !== null) { + $xfer += $output->writeFieldBegin('max_tables', TType::I16, 3); + $xfer += $output->writeI16($this->max_tables); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_names_by_filter_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_names_by_filter_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size285 = 0; + $_etype288 = 0; + $xfer += $input->readListBegin($_etype288, $_size285); + for ($_i289 = 0; $_i289 < $_size285; ++$_i289) + { + $elem290 = null; + $xfer += $input->readString($elem290); + $this->success []= $elem290; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter291) + { + $xfer += $output->writeString($iter291); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new \metastore\Table(); + $xfer += $this->new_tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_with_environment_context_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + 4 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new \metastore\Table(); + $xfer += $this->new_tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_with_environment_context_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_with_environment_context_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_args { + static $_TSPEC; + + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_with_environment_context_args { + static $_TSPEC; + + public $new_part = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 2 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_with_environment_context_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partition_with_environment_context_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_with_environment_context_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partitions_args { + static $_TSPEC; + + public $new_parts = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partitions_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->new_parts = array(); + $_size292 = 0; + $_etype295 = 0; + $xfer += $input->readListBegin($_etype295, $_size292); + for ($_i296 = 0; $_i296 < $_size292; ++$_i296) + { + $elem297 = null; + $elem297 = new \metastore\Partition(); + $xfer += $elem297->read($input); + $this->new_parts []= $elem297; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args'); + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + { + foreach ($this->new_parts as $iter298) + { + $xfer += $iter298->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partitions_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partitions_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size299 = 0; + $_etype302 = 0; + $xfer += $input->readListBegin($_etype302, $_size299); + for ($_i303 = 0; $_i303 < $_size299; ++$_i303) + { + $elem304 = null; + $xfer += $input->readString($elem304); + $this->part_vals []= $elem304; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter305) + { + $xfer += $output->writeString($iter305); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size306 = 0; + $_etype309 = 0; + $xfer += $input->readListBegin($_etype309, $_size306); + for ($_i310 = 0; $_i310 < $_size306; ++$_i310) + { + $elem311 = null; + $xfer += $input->readString($elem311); + $this->part_vals []= $elem311; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter312) + { + $xfer += $output->writeString($iter312); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + { + $elem318 = null; + $xfer += $input->readString($elem318); + $this->part_vals []= $elem318; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter319) + { + $xfer += $output->writeString($iter319); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_with_auth_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_with_auth_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) + { + $elem325 = null; + $xfer += $input->readString($elem325); + $this->part_vals []= $elem325; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size326 = 0; + $_etype329 = 0; + $xfer += $input->readListBegin($_etype329, $_size326); + for ($_i330 = 0; $_i330 < $_size326; ++$_i330) + { + $elem331 = null; + $xfer += $input->readString($elem331); + $this->group_names []= $elem331; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter332) + { + $xfer += $output->writeString($iter332); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter333) + { + $xfer += $output->writeString($iter333); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_with_auth_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_with_auth_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size334 = 0; + $_etype337 = 0; + $xfer += $input->readListBegin($_etype337, $_size334); + for ($_i338 = 0; $_i338 < $_size334; ++$_i338) + { + $elem339 = null; + $elem339 = new \metastore\Partition(); + $xfer += $elem339->read($input); + $this->success []= $elem339; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter340) + { + $xfer += $iter340->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_with_auth_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size341 = 0; + $_etype344 = 0; + $xfer += $input->readListBegin($_etype344, $_size341); + for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + { + $elem346 = null; + $xfer += $input->readString($elem346); + $this->group_names []= $elem346; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter347) + { + $xfer += $output->writeString($iter347); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_with_auth_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size348 = 0; + $_etype351 = 0; + $xfer += $input->readListBegin($_etype351, $_size348); + for ($_i352 = 0; $_i352 < $_size348; ++$_i352) + { + $elem353 = null; + $elem353 = new \metastore\Partition(); + $xfer += $elem353->read($input); + $this->success []= $elem353; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter354) + { + $xfer += $iter354->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_result { + static $_TSPEC; + + public $success = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size355 = 0; + $_etype358 = 0; + $xfer += $input->readListBegin($_etype358, $_size355); + for ($_i359 = 0; $_i359 < $_size355; ++$_i359) + { + $elem360 = null; + $xfer += $input->readString($elem360); + $this->success []= $elem360; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter361) + { + $xfer += $output->writeString($iter361); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size362 = 0; + $_etype365 = 0; + $xfer += $input->readListBegin($_etype365, $_size362); + for ($_i366 = 0; $_i366 < $_size362; ++$_i366) + { + $elem367 = null; + $xfer += $input->readString($elem367); + $this->part_vals []= $elem367; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter368) + { + $xfer += $output->writeString($iter368); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size369 = 0; + $_etype372 = 0; + $xfer += $input->readListBegin($_etype372, $_size369); + for ($_i373 = 0; $_i373 < $_size369; ++$_i373) + { + $elem374 = null; + $elem374 = new \metastore\Partition(); + $xfer += $elem374->read($input); + $this->success []= $elem374; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter375) + { + $xfer += $iter375->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_with_auth_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 5 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size376 = 0; + $_etype379 = 0; + $xfer += $input->readListBegin($_etype379, $_size376); + for ($_i380 = 0; $_i380 < $_size376; ++$_i380) + { + $elem381 = null; + $xfer += $input->readString($elem381); + $this->part_vals []= $elem381; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size382 = 0; + $_etype385 = 0; + $xfer += $input->readListBegin($_etype385, $_size382); + for ($_i386 = 0; $_i386 < $_size382; ++$_i386) + { + $elem387 = null; + $xfer += $input->readString($elem387); + $this->group_names []= $elem387; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter388) + { + $xfer += $output->writeString($iter388); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter389) + { + $xfer += $output->writeString($iter389); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size390 = 0; + $_etype393 = 0; + $xfer += $input->readListBegin($_etype393, $_size390); + for ($_i394 = 0; $_i394 < $_size390; ++$_i394) + { + $elem395 = null; + $elem395 = new \metastore\Partition(); + $xfer += $elem395->read($input); + $this->success []= $elem395; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter396) + { + $xfer += $iter396->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_ps_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_ps_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size397 = 0; + $_etype400 = 0; + $xfer += $input->readListBegin($_etype400, $_size397); + for ($_i401 = 0; $_i401 < $_size397; ++$_i401) + { + $elem402 = null; + $xfer += $input->readString($elem402); + $this->part_vals []= $elem402; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter403) + { + $xfer += $output->writeString($iter403); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_names_ps_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_ps_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size404 = 0; + $_etype407 = 0; + $xfer += $input->readListBegin($_etype407, $_size404); + for ($_i408 = 0; $_i408 < $_size404; ++$_i408) + { + $elem409 = null; + $xfer += $input->readString($elem409); + $this->success []= $elem409; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter410) + { + $xfer += $output->writeString($iter410); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_filter_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $filter = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'filter', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_filter_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size411 = 0; + $_etype414 = 0; + $xfer += $input->readListBegin($_etype414, $_size411); + for ($_i415 = 0; $_i415 < $_size411; ++$_i415) + { + $elem416 = null; + $elem416 = new \metastore\Partition(); + $xfer += $elem416->read($input); + $this->success []= $elem416; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter417) + { + $xfer += $iter417->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['names'])) { + $this->names = $vals['names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->names = array(); + $_size418 = 0; + $_etype421 = 0; + $xfer += $input->readListBegin($_etype421, $_size418); + for ($_i422 = 0; $_i422 < $_size418; ++$_i422) + { + $elem423 = null; + $xfer += $input->readString($elem423); + $this->names []= $elem423; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->names !== null) { + if (!is_array($this->names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('names', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->names)); + { + foreach ($this->names as $iter424) + { + $xfer += $output->writeString($iter424); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_names_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size425 = 0; + $_etype428 = 0; + $xfer += $input->readListBegin($_etype428, $_size425); + for ($_i429 = 0; $_i429 < $_size425; ++$_i429) + { + $elem430 = null; + $elem430 = new \metastore\Partition(); + $xfer += $elem430->read($input); + $this->success []= $elem430; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter431) + { + $xfer += $iter431->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partitions_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_parts = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partitions_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->new_parts = array(); + $_size432 = 0; + $_etype435 = 0; + $xfer += $input->readListBegin($_etype435, $_size432); + for ($_i436 = 0; $_i436 < $_size432; ++$_i436) + { + $elem437 = null; + $elem437 = new \metastore\Partition(); + $xfer += $elem437->read($input); + $this->new_parts []= $elem437; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + { + foreach ($this->new_parts as $iter438) + { + $xfer += $iter438->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partitions_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partitions_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_with_environment_context_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_part = null; + public $environment_context = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + 4 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_with_environment_context_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->environment_context = new \metastore\EnvironmentContext(); + $xfer += $this->environment_context->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partition_with_environment_context_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_with_environment_context_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_rename_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_rename_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size439 = 0; + $_etype442 = 0; + $xfer += $input->readListBegin($_etype442, $_size439); + for ($_i443 = 0; $_i443 < $_size439; ++$_i443) + { + $elem444 = null; + $xfer += $input->readString($elem444); + $this->part_vals []= $elem444; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_part = new \metastore\Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter445) + { + $xfer += $output->writeString($iter445); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 4); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_rename_partition_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_rename_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_config_value_args { + static $_TSPEC; + + public $name = null; + public $defaultValue = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'defaultValue', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_config_value_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->defaultValue); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_config_value_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\ConfigValSecurityException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_config_value_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\ConfigValSecurityException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_vals_args { + static $_TSPEC; + + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_vals_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_vals_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_vals_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size446 = 0; + $_etype449 = 0; + $xfer += $input->readListBegin($_etype449, $_size446); + for ($_i450 = 0; $_i450 < $_size446; ++$_i450) + { + $elem451 = null; + $xfer += $input->readString($elem451); + $this->success []= $elem451; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter452) + { + $xfer += $output->writeString($iter452); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_spec_args { + static $_TSPEC; + + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_spec_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_to_spec_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_spec_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::MAP) { + $this->success = array(); + $_size453 = 0; + $_ktype454 = 0; + $_vtype455 = 0; + $xfer += $input->readMapBegin($_ktype454, $_vtype455, $_size453); + for ($_i457 = 0; $_i457 < $_size453; ++$_i457) + { + $key458 = ''; + $val459 = ''; + $xfer += $input->readString($key458); + $xfer += $input->readString($val459); + $this->success[$key458] = $val459; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + { + foreach ($this->success as $kiter460 => $viter461) + { + $xfer += $output->writeString($kiter460); + $xfer += $output->writeString($viter461); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_markPartitionForEvent_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $eventType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'eventType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_markPartitionForEvent_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size462 = 0; + $_ktype463 = 0; + $_vtype464 = 0; + $xfer += $input->readMapBegin($_ktype463, $_vtype464, $_size462); + for ($_i466 = 0; $_i466 < $_size462; ++$_i466) + { + $key467 = ''; + $val468 = ''; + $xfer += $input->readString($key467); + $xfer += $input->readString($val468); + $this->part_vals[$key467] = $val468; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $kiter469 => $viter470) + { + $xfer += $output->writeString($kiter469); + $xfer += $output->writeString($viter470); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_markPartitionForEvent_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + public $o5 = null; + public $o6 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 5 => array( + 'var' => 'o5', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownPartitionException', + ), + 6 => array( + 'var' => 'o6', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidPartitionException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + if (isset($vals['o5'])) { + $this->o5 = $vals['o5']; + } + if (isset($vals['o6'])) { + $this->o6 = $vals['o6']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_markPartitionForEvent_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\UnknownTableException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->o5 = new \metastore\UnknownPartitionException(); + $xfer += $this->o5->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->o6 = new \metastore\InvalidPartitionException(); + $xfer += $this->o6->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o5 !== null) { + $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); + $xfer += $this->o5->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o6 !== null) { + $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); + $xfer += $this->o6->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_isPartitionMarkedForEvent_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $eventType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'eventType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size471 = 0; + $_ktype472 = 0; + $_vtype473 = 0; + $xfer += $input->readMapBegin($_ktype472, $_vtype473, $_size471); + for ($_i475 = 0; $_i475 < $_size471; ++$_i475) + { + $key476 = ''; + $val477 = ''; + $xfer += $input->readString($key476); + $xfer += $input->readString($val477); + $this->part_vals[$key476] = $val477; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $kiter478 => $viter479) + { + $xfer += $output->writeString($kiter478); + $xfer += $output->writeString($viter479); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_isPartitionMarkedForEvent_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + public $o5 = null; + public $o6 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownDBException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownTableException', + ), + 5 => array( + 'var' => 'o5', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnknownPartitionException', + ), + 6 => array( + 'var' => 'o6', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidPartitionException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + if (isset($vals['o5'])) { + $this->o5 = $vals['o5']; + } + if (isset($vals['o6'])) { + $this->o6 = $vals['o6']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\UnknownTableException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->o5 = new \metastore\UnknownPartitionException(); + $xfer += $this->o5->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->o6 = new \metastore\InvalidPartitionException(); + $xfer += $this->o6->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o5 !== null) { + $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); + $xfer += $this->o5->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o6 !== null) { + $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); + $xfer += $this->o6->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_index_args { + static $_TSPEC; + + public $new_index = null; + public $index_table = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + 2 => array( + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; + } + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_index_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->new_index = new \metastore\Index(); + $xfer += $this->new_index->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->index_table = new \metastore\Table(); + $xfer += $this->index_table->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); + if ($this->new_index !== null) { + if (!is_object($this->new_index)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); + $xfer += $this->index_table->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_index_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_index_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_index_args { + static $_TSPEC; + + public $dbname = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'base_tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'idx_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'new_idx', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['base_tbl_name'])) { + $this->base_tbl_name = $vals['base_tbl_name']; + } + if (isset($vals['idx_name'])) { + $this->idx_name = $vals['idx_name']; + } + if (isset($vals['new_idx'])) { + $this->new_idx = $vals['new_idx']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_index_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->base_tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_idx = new \metastore\Index(); + $xfer += $this->new_idx->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->base_tbl_name !== null) { + $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->base_tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->idx_name !== null) { + $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); + $xfer += $output->writeString($this->idx_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_idx !== null) { + if (!is_object($this->new_idx)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_index_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_index_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_index_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_index_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_index_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_index_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_indexes_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_indexes = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_indexes_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_indexes_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Index', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_indexes_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size480 = 0; + $_etype483 = 0; + $xfer += $input->readListBegin($_etype483, $_size480); + for ($_i484 = 0; $_i484 < $_size480; ++$_i484) + { + $elem485 = null; + $elem485 = new \metastore\Index(); + $xfer += $elem485->read($input); + $this->success []= $elem485; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter486) + { + $xfer += $iter486->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_indexes = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_index_names_result { + static $_TSPEC; + + public $success = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size487 = 0; + $_etype490 = 0; + $xfer += $input->readListBegin($_etype490, $_size487); + for ($_i491 = 0; $_i491 < $_size487; ++$_i491) + { + $elem492 = null; + $xfer += $input->readString($elem492); + $this->success []= $elem492; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter493) + { + $xfer += $output->writeString($iter493); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_role_args { + static $_TSPEC; + + public $role = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role', + 'type' => TType::STRUCT, + 'class' => '\metastore\Role', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role'])) { + $this->role = $vals['role']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_role_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->role = new \metastore\Role(); + $xfer += $this->role->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_args'); + if ($this->role !== null) { + if (!is_object($this->role)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('role', TType::STRUCT, 1); + $xfer += $this->role->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_role_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_role_args { + static $_TSPEC; + + public $role_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_role_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->role_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_role_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_role_names_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_role_names_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_role_names_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_role_names_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_role_names_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size494 = 0; + $_etype497 = 0; + $xfer += $input->readListBegin($_etype497, $_size494); + for ($_i498 = 0; $_i498 < $_size494; ++$_i498) + { + $elem499 = null; + $xfer += $input->readString($elem499); + $this->success []= $elem499; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_role_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter500) + { + $xfer += $output->writeString($iter500); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_role_args { + static $_TSPEC; + + public $role_name = null; + public $principal_name = null; + public $principal_type = null; + public $grantor = null; + public $grantorType = null; + public $grant_option = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grant_option', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['grantorType'])) { + $this->grantorType = $vals['grantorType']; + } + if (isset($vals['grant_option'])) { + $this->grant_option = $vals['grant_option']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_role_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->role_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->grant_option); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 3); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 4); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 5); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grant_option !== null) { + $xfer += $output->writeFieldBegin('grant_option', TType::BOOL, 6); + $xfer += $output->writeBool($this->grant_option); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_role_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_role_args { + static $_TSPEC; + + public $role_name = null; + public $principal_name = null; + public $principal_type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'role_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_role_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->role_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 3); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_role_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_role_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_roles_args { + static $_TSPEC; + + public $principal_name = null; + public $principal_type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_roles_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 2); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_roles_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Role', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_roles_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size501 = 0; + $_etype504 = 0; + $xfer += $input->readListBegin($_etype504, $_size501); + for ($_i505 = 0; $_i505 < $_size501; ++$_i505) + { + $elem506 = null; + $elem506 = new \metastore\Role(); + $xfer += $elem506->read($input); + $this->success []= $elem506; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter507) + { + $xfer += $iter507->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_privilege_set_args { + static $_TSPEC; + + public $hiveObject = null; + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectRef', + ), + 2 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_privilege_set_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->hiveObject = new \metastore\HiveObjectRef(); + $xfer += $this->hiveObject->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size508 = 0; + $_etype511 = 0; + $xfer += $input->readListBegin($_etype511, $_size508); + for ($_i512 = 0; $_i512 < $_size508; ++$_i512) + { + $elem513 = null; + $xfer += $input->readString($elem513); + $this->group_names []= $elem513; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_privilege_set_args'); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter514) + { + $xfer += $output->writeString($iter514); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_privilege_set_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_privilege_set_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_privilege_set_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_privileges_args { + static $_TSPEC; + + public $principal_name = null; + public $principal_type = null; + public $hiveObject = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectRef', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_privileges_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->hiveObject = new \metastore\HiveObjectRef(); + $xfer += $this->hiveObject->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_privileges_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 2); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 3); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_list_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectPrivilege', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_list_privileges_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size515 = 0; + $_etype518 = 0; + $xfer += $input->readListBegin($_etype518, $_size515); + for ($_i519 = 0; $_i519 < $_size515; ++$_i519) + { + $elem520 = null; + $elem520 = new \metastore\HiveObjectPrivilege(); + $xfer += $elem520->read($input); + $this->success []= $elem520; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_privileges_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter521) + { + $xfer += $iter521->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_privileges_args { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeBag', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_privileges_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrivilegeBag(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_args'); + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 1); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_privileges_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_privileges_args { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeBag', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_privileges_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrivilegeBag(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_args'); + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 1); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_revoke_privileges_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_revoke_privileges_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_ugi_args { + static $_TSPEC; + + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_ugi_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size522 = 0; + $_etype525 = 0; + $xfer += $input->readListBegin($_etype525, $_size522); + for ($_i526 = 0; $_i526 < $_size522; ++$_i526) + { + $elem527 = null; + $xfer += $input->readString($elem527); + $this->group_names []= $elem527; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_ugi_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter528) + { + $xfer += $output->writeString($iter528); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_ugi_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_ugi_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size529 = 0; + $_etype532 = 0; + $xfer += $input->readListBegin($_etype532, $_size529); + for ($_i533 = 0; $_i533 < $_size529; ++$_i533) + { + $elem534 = null; + $xfer += $input->readString($elem534); + $this->success []= $elem534; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_set_ugi_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter535) + { + $xfer += $output->writeString($iter535); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_delegation_token_args { + static $_TSPEC; + + public $token_owner = null; + public $renewer_kerberos_principal_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_owner', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'renewer_kerberos_principal_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_owner'])) { + $this->token_owner = $vals['token_owner']; + } + if (isset($vals['renewer_kerberos_principal_name'])) { + $this->renewer_kerberos_principal_name = $vals['renewer_kerberos_principal_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_delegation_token_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->token_owner); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->renewer_kerberos_principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_delegation_token_args'); + if ($this->token_owner !== null) { + $xfer += $output->writeFieldBegin('token_owner', TType::STRING, 1); + $xfer += $output->writeString($this->token_owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->renewer_kerberos_principal_name !== null) { + $xfer += $output->writeFieldBegin('renewer_kerberos_principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->renewer_kerberos_principal_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_delegation_token_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_delegation_token_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_delegation_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_renew_delegation_token_args { + static $_TSPEC; + + public $token_str_form = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_str_form', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_str_form'])) { + $this->token_str_form = $vals['token_str_form']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_renew_delegation_token_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->token_str_form); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_renew_delegation_token_args'); + if ($this->token_str_form !== null) { + $xfer += $output->writeFieldBegin('token_str_form', TType::STRING, 1); + $xfer += $output->writeString($this->token_str_form); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_renew_delegation_token_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I64, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_renew_delegation_token_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_renew_delegation_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I64, 0); + $xfer += $output->writeI64($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cancel_delegation_token_args { + static $_TSPEC; + + public $token_str_form = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_str_form', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_str_form'])) { + $this->token_str_form = $vals['token_str_form']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cancel_delegation_token_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->token_str_form); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_cancel_delegation_token_args'); + if ($this->token_str_form !== null) { + $xfer += $output->writeFieldBegin('token_str_form', TType::STRING, 1); + $xfer += $output->writeString($this->token_str_form); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cancel_delegation_token_result { + static $_TSPEC; + + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cancel_delegation_token_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_cancel_delegation_token_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + + Index: metastore/src/gen/thrift/gen-php/metastore/Types.php =================================================================== --- metastore/src/gen/thrift/gen-php/metastore/Types.php (revision 0) +++ metastore/src/gen/thrift/gen-php/metastore/Types.php (revision 0) @@ -0,0 +1,4507 @@ + 'GLOBAL', + 2 => 'DATABASE', + 3 => 'TABLE', + 4 => 'PARTITION', + 5 => 'COLUMN', + ); +} + +final class PrincipalType { + const USER = 1; + const ROLE = 2; + const GROUP = 3; + static public $__names = array( + 1 => 'USER', + 2 => 'ROLE', + 3 => 'GROUP', + ); +} + +final class PartitionEventType { + const LOAD_DONE = 1; + static public $__names = array( + 1 => 'LOAD_DONE', + ); +} + +class Version { + static $_TSPEC; + + public $version = null; + public $comments = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'version', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'comments', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['version'])) { + $this->version = $vals['version']; + } + if (isset($vals['comments'])) { + $this->comments = $vals['comments']; + } + } + } + + public function getName() { + return 'Version'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->version); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comments); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Version'); + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::STRING, 1); + $xfer += $output->writeString($this->version); + $xfer += $output->writeFieldEnd(); + } + if ($this->comments !== null) { + $xfer += $output->writeFieldBegin('comments', TType::STRING, 2); + $xfer += $output->writeString($this->comments); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class FieldSchema { + static $_TSPEC; + + public $name = null; + public $type = null; + public $comment = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'comment', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['comment'])) { + $this->comment = $vals['comment']; + } + } + } + + public function getName() { + return 'FieldSchema'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comment); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('FieldSchema'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 2); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->comment !== null) { + $xfer += $output->writeFieldBegin('comment', TType::STRING, 3); + $xfer += $output->writeString($this->comment); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Type { + static $_TSPEC; + + public $name = null; + public $type1 = null; + public $type2 = null; + public $fields = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type1', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'type2', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'fields', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type1'])) { + $this->type1 = $vals['type1']; + } + if (isset($vals['type2'])) { + $this->type2 = $vals['type2']; + } + if (isset($vals['fields'])) { + $this->fields = $vals['fields']; + } + } + } + + public function getName() { + return 'Type'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type1); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type2); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->fields = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $elem5 = new \metastore\FieldSchema(); + $xfer += $elem5->read($input); + $this->fields []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Type'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type1 !== null) { + $xfer += $output->writeFieldBegin('type1', TType::STRING, 2); + $xfer += $output->writeString($this->type1); + $xfer += $output->writeFieldEnd(); + } + if ($this->type2 !== null) { + $xfer += $output->writeFieldBegin('type2', TType::STRING, 3); + $xfer += $output->writeString($this->type2); + $xfer += $output->writeFieldEnd(); + } + if ($this->fields !== null) { + if (!is_array($this->fields)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fields', TType::LST, 4); + { + $output->writeListBegin(TType::STRUCT, count($this->fields)); + { + foreach ($this->fields as $iter6) + { + $xfer += $iter6->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveObjectRef { + static $_TSPEC; + + public $objectType = null; + public $dbName = null; + public $objectName = null; + public $partValues = null; + public $columnName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'objectType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'objectName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partValues', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'columnName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['objectType'])) { + $this->objectType = $vals['objectType']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['objectName'])) { + $this->objectName = $vals['objectName']; + } + if (isset($vals['partValues'])) { + $this->partValues = $vals['partValues']; + } + if (isset($vals['columnName'])) { + $this->columnName = $vals['columnName']; + } + } + } + + public function getName() { + return 'HiveObjectRef'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->objectType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->objectName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->partValues = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->partValues []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->columnName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('HiveObjectRef'); + if ($this->objectType !== null) { + $xfer += $output->writeFieldBegin('objectType', TType::I32, 1); + $xfer += $output->writeI32($this->objectType); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->objectName !== null) { + $xfer += $output->writeFieldBegin('objectName', TType::STRING, 3); + $xfer += $output->writeString($this->objectName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partValues !== null) { + if (!is_array($this->partValues)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partValues', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->partValues)); + { + foreach ($this->partValues as $iter13) + { + $xfer += $output->writeString($iter13); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columnName !== null) { + $xfer += $output->writeFieldBegin('columnName', TType::STRING, 5); + $xfer += $output->writeString($this->columnName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrivilegeGrantInfo { + static $_TSPEC; + + public $privilege = null; + public $createTime = null; + public $grantor = null; + public $grantorType = null; + public $grantOption = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privilege', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'grantOption', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privilege'])) { + $this->privilege = $vals['privilege']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['grantorType'])) { + $this->grantorType = $vals['grantorType']; + } + if (isset($vals['grantOption'])) { + $this->grantOption = $vals['grantOption']; + } + } + } + + public function getName() { + return 'PrivilegeGrantInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privilege); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->grantOption); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PrivilegeGrantInfo'); + if ($this->privilege !== null) { + $xfer += $output->writeFieldBegin('privilege', TType::STRING, 1); + $xfer += $output->writeString($this->privilege); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 3); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 4); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantOption !== null) { + $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 5); + $xfer += $output->writeBool($this->grantOption); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveObjectPrivilege { + static $_TSPEC; + + public $hiveObject = null; + public $principalName = null; + public $principalType = null; + public $grantInfo = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectRef', + ), + 2 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principalType', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantInfo', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['principalType'])) { + $this->principalType = $vals['principalType']; + } + if (isset($vals['grantInfo'])) { + $this->grantInfo = $vals['grantInfo']; + } + } + } + + public function getName() { + return 'HiveObjectPrivilege'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->hiveObject = new \metastore\HiveObjectRef(); + $xfer += $this->hiveObject->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principalType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->grantInfo = new \metastore\PrivilegeGrantInfo(); + $xfer += $this->grantInfo->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('HiveObjectPrivilege'); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 2); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalType !== null) { + $xfer += $output->writeFieldBegin('principalType', TType::I32, 3); + $xfer += $output->writeI32($this->principalType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantInfo !== null) { + if (!is_object($this->grantInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('grantInfo', TType::STRUCT, 4); + $xfer += $this->grantInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrivilegeBag { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\HiveObjectPrivilege', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'PrivilegeBag'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->privileges = array(); + $_size14 = 0; + $_etype17 = 0; + $xfer += $input->readListBegin($_etype17, $_size14); + for ($_i18 = 0; $_i18 < $_size14; ++$_i18) + { + $elem19 = null; + $elem19 = new \metastore\HiveObjectPrivilege(); + $xfer += $elem19->read($input); + $this->privileges []= $elem19; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PrivilegeBag'); + if ($this->privileges !== null) { + if (!is_array($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->privileges)); + { + foreach ($this->privileges as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrincipalPrivilegeSet { + static $_TSPEC; + + public $userPrivileges = null; + public $groupPrivileges = null; + public $rolePrivileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'userPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ), + ), + 2 => array( + 'var' => 'groupPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ), + ), + 3 => array( + 'var' => 'rolePrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeGrantInfo', + ), + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; + } + if (isset($vals['groupPrivileges'])) { + $this->groupPrivileges = $vals['groupPrivileges']; + } + if (isset($vals['rolePrivileges'])) { + $this->rolePrivileges = $vals['rolePrivileges']; + } + } + } + + public function getName() { + return 'PrincipalPrivilegeSet'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::MAP) { + $this->userPrivileges = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = array(); + $xfer += $input->readString($key26); + $val27 = array(); + $_size28 = 0; + $_etype31 = 0; + $xfer += $input->readListBegin($_etype31, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $elem33 = null; + $elem33 = new \metastore\PrivilegeGrantInfo(); + $xfer += $elem33->read($input); + $val27 []= $elem33; + } + $xfer += $input->readListEnd(); + $this->userPrivileges[$key26] = $val27; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->groupPrivileges = array(); + $_size34 = 0; + $_ktype35 = 0; + $_vtype36 = 0; + $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); + for ($_i38 = 0; $_i38 < $_size34; ++$_i38) + { + $key39 = ''; + $val40 = array(); + $xfer += $input->readString($key39); + $val40 = array(); + $_size41 = 0; + $_etype44 = 0; + $xfer += $input->readListBegin($_etype44, $_size41); + for ($_i45 = 0; $_i45 < $_size41; ++$_i45) + { + $elem46 = null; + $elem46 = new \metastore\PrivilegeGrantInfo(); + $xfer += $elem46->read($input); + $val40 []= $elem46; + } + $xfer += $input->readListEnd(); + $this->groupPrivileges[$key39] = $val40; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->rolePrivileges = array(); + $_size47 = 0; + $_ktype48 = 0; + $_vtype49 = 0; + $xfer += $input->readMapBegin($_ktype48, $_vtype49, $_size47); + for ($_i51 = 0; $_i51 < $_size47; ++$_i51) + { + $key52 = ''; + $val53 = array(); + $xfer += $input->readString($key52); + $val53 = array(); + $_size54 = 0; + $_etype57 = 0; + $xfer += $input->readListBegin($_etype57, $_size54); + for ($_i58 = 0; $_i58 < $_size54; ++$_i58) + { + $elem59 = null; + $elem59 = new \metastore\PrivilegeGrantInfo(); + $xfer += $elem59->read($input); + $val53 []= $elem59; + } + $xfer += $input->readListEnd(); + $this->rolePrivileges[$key52] = $val53; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PrincipalPrivilegeSet'); + if ($this->userPrivileges !== null) { + if (!is_array($this->userPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('userPrivileges', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->userPrivileges)); + { + foreach ($this->userPrivileges as $kiter60 => $viter61) + { + $xfer += $output->writeString($kiter60); + { + $output->writeListBegin(TType::STRUCT, count($viter61)); + { + foreach ($viter61 as $iter62) + { + $xfer += $iter62->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->groupPrivileges !== null) { + if (!is_array($this->groupPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('groupPrivileges', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->groupPrivileges)); + { + foreach ($this->groupPrivileges as $kiter63 => $viter64) + { + $xfer += $output->writeString($kiter63); + { + $output->writeListBegin(TType::STRUCT, count($viter64)); + { + foreach ($viter64 as $iter65) + { + $xfer += $iter65->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->rolePrivileges !== null) { + if (!is_array($this->rolePrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rolePrivileges', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->rolePrivileges)); + { + foreach ($this->rolePrivileges as $kiter66 => $viter67) + { + $xfer += $output->writeString($kiter66); + { + $output->writeListBegin(TType::STRUCT, count($viter67)); + { + foreach ($viter67 as $iter68) + { + $xfer += $iter68->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Role { + static $_TSPEC; + + public $roleName = null; + public $createTime = null; + public $ownerName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'roleName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'ownerName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; + } + } + } + + public function getName() { + return 'Role'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->roleName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ownerName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Role'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 3); + $xfer += $output->writeString($this->ownerName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Database { + static $_TSPEC; + + public $name = null; + public $description = null; + public $locationUri = null; + public $parameters = null; + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'description', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'locationUri', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['description'])) { + $this->description = $vals['description']; + } + if (isset($vals['locationUri'])) { + $this->locationUri = $vals['locationUri']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'Database'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->description); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->locationUri); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size69 = 0; + $_ktype70 = 0; + $_vtype71 = 0; + $xfer += $input->readMapBegin($_ktype70, $_vtype71, $_size69); + for ($_i73 = 0; $_i73 < $_size69; ++$_i73) + { + $key74 = ''; + $val75 = ''; + $xfer += $input->readString($key74); + $xfer += $input->readString($val75); + $this->parameters[$key74] = $val75; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Database'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->description !== null) { + $xfer += $output->writeFieldBegin('description', TType::STRING, 2); + $xfer += $output->writeString($this->description); + $xfer += $output->writeFieldEnd(); + } + if ($this->locationUri !== null) { + $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); + $xfer += $output->writeString($this->locationUri); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter76 => $viter77) + { + $xfer += $output->writeString($kiter76); + $xfer += $output->writeString($viter77); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 5); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SerDeInfo { + static $_TSPEC; + + public $name = null; + public $serializationLib = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'serializationLib', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['serializationLib'])) { + $this->serializationLib = $vals['serializationLib']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'SerDeInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->serializationLib); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size78 = 0; + $_ktype79 = 0; + $_vtype80 = 0; + $xfer += $input->readMapBegin($_ktype79, $_vtype80, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $key83 = ''; + $val84 = ''; + $xfer += $input->readString($key83); + $xfer += $input->readString($val84); + $this->parameters[$key83] = $val84; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('SerDeInfo'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->serializationLib !== null) { + $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); + $xfer += $output->writeString($this->serializationLib); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter85 => $viter86) + { + $xfer += $output->writeString($kiter85); + $xfer += $output->writeString($viter86); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Order { + static $_TSPEC; + + public $col = null; + public $order = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'col', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'order', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['col'])) { + $this->col = $vals['col']; + } + if (isset($vals['order'])) { + $this->order = $vals['order']; + } + } + } + + public function getName() { + return 'Order'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->order); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Order'); + if ($this->col !== null) { + $xfer += $output->writeFieldBegin('col', TType::STRING, 1); + $xfer += $output->writeString($this->col); + $xfer += $output->writeFieldEnd(); + } + if ($this->order !== null) { + $xfer += $output->writeFieldBegin('order', TType::I32, 2); + $xfer += $output->writeI32($this->order); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SkewedInfo { + static $_TSPEC; + + public $skewedColNames = null; + public $skewedColValues = null; + public $skewedColValueLocationMaps = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'skewedColNames', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'skewedColValues', + 'type' => TType::LST, + 'etype' => TType::LST, + 'elem' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ), + 3 => array( + 'var' => 'skewedColValueLocationMaps', + 'type' => TType::MAP, + 'ktype' => TType::LST, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['skewedColNames'])) { + $this->skewedColNames = $vals['skewedColNames']; + } + if (isset($vals['skewedColValues'])) { + $this->skewedColValues = $vals['skewedColValues']; + } + if (isset($vals['skewedColValueLocationMaps'])) { + $this->skewedColValueLocationMaps = $vals['skewedColValueLocationMaps']; + } + } + } + + public function getName() { + return 'SkewedInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->skewedColNames = array(); + $_size87 = 0; + $_etype90 = 0; + $xfer += $input->readListBegin($_etype90, $_size87); + for ($_i91 = 0; $_i91 < $_size87; ++$_i91) + { + $elem92 = null; + $xfer += $input->readString($elem92); + $this->skewedColNames []= $elem92; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->skewedColValues = array(); + $_size93 = 0; + $_etype96 = 0; + $xfer += $input->readListBegin($_etype96, $_size93); + for ($_i97 = 0; $_i97 < $_size93; ++$_i97) + { + $elem98 = null; + $elem98 = array(); + $_size99 = 0; + $_etype102 = 0; + $xfer += $input->readListBegin($_etype102, $_size99); + for ($_i103 = 0; $_i103 < $_size99; ++$_i103) + { + $elem104 = null; + $xfer += $input->readString($elem104); + $elem98 []= $elem104; + } + $xfer += $input->readListEnd(); + $this->skewedColValues []= $elem98; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->skewedColValueLocationMaps = array(); + $_size105 = 0; + $_ktype106 = 0; + $_vtype107 = 0; + $xfer += $input->readMapBegin($_ktype106, $_vtype107, $_size105); + for ($_i109 = 0; $_i109 < $_size105; ++$_i109) + { + $key110 = array(); + $val111 = ''; + $key110 = array(); + $_size112 = 0; + $_etype115 = 0; + $xfer += $input->readListBegin($_etype115, $_size112); + for ($_i116 = 0; $_i116 < $_size112; ++$_i116) + { + $elem117 = null; + $xfer += $input->readString($elem117); + $key110 []= $elem117; + } + $xfer += $input->readListEnd(); + $xfer += $input->readString($val111); + $this->skewedColValueLocationMaps[$key110] = $val111; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('SkewedInfo'); + if ($this->skewedColNames !== null) { + if (!is_array($this->skewedColNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedColNames', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->skewedColNames)); + { + foreach ($this->skewedColNames as $iter118) + { + $xfer += $output->writeString($iter118); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->skewedColValues !== null) { + if (!is_array($this->skewedColValues)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedColValues', TType::LST, 2); + { + $output->writeListBegin(TType::LST, count($this->skewedColValues)); + { + foreach ($this->skewedColValues as $iter119) + { + { + $output->writeListBegin(TType::STRING, count($iter119)); + { + foreach ($iter119 as $iter120) + { + $xfer += $output->writeString($iter120); + } + } + $output->writeListEnd(); + } + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->skewedColValueLocationMaps !== null) { + if (!is_array($this->skewedColValueLocationMaps)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedColValueLocationMaps', TType::MAP, 3); + { + $output->writeMapBegin(TType::LST, TType::STRING, count($this->skewedColValueLocationMaps)); + { + foreach ($this->skewedColValueLocationMaps as $kiter121 => $viter122) + { + { + $output->writeListBegin(TType::STRING, count($kiter121)); + { + foreach ($kiter121 as $iter123) + { + $xfer += $output->writeString($iter123); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeString($viter122); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class StorageDescriptor { + static $_TSPEC; + + public $cols = null; + public $location = null; + public $inputFormat = null; + public $outputFormat = null; + public $compressed = null; + public $numBuckets = null; + public $serdeInfo = null; + public $bucketCols = null; + public $sortCols = null; + public $parameters = null; + public $skewedInfo = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 2 => array( + 'var' => 'location', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'inputFormat', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'outputFormat', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'compressed', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'numBuckets', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'serdeInfo', + 'type' => TType::STRUCT, + 'class' => '\metastore\SerDeInfo', + ), + 8 => array( + 'var' => 'bucketCols', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 9 => array( + 'var' => 'sortCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Order', + ), + ), + 10 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 11 => array( + 'var' => 'skewedInfo', + 'type' => TType::STRUCT, + 'class' => '\metastore\SkewedInfo', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cols'])) { + $this->cols = $vals['cols']; + } + if (isset($vals['location'])) { + $this->location = $vals['location']; + } + if (isset($vals['inputFormat'])) { + $this->inputFormat = $vals['inputFormat']; + } + if (isset($vals['outputFormat'])) { + $this->outputFormat = $vals['outputFormat']; + } + if (isset($vals['compressed'])) { + $this->compressed = $vals['compressed']; + } + if (isset($vals['numBuckets'])) { + $this->numBuckets = $vals['numBuckets']; + } + if (isset($vals['serdeInfo'])) { + $this->serdeInfo = $vals['serdeInfo']; + } + if (isset($vals['bucketCols'])) { + $this->bucketCols = $vals['bucketCols']; + } + if (isset($vals['sortCols'])) { + $this->sortCols = $vals['sortCols']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['skewedInfo'])) { + $this->skewedInfo = $vals['skewedInfo']; + } + } + } + + public function getName() { + return 'StorageDescriptor'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->cols = array(); + $_size124 = 0; + $_etype127 = 0; + $xfer += $input->readListBegin($_etype127, $_size124); + for ($_i128 = 0; $_i128 < $_size124; ++$_i128) + { + $elem129 = null; + $elem129 = new \metastore\FieldSchema(); + $xfer += $elem129->read($input); + $this->cols []= $elem129; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->location); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->inputFormat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->outputFormat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->compressed); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->numBuckets); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->serdeInfo = new \metastore\SerDeInfo(); + $xfer += $this->serdeInfo->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->bucketCols = array(); + $_size130 = 0; + $_etype133 = 0; + $xfer += $input->readListBegin($_etype133, $_size130); + for ($_i134 = 0; $_i134 < $_size130; ++$_i134) + { + $elem135 = null; + $xfer += $input->readString($elem135); + $this->bucketCols []= $elem135; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->sortCols = array(); + $_size136 = 0; + $_etype139 = 0; + $xfer += $input->readListBegin($_etype139, $_size136); + for ($_i140 = 0; $_i140 < $_size136; ++$_i140) + { + $elem141 = null; + $elem141 = new \metastore\Order(); + $xfer += $elem141->read($input); + $this->sortCols []= $elem141; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size142 = 0; + $_ktype143 = 0; + $_vtype144 = 0; + $xfer += $input->readMapBegin($_ktype143, $_vtype144, $_size142); + for ($_i146 = 0; $_i146 < $_size142; ++$_i146) + { + $key147 = ''; + $val148 = ''; + $xfer += $input->readString($key147); + $xfer += $input->readString($val148); + $this->parameters[$key147] = $val148; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRUCT) { + $this->skewedInfo = new \metastore\SkewedInfo(); + $xfer += $this->skewedInfo->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('StorageDescriptor'); + if ($this->cols !== null) { + if (!is_array($this->cols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->cols)); + { + foreach ($this->cols as $iter149) + { + $xfer += $iter149->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->location !== null) { + $xfer += $output->writeFieldBegin('location', TType::STRING, 2); + $xfer += $output->writeString($this->location); + $xfer += $output->writeFieldEnd(); + } + if ($this->inputFormat !== null) { + $xfer += $output->writeFieldBegin('inputFormat', TType::STRING, 3); + $xfer += $output->writeString($this->inputFormat); + $xfer += $output->writeFieldEnd(); + } + if ($this->outputFormat !== null) { + $xfer += $output->writeFieldBegin('outputFormat', TType::STRING, 4); + $xfer += $output->writeString($this->outputFormat); + $xfer += $output->writeFieldEnd(); + } + if ($this->compressed !== null) { + $xfer += $output->writeFieldBegin('compressed', TType::BOOL, 5); + $xfer += $output->writeBool($this->compressed); + $xfer += $output->writeFieldEnd(); + } + if ($this->numBuckets !== null) { + $xfer += $output->writeFieldBegin('numBuckets', TType::I32, 6); + $xfer += $output->writeI32($this->numBuckets); + $xfer += $output->writeFieldEnd(); + } + if ($this->serdeInfo !== null) { + if (!is_object($this->serdeInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('serdeInfo', TType::STRUCT, 7); + $xfer += $this->serdeInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->bucketCols !== null) { + if (!is_array($this->bucketCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('bucketCols', TType::LST, 8); + { + $output->writeListBegin(TType::STRING, count($this->bucketCols)); + { + foreach ($this->bucketCols as $iter150) + { + $xfer += $output->writeString($iter150); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->sortCols !== null) { + if (!is_array($this->sortCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sortCols', TType::LST, 9); + { + $output->writeListBegin(TType::STRUCT, count($this->sortCols)); + { + foreach ($this->sortCols as $iter151) + { + $xfer += $iter151->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 10); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter152 => $viter153) + { + $xfer += $output->writeString($kiter152); + $xfer += $output->writeString($viter153); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->skewedInfo !== null) { + if (!is_object($this->skewedInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('skewedInfo', TType::STRUCT, 11); + $xfer += $this->skewedInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Table { + static $_TSPEC; + + public $tableName = null; + public $dbName = null; + public $owner = null; + public $createTime = null; + public $lastAccessTime = null; + public $retention = null; + public $sd = null; + public $partitionKeys = null; + public $parameters = null; + public $viewOriginalText = null; + public $viewExpandedText = null; + public $tableType = null; + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'owner', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'retention', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + 8 => array( + 'var' => 'partitionKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'viewOriginalText', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'viewExpandedText', + 'type' => TType::STRING, + ), + 12 => array( + 'var' => 'tableType', + 'type' => TType::STRING, + ), + 13 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['owner'])) { + $this->owner = $vals['owner']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['retention'])) { + $this->retention = $vals['retention']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['partitionKeys'])) { + $this->partitionKeys = $vals['partitionKeys']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['viewOriginalText'])) { + $this->viewOriginalText = $vals['viewOriginalText']; + } + if (isset($vals['viewExpandedText'])) { + $this->viewExpandedText = $vals['viewExpandedText']; + } + if (isset($vals['tableType'])) { + $this->tableType = $vals['tableType']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'Table'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->owner); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->retention); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->partitionKeys = array(); + $_size154 = 0; + $_etype157 = 0; + $xfer += $input->readListBegin($_etype157, $_size154); + for ($_i158 = 0; $_i158 < $_size154; ++$_i158) + { + $elem159 = null; + $elem159 = new \metastore\FieldSchema(); + $xfer += $elem159->read($input); + $this->partitionKeys []= $elem159; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size160 = 0; + $_ktype161 = 0; + $_vtype162 = 0; + $xfer += $input->readMapBegin($_ktype161, $_vtype162, $_size160); + for ($_i164 = 0; $_i164 < $_size160; ++$_i164) + { + $key165 = ''; + $val166 = ''; + $xfer += $input->readString($key165); + $xfer += $input->readString($val166); + $this->parameters[$key165] = $val166; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->viewOriginalText); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->viewExpandedText); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Table'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->owner !== null) { + $xfer += $output->writeFieldBegin('owner', TType::STRING, 3); + $xfer += $output->writeString($this->owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->retention !== null) { + $xfer += $output->writeFieldBegin('retention', TType::I32, 6); + $xfer += $output->writeI32($this->retention); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 7); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionKeys !== null) { + if (!is_array($this->partitionKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 8); + { + $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); + { + foreach ($this->partitionKeys as $iter167) + { + $xfer += $iter167->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter168 => $viter169) + { + $xfer += $output->writeString($kiter168); + $xfer += $output->writeString($viter169); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->viewOriginalText !== null) { + $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 10); + $xfer += $output->writeString($this->viewOriginalText); + $xfer += $output->writeFieldEnd(); + } + if ($this->viewExpandedText !== null) { + $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 11); + $xfer += $output->writeString($this->viewExpandedText); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableType !== null) { + $xfer += $output->writeFieldBegin('tableType', TType::STRING, 12); + $xfer += $output->writeString($this->tableType); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 13); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Partition { + static $_TSPEC; + + public $values = null; + public $dbName = null; + public $tableName = null; + public $createTime = null; + public $lastAccessTime = null; + public $sd = null; + public $parameters = null; + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'values', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + 7 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 8 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['values'])) { + $this->values = $vals['values']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'Partition'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->values = array(); + $_size170 = 0; + $_etype173 = 0; + $xfer += $input->readListBegin($_etype173, $_size170); + for ($_i174 = 0; $_i174 < $_size170; ++$_i174) + { + $elem175 = null; + $xfer += $input->readString($elem175); + $this->values []= $elem175; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size176 = 0; + $_ktype177 = 0; + $_vtype178 = 0; + $xfer += $input->readMapBegin($_ktype177, $_vtype178, $_size176); + for ($_i180 = 0; $_i180 < $_size176; ++$_i180) + { + $key181 = ''; + $val182 = ''; + $xfer += $input->readString($key181); + $xfer += $input->readString($val182); + $this->parameters[$key181] = $val182; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Partition'); + if ($this->values !== null) { + if (!is_array($this->values)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('values', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->values)); + { + foreach ($this->values as $iter183) + { + $xfer += $output->writeString($iter183); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 6); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 7); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter184 => $viter185) + { + $xfer += $output->writeString($kiter184); + $xfer += $output->writeString($viter185); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 8); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Index { + static $_TSPEC; + + public $indexName = null; + public $indexHandlerClass = null; + public $dbName = null; + public $origTableName = null; + public $createTime = null; + public $lastAccessTime = null; + public $indexTableName = null; + public $sd = null; + public $parameters = null; + public $deferredRebuild = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'indexName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'indexHandlerClass', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'origTableName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'indexTableName', + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'deferredRebuild', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['indexName'])) { + $this->indexName = $vals['indexName']; + } + if (isset($vals['indexHandlerClass'])) { + $this->indexHandlerClass = $vals['indexHandlerClass']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['origTableName'])) { + $this->origTableName = $vals['origTableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['indexTableName'])) { + $this->indexTableName = $vals['indexTableName']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['deferredRebuild'])) { + $this->deferredRebuild = $vals['deferredRebuild']; + } + } + } + + public function getName() { + return 'Index'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexHandlerClass); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->origTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size186 = 0; + $_ktype187 = 0; + $_vtype188 = 0; + $xfer += $input->readMapBegin($_ktype187, $_vtype188, $_size186); + for ($_i190 = 0; $_i190 < $_size186; ++$_i190) + { + $key191 = ''; + $val192 = ''; + $xfer += $input->readString($key191); + $xfer += $input->readString($val192); + $this->parameters[$key191] = $val192; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deferredRebuild); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Index'); + if ($this->indexName !== null) { + $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); + $xfer += $output->writeString($this->indexName); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexHandlerClass !== null) { + $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); + $xfer += $output->writeString($this->indexHandlerClass); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->origTableName !== null) { + $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); + $xfer += $output->writeString($this->origTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexTableName !== null) { + $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); + $xfer += $output->writeString($this->indexTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter193 => $viter194) + { + $xfer += $output->writeString($kiter193); + $xfer += $output->writeString($viter194); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deferredRebuild !== null) { + $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); + $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Schema { + static $_TSPEC; + + public $fieldSchemas = null; + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fieldSchemas', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\FieldSchema', + ), + ), + 2 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fieldSchemas'])) { + $this->fieldSchemas = $vals['fieldSchemas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'Schema'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->fieldSchemas = array(); + $_size195 = 0; + $_etype198 = 0; + $xfer += $input->readListBegin($_etype198, $_size195); + for ($_i199 = 0; $_i199 < $_size195; ++$_i199) + { + $elem200 = null; + $elem200 = new \metastore\FieldSchema(); + $xfer += $elem200->read($input); + $this->fieldSchemas []= $elem200; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size201 = 0; + $_ktype202 = 0; + $_vtype203 = 0; + $xfer += $input->readMapBegin($_ktype202, $_vtype203, $_size201); + for ($_i205 = 0; $_i205 < $_size201; ++$_i205) + { + $key206 = ''; + $val207 = ''; + $xfer += $input->readString($key206); + $xfer += $input->readString($val207); + $this->properties[$key206] = $val207; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Schema'); + if ($this->fieldSchemas !== null) { + if (!is_array($this->fieldSchemas)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); + { + foreach ($this->fieldSchemas as $iter208) + { + $xfer += $iter208->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter209 => $viter210) + { + $xfer += $output->writeString($kiter209); + $xfer += $output->writeString($viter210); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class EnvironmentContext { + static $_TSPEC; + + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'EnvironmentContext'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size211 = 0; + $_ktype212 = 0; + $_vtype213 = 0; + $xfer += $input->readMapBegin($_ktype212, $_vtype213, $_size211); + for ($_i215 = 0; $_i215 < $_size211; ++$_i215) + { + $key216 = ''; + $val217 = ''; + $xfer += $input->readString($key216); + $xfer += $input->readString($val217); + $this->properties[$key216] = $val217; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('EnvironmentContext'); + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter218 => $viter219) + { + $xfer += $output->writeString($kiter218); + $xfer += $output->writeString($viter219); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class MetaException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'MetaException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('MetaException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnknownTableException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'UnknownTableException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('UnknownTableException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnknownDBException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'UnknownDBException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('UnknownDBException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AlreadyExistsException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'AlreadyExistsException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('AlreadyExistsException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidPartitionException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidPartitionException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('InvalidPartitionException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnknownPartitionException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'UnknownPartitionException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('UnknownPartitionException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidObjectException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidObjectException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('InvalidObjectException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NoSuchObjectException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'NoSuchObjectException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('NoSuchObjectException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class IndexAlreadyExistsException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'IndexAlreadyExistsException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('IndexAlreadyExistsException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InvalidOperationException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidOperationException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('InvalidOperationException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ConfigValSecurityException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'ConfigValSecurityException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ConfigValSecurityException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +$GLOBALS['hive_metastore_CONSTANTS']['DDL_TIME'] = "transient_lastDdlTime"; + +$GLOBALS['hive_metastore_CONSTANTS']['HIVE_FILTER_FIELD_OWNER'] = "hive_filter_field_owner__"; + +$GLOBALS['hive_metastore_CONSTANTS']['HIVE_FILTER_FIELD_PARAMS'] = "hive_filter_field_params__"; + +$GLOBALS['hive_metastore_CONSTANTS']['HIVE_FILTER_FIELD_LAST_ACCESS'] = "hive_filter_field_last_access__"; + +$GLOBALS['hive_metastore_CONSTANTS']['IS_ARCHIVED'] = "is_archived"; + +$GLOBALS['hive_metastore_CONSTANTS']['ORIGINAL_LOCATION'] = "original_location"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_COLUMNS'] = "columns"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_COLUMN_TYPES'] = "columns.types"; + +$GLOBALS['hive_metastore_CONSTANTS']['BUCKET_FIELD_NAME'] = "bucket_field_name"; + +$GLOBALS['hive_metastore_CONSTANTS']['BUCKET_COUNT'] = "bucket_count"; + +$GLOBALS['hive_metastore_CONSTANTS']['FIELD_TO_DIMENSION'] = "field_to_dimension"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_NAME'] = "name"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_DB'] = "db"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_LOCATION'] = "location"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_SERDE'] = "serde"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_PARTITION_COLUMNS'] = "partition_columns"; + +$GLOBALS['hive_metastore_CONSTANTS']['FILE_INPUT_FORMAT'] = "file.inputformat"; + +$GLOBALS['hive_metastore_CONSTANTS']['FILE_OUTPUT_FORMAT'] = "file.outputformat"; + +$GLOBALS['hive_metastore_CONSTANTS']['META_TABLE_STORAGE'] = "storage_handler"; + + Index: ivy/libraries.properties =================================================================== --- ivy/libraries.properties (revision 1403799) +++ ivy/libraries.properties (working copy) @@ -54,8 +54,8 @@ sqlline.branch=1.0.2 json.version=20090211 junit.version=4.10 -libfb303.version=0.7.0 -libthrift.version=0.7.0 +libfb303.version=0.9.0 +libthrift.version=0.9.0 log4j.version=1.2.16 maven-ant-tasks.version=2.1.0 mockito-all.version=1.8.2 Index: service/src/gen/thrift/gen-py/__init__.py =================================================================== Index: service/src/gen/thrift/gen-py/hive_service/ttypes.py =================================================================== --- service/src/gen/thrift/gen-py/hive_service/ttypes.py (revision 1403799) +++ service/src/gen/thrift/gen-py/hive_service/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import fb303.ttypes import hive_metastore.ttypes import queryplan.ttypes @@ -153,7 +155,7 @@ def __ne__(self, other): return not (self == other) -class HiveServerException(Exception): +class HiveServerException(TException): """ Attributes: - message Index: service/src/gen/thrift/gen-py/hive_service/ThriftHive.py =================================================================== --- service/src/gen/thrift/gen-py/hive_service/ThriftHive.py (revision 1403799) +++ service/src/gen/thrift/gen-py/hive_service/ThriftHive.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException import hive_metastore.ThriftHiveMetastore from ttypes import * from thrift.Thrift import TProcessor @@ -340,7 +342,7 @@ result = execute_result() try: self._handler.execute(args.query) - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("execute", TMessageType.REPLY, seqid) result.write(oprot) @@ -354,7 +356,7 @@ result = fetchOne_result() try: result.success = self._handler.fetchOne() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("fetchOne", TMessageType.REPLY, seqid) result.write(oprot) @@ -368,7 +370,7 @@ result = fetchN_result() try: result.success = self._handler.fetchN(args.numRows) - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("fetchN", TMessageType.REPLY, seqid) result.write(oprot) @@ -382,7 +384,7 @@ result = fetchAll_result() try: result.success = self._handler.fetchAll() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("fetchAll", TMessageType.REPLY, seqid) result.write(oprot) @@ -396,7 +398,7 @@ result = getSchema_result() try: result.success = self._handler.getSchema() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getSchema", TMessageType.REPLY, seqid) result.write(oprot) @@ -410,7 +412,7 @@ result = getThriftSchema_result() try: result.success = self._handler.getThriftSchema() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getThriftSchema", TMessageType.REPLY, seqid) result.write(oprot) @@ -424,7 +426,7 @@ result = getClusterStatus_result() try: result.success = self._handler.getClusterStatus() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getClusterStatus", TMessageType.REPLY, seqid) result.write(oprot) @@ -438,7 +440,7 @@ result = getQueryPlan_result() try: result.success = self._handler.getQueryPlan() - except HiveServerException, ex: + except HiveServerException as ex: result.ex = ex oprot.writeMessageBegin("getQueryPlan", TMessageType.REPLY, seqid) result.write(oprot) Index: service/src/gen/thrift/gen-py/hive_service/constants.py =================================================================== --- service/src/gen/thrift/gen-py/hive_service/constants.py (revision 1403799) +++ service/src/gen/thrift/gen-py/hive_service/constants.py (working copy) @@ -1,9 +1,11 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * Index: service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote =================================================================== --- service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote (revision 1403799) +++ service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote (working copy) @@ -1,9 +1,11 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# import sys import pprint @@ -18,7 +20,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print '' - print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' + print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' print ' void execute(string query)' @@ -44,7 +46,8 @@ if sys.argv[argi] == '-h': parts = sys.argv[argi+1].split(':') host = parts[0] - port = int(parts[1]) + if len(parts) > 1: + port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': Index: service/src/gen/thrift/gen-cpp/hive_service_types.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_types.cpp (revision 1403799) +++ service/src/gen/thrift/gen-cpp/hive_service_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_service_types.h" +#include + namespace Apache { namespace Hadoop { namespace Hive { int _kJobTrackerStateValues[] = { @@ -105,29 +108,47 @@ uint32_t HiveClusterStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveClusterStatus"); + xfer += oprot->writeFieldBegin("taskTrackers", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->taskTrackers); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mapTasks", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->mapTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("reduceTasks", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32(this->reduceTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("maxMapTasks", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->maxMapTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("maxReduceTasks", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->maxReduceTasks); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32((int32_t)this->state); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveClusterStatus &a, HiveClusterStatus &b) { + using ::std::swap; + swap(a.taskTrackers, b.taskTrackers); + swap(a.mapTasks, b.mapTasks); + swap(a.reduceTasks, b.reduceTasks); + swap(a.maxMapTasks, b.maxMapTasks); + swap(a.maxReduceTasks, b.maxReduceTasks); + swap(a.state, b.state); + swap(a.__isset, b.__isset); +} + const char* HiveServerException::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; const uint8_t HiveServerException::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; @@ -190,18 +211,30 @@ uint32_t HiveServerException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveServerException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("errorCode", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->errorCode); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("SQLState", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->SQLState); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(HiveServerException &a, HiveServerException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.errorCode, b.errorCode); + swap(a.SQLState, b.SQLState); + swap(a.__isset, b.__isset); +} + }}} // namespace Index: service/src/gen/thrift/gen-cpp/ThriftHive.h =================================================================== --- service/src/gen/thrift/gen-cpp/ThriftHive.h (revision 1403799) +++ service/src/gen/thrift/gen-cpp/ThriftHive.h (working copy) @@ -1,33 +1,58 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef ThriftHive_H #define ThriftHive_H -#include +#include #include "hive_service_types.h" #include "ThriftHiveMetastore.h" namespace Apache { namespace Hadoop { namespace Hive { -class ThriftHiveIf : virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreIf { +class ThriftHiveIf : virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreIf { public: virtual ~ThriftHiveIf() {} virtual void execute(const std::string& query) = 0; virtual void fetchOne(std::string& _return) = 0; virtual void fetchN(std::vector & _return, const int32_t numRows) = 0; virtual void fetchAll(std::vector & _return) = 0; - virtual void getSchema(Apache::Hadoop::Hive::Schema& _return) = 0; - virtual void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) = 0; + virtual void getSchema( ::Apache::Hadoop::Hive::Schema& _return) = 0; + virtual void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) = 0; virtual void getClusterStatus(HiveClusterStatus& _return) = 0; - virtual void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) = 0; + virtual void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) = 0; virtual void clean() = 0; }; -class ThriftHiveNull : virtual public ThriftHiveIf , virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreNull { +class ThriftHiveIfFactory : virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreIfFactory { public: + typedef ThriftHiveIf Handler; + + virtual ~ThriftHiveIfFactory() {} + + virtual ThriftHiveIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) = 0; +}; + +class ThriftHiveIfSingletonFactory : virtual public ThriftHiveIfFactory { + public: + ThriftHiveIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {} + virtual ~ThriftHiveIfSingletonFactory() {} + + virtual ThriftHiveIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler( ::facebook::fb303::FacebookServiceIf* /* handler */) {} + + protected: + boost::shared_ptr iface_; +}; + +class ThriftHiveNull : virtual public ThriftHiveIf , virtual public ::Apache::Hadoop::Hive::ThriftHiveMetastoreNull { + public: virtual ~ThriftHiveNull() {} void execute(const std::string& /* query */) { return; @@ -41,16 +66,16 @@ void fetchAll(std::vector & /* _return */) { return; } - void getSchema(Apache::Hadoop::Hive::Schema& /* _return */) { + void getSchema( ::Apache::Hadoop::Hive::Schema& /* _return */) { return; } - void getThriftSchema(Apache::Hadoop::Hive::Schema& /* _return */) { + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& /* _return */) { return; } void getClusterStatus(HiveClusterStatus& /* _return */) { return; } - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& /* _return */) { + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& /* _return */) { return; } void clean() { @@ -66,7 +91,7 @@ class ThriftHive_execute_args { public: - ThriftHive_execute_args() : query("") { + ThriftHive_execute_args() : query() { } virtual ~ThriftHive_execute_args() throw() {} @@ -212,7 +237,7 @@ class ThriftHive_fetchOne_result { public: - ThriftHive_fetchOne_result() : success("") { + ThriftHive_fetchOne_result() : success() { } virtual ~ThriftHive_fetchOne_result() throw() {} @@ -543,12 +568,12 @@ virtual ~ThriftHive_getSchema_result() throw() {} - Apache::Hadoop::Hive::Schema success; + ::Apache::Hadoop::Hive::Schema success; HiveServerException ex; _ThriftHive_getSchema_result__isset __isset; - void __set_success(const Apache::Hadoop::Hive::Schema& val) { + void __set_success(const ::Apache::Hadoop::Hive::Schema& val) { success = val; } @@ -587,7 +612,7 @@ virtual ~ThriftHive_getSchema_presult() throw() {} - Apache::Hadoop::Hive::Schema* success; + ::Apache::Hadoop::Hive::Schema* success; HiveServerException ex; _ThriftHive_getSchema_presult__isset __isset; @@ -647,12 +672,12 @@ virtual ~ThriftHive_getThriftSchema_result() throw() {} - Apache::Hadoop::Hive::Schema success; + ::Apache::Hadoop::Hive::Schema success; HiveServerException ex; _ThriftHive_getThriftSchema_result__isset __isset; - void __set_success(const Apache::Hadoop::Hive::Schema& val) { + void __set_success(const ::Apache::Hadoop::Hive::Schema& val) { success = val; } @@ -691,7 +716,7 @@ virtual ~ThriftHive_getThriftSchema_presult() throw() {} - Apache::Hadoop::Hive::Schema* success; + ::Apache::Hadoop::Hive::Schema* success; HiveServerException ex; _ThriftHive_getThriftSchema_presult__isset __isset; @@ -855,12 +880,12 @@ virtual ~ThriftHive_getQueryPlan_result() throw() {} - Apache::Hadoop::Hive::QueryPlan success; + ::Apache::Hadoop::Hive::QueryPlan success; HiveServerException ex; _ThriftHive_getQueryPlan_result__isset __isset; - void __set_success(const Apache::Hadoop::Hive::QueryPlan& val) { + void __set_success(const ::Apache::Hadoop::Hive::QueryPlan& val) { success = val; } @@ -899,7 +924,7 @@ virtual ~ThriftHive_getQueryPlan_presult() throw() {} - Apache::Hadoop::Hive::QueryPlan* success; + ::Apache::Hadoop::Hive::QueryPlan* success; HiveServerException ex; _ThriftHive_getQueryPlan_presult__isset __isset; @@ -982,12 +1007,12 @@ }; -class ThriftHiveClient : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreClient { +class ThriftHiveClient : virtual public ThriftHiveIf, public ::Apache::Hadoop::Hive::ThriftHiveMetastoreClient { public: ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : - Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} + ::Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : - Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} + ::Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } @@ -1006,29 +1031,31 @@ void fetchAll(std::vector & _return); void send_fetchAll(); void recv_fetchAll(std::vector & _return); - void getSchema(Apache::Hadoop::Hive::Schema& _return); + void getSchema( ::Apache::Hadoop::Hive::Schema& _return); void send_getSchema(); - void recv_getSchema(Apache::Hadoop::Hive::Schema& _return); - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return); + void recv_getSchema( ::Apache::Hadoop::Hive::Schema& _return); + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return); void send_getThriftSchema(); - void recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _return); + void recv_getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return); void getClusterStatus(HiveClusterStatus& _return); void send_getClusterStatus(); void recv_getClusterStatus(HiveClusterStatus& _return); - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return); void send_getQueryPlan(); - void recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); + void recv_getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return); void clean(); void send_clean(); void recv_clean(); }; -class ThriftHiveProcessor : virtual public ::apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { +class ThriftHiveProcessor : public ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { protected: boost::shared_ptr iface_; - virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext); + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); private: - std::map processMap_; + typedef void (ThriftHiveProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -1040,7 +1067,7 @@ void process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: ThriftHiveProcessor(boost::shared_ptr iface) : - Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), + ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), iface_(iface) { processMap_["execute"] = &ThriftHiveProcessor::process_execute; processMap_["fetchOne"] = &ThriftHiveProcessor::process_fetchOne; @@ -1053,16 +1080,26 @@ processMap_["clean"] = &ThriftHiveProcessor::process_clean; } - virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext); virtual ~ThriftHiveProcessor() {} }; -class ThriftHiveMultiface : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface { +class ThriftHiveProcessorFactory : public ::apache::thrift::TProcessorFactory { public: + ThriftHiveProcessorFactory(const ::boost::shared_ptr< ThriftHiveIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::boost::shared_ptr< ThriftHiveIfFactory > handlerFactory_; +}; + +class ThriftHiveMultiface : virtual public ThriftHiveIf, public ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface { + public: ThriftHiveMultiface(std::vector >& ifaces) : ifaces_(ifaces) { std::vector >::iterator iter; for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { - Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(*iter); + ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(*iter); } } virtual ~ThriftHiveMultiface() {} @@ -1070,106 +1107,96 @@ std::vector > ifaces_; ThriftHiveMultiface() {} void add(boost::shared_ptr iface) { - Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(iface); + ::Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(iface); ifaces_.push_back(iface); } public: void execute(const std::string& query) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->execute(query); } + ifaces_[i]->execute(query); } void fetchOne(std::string& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchOne(_return); - return; - } else { - ifaces_[i]->fetchOne(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fetchOne(_return); } + ifaces_[i]->fetchOne(_return); + return; } void fetchN(std::vector & _return, const int32_t numRows) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchN(_return, numRows); - return; - } else { - ifaces_[i]->fetchN(_return, numRows); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fetchN(_return, numRows); } + ifaces_[i]->fetchN(_return, numRows); + return; } void fetchAll(std::vector & _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchAll(_return); - return; - } else { - ifaces_[i]->fetchAll(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fetchAll(_return); } + ifaces_[i]->fetchAll(_return); + return; } - void getSchema(Apache::Hadoop::Hive::Schema& _return) { + void getSchema( ::Apache::Hadoop::Hive::Schema& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getSchema(_return); - return; - } else { - ifaces_[i]->getSchema(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getSchema(_return); } + ifaces_[i]->getSchema(_return); + return; } - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) { + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getThriftSchema(_return); - return; - } else { - ifaces_[i]->getThriftSchema(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getThriftSchema(_return); } + ifaces_[i]->getThriftSchema(_return); + return; } void getClusterStatus(HiveClusterStatus& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getClusterStatus(_return); - return; - } else { - ifaces_[i]->getClusterStatus(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getClusterStatus(_return); } + ifaces_[i]->getClusterStatus(_return); + return; } - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getQueryPlan(_return); - return; - } else { - ifaces_[i]->getQueryPlan(_return); - } + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getQueryPlan(_return); } + ifaces_[i]->getQueryPlan(_return); + return; } void clean() { size_t sz = ifaces_.size(); - for (size_t i = 0; i < sz; ++i) { + size_t i = 0; + for (; i < (sz - 1); ++i) { ifaces_[i]->clean(); } + ifaces_[i]->clean(); } }; Index: service/src/gen/thrift/gen-cpp/hive_service_types.h =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_types.h (revision 1403799) +++ service/src/gen/thrift/gen-cpp/hive_service_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_service_TYPES_H #define hive_service_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include #include "fb303_types.h" #include "hive_metastore_types.h" @@ -43,7 +44,7 @@ static const char* ascii_fingerprint; // = "D514EDCFFC86F64A2E924DCD16D4FAD8"; static const uint8_t binary_fingerprint[16]; // = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8}; - HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0) { + HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0), state((JobTrackerState::type)0) { } virtual ~HiveClusterStatus() throw() {} @@ -108,6 +109,8 @@ }; +void swap(HiveClusterStatus &a, HiveClusterStatus &b); + typedef struct _HiveServerException__isset { _HiveServerException__isset() : message(false), errorCode(false), SQLState(false) {} bool message; @@ -121,7 +124,7 @@ static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; - HiveServerException() : message(""), errorCode(0), SQLState("") { + HiveServerException() : message(), errorCode(0), SQLState() { } virtual ~HiveServerException() throw() {} @@ -165,6 +168,8 @@ }; +void swap(HiveServerException &a, HiveServerException &b); + }}} // namespace #endif Index: service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp (revision 1403799) +++ service/src/gen/thrift/gen-cpp/ThriftHive_server.skeleton.cpp (working copy) @@ -2,10 +2,10 @@ // You should copy it to another filename to avoid overwriting it. #include "ThriftHive.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; @@ -14,7 +14,7 @@ using boost::shared_ptr; -using namespace Apache::Hadoop::Hive; +using namespace ::Apache::Hadoop::Hive; class ThriftHiveHandler : virtual public ThriftHiveIf { public: @@ -42,12 +42,12 @@ printf("fetchAll\n"); } - void getSchema(Apache::Hadoop::Hive::Schema& _return) { + void getSchema( ::Apache::Hadoop::Hive::Schema& _return) { // Your implementation goes here printf("getSchema\n"); } - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) { + void getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { // Your implementation goes here printf("getThriftSchema\n"); } @@ -57,7 +57,7 @@ printf("getClusterStatus\n"); } - void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + void getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { // Your implementation goes here printf("getQueryPlan\n"); } Index: service/src/gen/thrift/gen-cpp/hive_service_constants.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_constants.cpp (revision 1403799) +++ service/src/gen/thrift/gen-cpp/hive_service_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "hive_service_constants.h" Index: service/src/gen/thrift/gen-cpp/ThriftHive.cpp =================================================================== --- service/src/gen/thrift/gen-cpp/ThriftHive.cpp (revision 1403799) +++ service/src/gen/thrift/gen-cpp/ThriftHive.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "ThriftHive.h" @@ -50,9 +51,11 @@ uint32_t ThriftHive_execute_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_args"); + xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->query); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -61,9 +64,11 @@ uint32_t ThriftHive_execute_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_pargs"); + xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->query))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -183,12 +188,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -200,6 +200,7 @@ uint32_t ThriftHive_fetchOne_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -208,6 +209,7 @@ uint32_t ThriftHive_fetchOne_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -372,9 +374,11 @@ uint32_t ThriftHive_fetchN_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_args"); + xfer += oprot->writeFieldBegin("numRows", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->numRows); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -383,9 +387,11 @@ uint32_t ThriftHive_fetchN_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_pargs"); + xfer += oprot->writeFieldBegin("numRows", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((*(this->numRows))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -417,14 +423,14 @@ this->success.clear(); uint32_t _size1; ::apache::thrift::protocol::TType _etype4; - iprot->readListBegin(_etype4, _size1); + xfer += iprot->readListBegin(_etype4, _size1); this->success.resize(_size1); uint32_t _i5; for (_i5 = 0; _i5 < _size1; ++_i5) { xfer += iprot->readString(this->success[_i5]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -505,14 +511,14 @@ (*(this->success)).clear(); uint32_t _size7; ::apache::thrift::protocol::TType _etype10; - iprot->readListBegin(_etype10, _size7); + xfer += iprot->readListBegin(_etype10, _size7); (*(this->success)).resize(_size7); uint32_t _i11; for (_i11 = 0; _i11 < _size7; ++_i11) { xfer += iprot->readString((*(this->success))[_i11]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -557,12 +563,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -574,6 +575,7 @@ uint32_t ThriftHive_fetchAll_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -582,6 +584,7 @@ uint32_t ThriftHive_fetchAll_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -613,14 +616,14 @@ this->success.clear(); uint32_t _size12; ::apache::thrift::protocol::TType _etype15; - iprot->readListBegin(_etype15, _size12); + xfer += iprot->readListBegin(_etype15, _size12); this->success.resize(_size12); uint32_t _i16; for (_i16 = 0; _i16 < _size12; ++_i16) { xfer += iprot->readString(this->success[_i16]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -701,14 +704,14 @@ (*(this->success)).clear(); uint32_t _size18; ::apache::thrift::protocol::TType _etype21; - iprot->readListBegin(_etype21, _size18); + xfer += iprot->readListBegin(_etype21, _size18); (*(this->success)).resize(_size18); uint32_t _i22; for (_i22 = 0; _i22 < _size18; ++_i22) { xfer += iprot->readString((*(this->success))[_i22]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.success = true; } else { @@ -753,12 +756,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -770,6 +768,7 @@ uint32_t ThriftHive_getSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -778,6 +777,7 @@ uint32_t ThriftHive_getSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -917,12 +917,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -934,6 +929,7 @@ uint32_t ThriftHive_getThriftSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -942,6 +938,7 @@ uint32_t ThriftHive_getThriftSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1081,12 +1078,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1098,6 +1090,7 @@ uint32_t ThriftHive_getClusterStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1106,6 +1099,7 @@ uint32_t ThriftHive_getClusterStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1245,12 +1239,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1262,6 +1251,7 @@ uint32_t ThriftHive_getQueryPlan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1270,6 +1260,7 @@ uint32_t ThriftHive_getQueryPlan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1409,12 +1400,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1426,6 +1412,7 @@ uint32_t ThriftHive_clean_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_clean_args"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1434,6 +1421,7 @@ uint32_t ThriftHive_clean_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_clean_pargs"); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1457,12 +1445,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1500,12 +1483,7 @@ if (ftype == ::apache::thrift::protocol::T_STOP) { break; } - switch (fid) - { - default: - xfer += iprot->skip(ftype); - break; - } + xfer += iprot->skip(ftype); xfer += iprot->readFieldEnd(); } @@ -1751,7 +1729,7 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchAll failed: unknown result"); } -void ThriftHiveClient::getSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::getSchema( ::Apache::Hadoop::Hive::Schema& _return) { send_getSchema(); recv_getSchema(_return); @@ -1770,7 +1748,7 @@ oprot_->getTransport()->flush(); } -void ThriftHiveClient::recv_getSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::recv_getSchema( ::Apache::Hadoop::Hive::Schema& _return) { int32_t rseqid = 0; @@ -1811,7 +1789,7 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getSchema failed: unknown result"); } -void ThriftHiveClient::getThriftSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { send_getThriftSchema(); recv_getThriftSchema(_return); @@ -1830,7 +1808,7 @@ oprot_->getTransport()->flush(); } -void ThriftHiveClient::recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _return) +void ThriftHiveClient::recv_getThriftSchema( ::Apache::Hadoop::Hive::Schema& _return) { int32_t rseqid = 0; @@ -1931,7 +1909,7 @@ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getClusterStatus failed: unknown result"); } -void ThriftHiveClient::getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +void ThriftHiveClient::getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { send_getQueryPlan(); recv_getQueryPlan(_return); @@ -1950,7 +1928,7 @@ oprot_->getTransport()->flush(); } -void ThriftHiveClient::recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +void ThriftHiveClient::recv_getQueryPlan( ::Apache::Hadoop::Hive::QueryPlan& _return) { int32_t rseqid = 0; @@ -2043,37 +2021,11 @@ return; } -bool ThriftHiveProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) { - - ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); - ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - iprot->readMessageBegin(fname, mtype, seqid); - - if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { - iprot->skip(::apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return false; - } - - return process_fn(iprot, oprot, fname, seqid, callContext); -} - -bool ThriftHiveProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { - std::map::iterator pfn; +bool ThriftHiveProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) { + ProcessMap::iterator pfn; pfn = processMap_.find(fname); if (pfn == processMap_.end()) { - return Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::process_fn(iprot, oprot, fname, seqid, callContext); + return ::Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::dispatchCall(iprot, oprot, fname, seqid, callContext); } (this->*(pfn->second))(seqid, iprot, oprot, callContext); return true; @@ -2082,13 +2034,13 @@ void ThriftHiveProcessor::process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.execute", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.execute", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.execute"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.execute"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.execute"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.execute"); } ThriftHive_execute_args args; @@ -2096,8 +2048,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.execute", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.execute", bytes); } ThriftHive_execute_result result; @@ -2107,8 +2059,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.execute"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.execute"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2120,8 +2072,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.execute"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.execute"); } oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2130,21 +2082,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.execute", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.execute", bytes); } } void ThriftHiveProcessor::process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.fetchOne", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.fetchOne", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchOne"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchOne"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.fetchOne"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.fetchOne"); } ThriftHive_fetchOne_args args; @@ -2152,8 +2104,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.fetchOne", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.fetchOne", bytes); } ThriftHive_fetchOne_result result; @@ -2164,8 +2116,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.fetchOne"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.fetchOne"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2177,8 +2129,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.fetchOne"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.fetchOne"); } oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2187,21 +2139,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.fetchOne", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.fetchOne", bytes); } } void ThriftHiveProcessor::process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.fetchN", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.fetchN", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchN"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchN"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.fetchN"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.fetchN"); } ThriftHive_fetchN_args args; @@ -2209,8 +2161,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.fetchN", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.fetchN", bytes); } ThriftHive_fetchN_result result; @@ -2221,8 +2173,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.fetchN"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.fetchN"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2234,8 +2186,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.fetchN"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.fetchN"); } oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2244,21 +2196,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.fetchN", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.fetchN", bytes); } } void ThriftHiveProcessor::process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.fetchAll", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.fetchAll", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.fetchAll"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.fetchAll"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.fetchAll"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.fetchAll"); } ThriftHive_fetchAll_args args; @@ -2266,8 +2218,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.fetchAll", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.fetchAll", bytes); } ThriftHive_fetchAll_result result; @@ -2278,8 +2230,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.fetchAll"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.fetchAll"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2291,8 +2243,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.fetchAll"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.fetchAll"); } oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2301,21 +2253,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.fetchAll", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.fetchAll", bytes); } } void ThriftHiveProcessor::process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getSchema", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getSchema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getSchema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getSchema"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getSchema"); } ThriftHive_getSchema_args args; @@ -2323,8 +2275,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getSchema", bytes); } ThriftHive_getSchema_result result; @@ -2335,8 +2287,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getSchema"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2348,8 +2300,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getSchema"); } oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2358,21 +2310,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getSchema", bytes); } } void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getThriftSchema", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getThriftSchema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getThriftSchema"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getThriftSchema"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getThriftSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getThriftSchema"); } ThriftHive_getThriftSchema_args args; @@ -2380,8 +2332,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getThriftSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getThriftSchema", bytes); } ThriftHive_getThriftSchema_result result; @@ -2392,8 +2344,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getThriftSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getThriftSchema"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2405,8 +2357,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getThriftSchema"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getThriftSchema"); } oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2415,21 +2367,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getThriftSchema", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getThriftSchema", bytes); } } void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getClusterStatus", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getClusterStatus", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getClusterStatus"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getClusterStatus"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getClusterStatus"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getClusterStatus"); } ThriftHive_getClusterStatus_args args; @@ -2437,8 +2389,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getClusterStatus", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getClusterStatus", bytes); } ThriftHive_getClusterStatus_result result; @@ -2449,8 +2401,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getClusterStatus"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getClusterStatus"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2462,8 +2414,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getClusterStatus"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getClusterStatus"); } oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2472,21 +2424,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getClusterStatus", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getClusterStatus", bytes); } } void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.getQueryPlan", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.getQueryPlan", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.getQueryPlan"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.getQueryPlan"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.getQueryPlan"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.getQueryPlan"); } ThriftHive_getQueryPlan_args args; @@ -2494,8 +2446,8 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.getQueryPlan", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.getQueryPlan", bytes); } ThriftHive_getQueryPlan_result result; @@ -2506,8 +2458,8 @@ result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.getQueryPlan"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.getQueryPlan"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2519,8 +2471,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.getQueryPlan"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.getQueryPlan"); } oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2529,21 +2481,21 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.getQueryPlan", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.getQueryPlan", bytes); } } void ThriftHiveProcessor::process_clean(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; - if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHive.clean", callContext); + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHive.clean", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHive.clean"); + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHive.clean"); - if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHive.clean"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHive.clean"); } ThriftHive_clean_args args; @@ -2551,16 +2503,16 @@ iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHive.clean", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHive.clean", bytes); } ThriftHive_clean_result result; try { iface_->clean(); } catch (const std::exception& e) { - if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHive.clean"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHive.clean"); } ::apache::thrift::TApplicationException x(e.what()); @@ -2572,8 +2524,8 @@ return; } - if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHive.clean"); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHive.clean"); } oprot->writeMessageBegin("clean", ::apache::thrift::protocol::T_REPLY, seqid); @@ -2582,10 +2534,16 @@ bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHive.clean", bytes); + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHive.clean", bytes); } } +::boost::shared_ptr< ::apache::thrift::TProcessor > ThriftHiveProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< ThriftHiveIfFactory > cleanup(handlerFactory_); + ::boost::shared_ptr< ThriftHiveIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new ThriftHiveProcessor(handler)); + return processor; +} }}} // namespace Index: service/src/gen/thrift/gen-cpp/hive_service_constants.h =================================================================== --- service/src/gen/thrift/gen-cpp/hive_service_constants.h (revision 1403799) +++ service/src/gen/thrift/gen-cpp/hive_service_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef hive_service_CONSTANTS_H #define hive_service_CONSTANTS_H Index: service/src/gen/thrift/gen-rb/hive_service_types.rb =================================================================== --- service/src/gen/thrift/gen-rb/hive_service_types.rb (revision 1403799) +++ service/src/gen/thrift/gen-rb/hive_service_types.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'fb303_types' require 'hive_metastore_types' require 'queryplan_types' @@ -31,13 +32,13 @@ REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'}, MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'}, MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'}, - STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState} + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::JobTrackerState} } def struct_fields; FIELDS; end def validate - unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state) + unless @state.nil? || ::JobTrackerState::VALID_VALUES.include?(@state) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') end end Index: service/src/gen/thrift/gen-rb/hive_service_constants.rb =================================================================== --- service/src/gen/thrift/gen-rb/hive_service_constants.rb (revision 1403799) +++ service/src/gen/thrift/gen-rb/hive_service_constants.rb (working copy) @@ -1,8 +1,9 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'hive_service_types' Index: service/src/gen/thrift/gen-rb/thrift_hive.rb =================================================================== --- service/src/gen/thrift/gen-rb/thrift_hive.rb (revision 1403799) +++ service/src/gen/thrift/gen-rb/thrift_hive.rb (working copy) @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,7 +9,7 @@ require 'hive_service_types' module ThriftHive - class Client < ThriftHiveMetastore::Client + class Client < ::ThriftHiveMetastore::Client include ::Thrift::Client def execute(query) @@ -155,7 +155,7 @@ end - class Processor < ThriftHiveMetastore::Processor + class Processor < ::ThriftHiveMetastore::Processor include ::Thrift::Processor def process_execute(seqid, iprot, oprot) @@ -163,7 +163,7 @@ result = Execute_result.new() begin @handler.execute(args.query) - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'execute', seqid) @@ -174,7 +174,7 @@ result = FetchOne_result.new() begin result.success = @handler.fetchOne() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'fetchOne', seqid) @@ -185,7 +185,7 @@ result = FetchN_result.new() begin result.success = @handler.fetchN(args.numRows) - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'fetchN', seqid) @@ -196,7 +196,7 @@ result = FetchAll_result.new() begin result.success = @handler.fetchAll() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'fetchAll', seqid) @@ -207,7 +207,7 @@ result = GetSchema_result.new() begin result.success = @handler.getSchema() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getSchema', seqid) @@ -218,7 +218,7 @@ result = GetThriftSchema_result.new() begin result.success = @handler.getThriftSchema() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getThriftSchema', seqid) @@ -229,7 +229,7 @@ result = GetClusterStatus_result.new() begin result.success = @handler.getClusterStatus() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getClusterStatus', seqid) @@ -240,7 +240,7 @@ result = GetQueryPlan_result.new() begin result.success = @handler.getQueryPlan() - rescue HiveServerException => ex + rescue ::HiveServerException => ex result.ex = ex end write_result(result, oprot, 'getQueryPlan', seqid) @@ -278,7 +278,7 @@ EX = 1 FIELDS = { - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -311,7 +311,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -345,7 +345,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -378,7 +378,7 @@ FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -410,8 +410,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -443,8 +443,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -476,8 +476,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::HiveClusterStatus}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end @@ -509,8 +509,8 @@ EX = 1 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan}, - EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::QueryPlan}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException} } def struct_fields; FIELDS; end Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java (revision 1403799) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -31,6 +41,12 @@ private static final org.apache.thrift.protocol.TField MAX_REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxReduceTasks", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveClusterStatusStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveClusterStatusTupleSchemeFactory()); + } + private int taskTrackers; // required private int mapTasks; // required private int reduceTasks; // required @@ -121,8 +137,7 @@ private static final int __REDUCETASKS_ISSET_ID = 2; private static final int __MAXMAPTASKS_ISSET_ID = 3; private static final int __MAXREDUCETASKS_ISSET_ID = 4; - private BitSet __isset_bit_vector = new BitSet(5); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -171,8 +186,7 @@ * Performs a deep copy on other. */ public HiveClusterStatus(HiveClusterStatus other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.taskTrackers = other.taskTrackers; this.mapTasks = other.mapTasks; this.reduceTasks = other.reduceTasks; @@ -212,16 +226,16 @@ } public void unsetTaskTrackers() { - __isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID); } /** Returns true if field taskTrackers is set (has been assigned a value) and false otherwise */ public boolean isSetTaskTrackers() { - return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID); } public void setTaskTrackersIsSet(boolean value) { - __isset_bit_vector.set(__TASKTRACKERS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASKTRACKERS_ISSET_ID, value); } public int getMapTasks() { @@ -234,16 +248,16 @@ } public void unsetMapTasks() { - __isset_bit_vector.clear(__MAPTASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAPTASKS_ISSET_ID); } /** Returns true if field mapTasks is set (has been assigned a value) and false otherwise */ public boolean isSetMapTasks() { - return __isset_bit_vector.get(__MAPTASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAPTASKS_ISSET_ID); } public void setMapTasksIsSet(boolean value) { - __isset_bit_vector.set(__MAPTASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAPTASKS_ISSET_ID, value); } public int getReduceTasks() { @@ -256,16 +270,16 @@ } public void unsetReduceTasks() { - __isset_bit_vector.clear(__REDUCETASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REDUCETASKS_ISSET_ID); } /** Returns true if field reduceTasks is set (has been assigned a value) and false otherwise */ public boolean isSetReduceTasks() { - return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __REDUCETASKS_ISSET_ID); } public void setReduceTasksIsSet(boolean value) { - __isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REDUCETASKS_ISSET_ID, value); } public int getMaxMapTasks() { @@ -278,16 +292,16 @@ } public void unsetMaxMapTasks() { - __isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID); } /** Returns true if field maxMapTasks is set (has been assigned a value) and false otherwise */ public boolean isSetMaxMapTasks() { - return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID); } public void setMaxMapTasksIsSet(boolean value) { - __isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMAPTASKS_ISSET_ID, value); } public int getMaxReduceTasks() { @@ -300,16 +314,16 @@ } public void unsetMaxReduceTasks() { - __isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID); } /** Returns true if field maxReduceTasks is set (has been assigned a value) and false otherwise */ public boolean isSetMaxReduceTasks() { - return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID); } public void setMaxReduceTasksIsSet(boolean value) { - __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXREDUCETASKS_ISSET_ID, value); } /** @@ -626,97 +640,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TASK_TRACKERS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.taskTrackers = iprot.readI32(); - setTaskTrackersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // MAP_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.mapTasks = iprot.readI32(); - setMapTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // REDUCE_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.reduceTasks = iprot.readI32(); - setReduceTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_MAP_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.maxMapTasks = iprot.readI32(); - setMaxMapTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // MAX_REDUCE_TASKS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.maxReduceTasks = iprot.readI32(); - setMaxReduceTasksIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // STATE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.state = JobTrackerState.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); - oprot.writeI32(this.taskTrackers); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); - oprot.writeI32(this.mapTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); - oprot.writeI32(this.reduceTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); - oprot.writeI32(this.maxMapTasks); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); - oprot.writeI32(this.maxReduceTasks); - oprot.writeFieldEnd(); - if (this.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeI32(this.state.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -757,6 +685,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -770,12 +699,199 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class HiveClusterStatusStandardSchemeFactory implements SchemeFactory { + public HiveClusterStatusStandardScheme getScheme() { + return new HiveClusterStatusStandardScheme(); + } + } + + private static class HiveClusterStatusStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveClusterStatus struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TASK_TRACKERS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.taskTrackers = iprot.readI32(); + struct.setTaskTrackersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MAP_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.mapTasks = iprot.readI32(); + struct.setMapTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // REDUCE_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.reduceTasks = iprot.readI32(); + struct.setReduceTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // MAX_MAP_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxMapTasks = iprot.readI32(); + struct.setMaxMapTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // MAX_REDUCE_TASKS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxReduceTasks = iprot.readI32(); + struct.setMaxReduceTasksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.state = JobTrackerState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveClusterStatus struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC); + oprot.writeI32(struct.taskTrackers); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC); + oprot.writeI32(struct.mapTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC); + oprot.writeI32(struct.reduceTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC); + oprot.writeI32(struct.maxMapTasks); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); + oprot.writeI32(struct.maxReduceTasks); + oprot.writeFieldEnd(); + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(struct.state.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveClusterStatusTupleSchemeFactory implements SchemeFactory { + public HiveClusterStatusTupleScheme getScheme() { + return new HiveClusterStatusTupleScheme(); + } + } + + private static class HiveClusterStatusTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveClusterStatus struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTaskTrackers()) { + optionals.set(0); + } + if (struct.isSetMapTasks()) { + optionals.set(1); + } + if (struct.isSetReduceTasks()) { + optionals.set(2); + } + if (struct.isSetMaxMapTasks()) { + optionals.set(3); + } + if (struct.isSetMaxReduceTasks()) { + optionals.set(4); + } + if (struct.isSetState()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetTaskTrackers()) { + oprot.writeI32(struct.taskTrackers); + } + if (struct.isSetMapTasks()) { + oprot.writeI32(struct.mapTasks); + } + if (struct.isSetReduceTasks()) { + oprot.writeI32(struct.reduceTasks); + } + if (struct.isSetMaxMapTasks()) { + oprot.writeI32(struct.maxMapTasks); + } + if (struct.isSetMaxReduceTasks()) { + oprot.writeI32(struct.maxReduceTasks); + } + if (struct.isSetState()) { + oprot.writeI32(struct.state.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveClusterStatus struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.taskTrackers = iprot.readI32(); + struct.setTaskTrackersIsSet(true); + } + if (incoming.get(1)) { + struct.mapTasks = iprot.readI32(); + struct.setMapTasksIsSet(true); + } + if (incoming.get(2)) { + struct.reduceTasks = iprot.readI32(); + struct.setReduceTasksIsSet(true); + } + if (incoming.get(3)) { + struct.maxMapTasks = iprot.readI32(); + struct.setMaxMapTasksIsSet(true); + } + if (incoming.get(4)) { + struct.maxReduceTasks = iprot.readI32(); + struct.setMaxReduceTasksIsSet(true); + } + if (incoming.get(5)) { + struct.state = JobTrackerState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } + } + } + } Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java (revision 1403799) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -21,13 +31,19 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HiveServerException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +public class HiveServerException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveServerException"); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField SQLSTATE_FIELD_DESC = new org.apache.thrift.protocol.TField("SQLState", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HiveServerExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HiveServerExceptionTupleSchemeFactory()); + } + private String message; // required private int errorCode; // required private String SQLState; // required @@ -98,8 +114,7 @@ // isset id assignments private static final int __ERRORCODE_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -132,8 +147,7 @@ * Performs a deep copy on other. */ public HiveServerException(HiveServerException other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetMessage()) { this.message = other.message; } @@ -188,16 +202,16 @@ } public void unsetErrorCode() { - __isset_bit_vector.clear(__ERRORCODE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORCODE_ISSET_ID); } /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */ public boolean isSetErrorCode() { - return __isset_bit_vector.get(__ERRORCODE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __ERRORCODE_ISSET_ID); } public void setErrorCodeIsSet(boolean value) { - __isset_bit_vector.set(__ERRORCODE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORCODE_ISSET_ID, value); } public String getSQLState() { @@ -395,65 +409,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MESSAGE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.message = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ERROR_CODE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.errorCode = iprot.readI32(); - setErrorCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // SQLSTATE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.SQLState = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); - oprot.writeI32(this.errorCode); - oprot.writeFieldEnd(); - if (this.SQLState != null) { - oprot.writeFieldBegin(SQLSTATE_FIELD_DESC); - oprot.writeString(this.SQLState); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -486,6 +446,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -499,12 +460,138 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class HiveServerExceptionStandardSchemeFactory implements SchemeFactory { + public HiveServerExceptionStandardScheme getScheme() { + return new HiveServerExceptionStandardScheme(); + } + } + + private static class HiveServerExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HiveServerException struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ERROR_CODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SQLSTATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.SQLState = iprot.readString(); + struct.setSQLStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, HiveServerException struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); + oprot.writeI32(struct.errorCode); + oprot.writeFieldEnd(); + if (struct.SQLState != null) { + oprot.writeFieldBegin(SQLSTATE_FIELD_DESC); + oprot.writeString(struct.SQLState); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HiveServerExceptionTupleSchemeFactory implements SchemeFactory { + public HiveServerExceptionTupleScheme getScheme() { + return new HiveServerExceptionTupleScheme(); + } + } + + private static class HiveServerExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HiveServerException struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + if (struct.isSetErrorCode()) { + optionals.set(1); + } + if (struct.isSetSQLState()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + if (struct.isSetErrorCode()) { + oprot.writeI32(struct.errorCode); + } + if (struct.isSetSQLState()) { + oprot.writeString(struct.SQLState); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HiveServerException struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + if (incoming.get(1)) { + struct.errorCode = iprot.readI32(); + struct.setErrorCodeIsSet(true); + } + if (incoming.get(2)) { + struct.SQLState = iprot.readString(); + struct.setSQLStateIsSet(true); + } + } + } + } Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java (revision 1403799) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; Index: service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java =================================================================== --- service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java (revision 1403799) +++ service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.service; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -592,7 +602,7 @@ } - public static class Processor extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor implements org.apache.thrift.TProcessor { + public static class Processor extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); @@ -615,16 +625,20 @@ return processMap; } - private static class execute extends org.apache.thrift.ProcessFunction { + public static class execute extends org.apache.thrift.ProcessFunction { public execute() { super("execute"); } - protected execute_args getEmptyArgsInstance() { + public execute_args getEmptyArgsInstance() { return new execute_args(); } - protected execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException { execute_result result = new execute_result(); try { iface.execute(args.query); @@ -635,16 +649,20 @@ } } - private static class fetchOne extends org.apache.thrift.ProcessFunction { + public static class fetchOne extends org.apache.thrift.ProcessFunction { public fetchOne() { super("fetchOne"); } - protected fetchOne_args getEmptyArgsInstance() { + public fetchOne_args getEmptyArgsInstance() { return new fetchOne_args(); } - protected fetchOne_result getResult(I iface, fetchOne_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public fetchOne_result getResult(I iface, fetchOne_args args) throws org.apache.thrift.TException { fetchOne_result result = new fetchOne_result(); try { result.success = iface.fetchOne(); @@ -655,16 +673,20 @@ } } - private static class fetchN extends org.apache.thrift.ProcessFunction { + public static class fetchN extends org.apache.thrift.ProcessFunction { public fetchN() { super("fetchN"); } - protected fetchN_args getEmptyArgsInstance() { + public fetchN_args getEmptyArgsInstance() { return new fetchN_args(); } - protected fetchN_result getResult(I iface, fetchN_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public fetchN_result getResult(I iface, fetchN_args args) throws org.apache.thrift.TException { fetchN_result result = new fetchN_result(); try { result.success = iface.fetchN(args.numRows); @@ -675,16 +697,20 @@ } } - private static class fetchAll extends org.apache.thrift.ProcessFunction { + public static class fetchAll extends org.apache.thrift.ProcessFunction { public fetchAll() { super("fetchAll"); } - protected fetchAll_args getEmptyArgsInstance() { + public fetchAll_args getEmptyArgsInstance() { return new fetchAll_args(); } - protected fetchAll_result getResult(I iface, fetchAll_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public fetchAll_result getResult(I iface, fetchAll_args args) throws org.apache.thrift.TException { fetchAll_result result = new fetchAll_result(); try { result.success = iface.fetchAll(); @@ -695,16 +721,20 @@ } } - private static class getSchema extends org.apache.thrift.ProcessFunction { + public static class getSchema extends org.apache.thrift.ProcessFunction { public getSchema() { super("getSchema"); } - protected getSchema_args getEmptyArgsInstance() { + public getSchema_args getEmptyArgsInstance() { return new getSchema_args(); } - protected getSchema_result getResult(I iface, getSchema_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getSchema_result getResult(I iface, getSchema_args args) throws org.apache.thrift.TException { getSchema_result result = new getSchema_result(); try { result.success = iface.getSchema(); @@ -715,16 +745,20 @@ } } - private static class getThriftSchema extends org.apache.thrift.ProcessFunction { + public static class getThriftSchema extends org.apache.thrift.ProcessFunction { public getThriftSchema() { super("getThriftSchema"); } - protected getThriftSchema_args getEmptyArgsInstance() { + public getThriftSchema_args getEmptyArgsInstance() { return new getThriftSchema_args(); } - protected getThriftSchema_result getResult(I iface, getThriftSchema_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getThriftSchema_result getResult(I iface, getThriftSchema_args args) throws org.apache.thrift.TException { getThriftSchema_result result = new getThriftSchema_result(); try { result.success = iface.getThriftSchema(); @@ -735,16 +769,20 @@ } } - private static class getClusterStatus extends org.apache.thrift.ProcessFunction { + public static class getClusterStatus extends org.apache.thrift.ProcessFunction { public getClusterStatus() { super("getClusterStatus"); } - protected getClusterStatus_args getEmptyArgsInstance() { + public getClusterStatus_args getEmptyArgsInstance() { return new getClusterStatus_args(); } - protected getClusterStatus_result getResult(I iface, getClusterStatus_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getClusterStatus_result getResult(I iface, getClusterStatus_args args) throws org.apache.thrift.TException { getClusterStatus_result result = new getClusterStatus_result(); try { result.success = iface.getClusterStatus(); @@ -755,16 +793,20 @@ } } - private static class getQueryPlan extends org.apache.thrift.ProcessFunction { + public static class getQueryPlan extends org.apache.thrift.ProcessFunction { public getQueryPlan() { super("getQueryPlan"); } - protected getQueryPlan_args getEmptyArgsInstance() { + public getQueryPlan_args getEmptyArgsInstance() { return new getQueryPlan_args(); } - protected getQueryPlan_result getResult(I iface, getQueryPlan_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public getQueryPlan_result getResult(I iface, getQueryPlan_args args) throws org.apache.thrift.TException { getQueryPlan_result result = new getQueryPlan_result(); try { result.success = iface.getQueryPlan(); @@ -775,16 +817,20 @@ } } - private static class clean extends org.apache.thrift.ProcessFunction { + public static class clean extends org.apache.thrift.ProcessFunction { public clean() { super("clean"); } - protected clean_args getEmptyArgsInstance() { + public clean_args getEmptyArgsInstance() { return new clean_args(); } - protected clean_result getResult(I iface, clean_args args) throws org.apache.thrift.TException { + protected boolean isOneway() { + return false; + } + + public clean_result getResult(I iface, clean_args args) throws org.apache.thrift.TException { clean_result result = new clean_result(); iface.clean(); return result; @@ -798,6 +844,12 @@ private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new execute_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new execute_argsTupleSchemeFactory()); + } + private String query; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -859,7 +911,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -1018,42 +1069,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // QUERY - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.query = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.query != null) { - oprot.writeFieldBegin(QUERY_FIELD_DESC); - oprot.writeString(this.query); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1074,6 +1094,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1092,6 +1113,88 @@ } } + private static class execute_argsStandardSchemeFactory implements SchemeFactory { + public execute_argsStandardScheme getScheme() { + return new execute_argsStandardScheme(); + } + } + + private static class execute_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, execute_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.query = iprot.readString(); + struct.setQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, execute_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.query != null) { + oprot.writeFieldBegin(QUERY_FIELD_DESC); + oprot.writeString(struct.query); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class execute_argsTupleSchemeFactory implements SchemeFactory { + public execute_argsTupleScheme getScheme() { + return new execute_argsTupleScheme(); + } + } + + private static class execute_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetQuery()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetQuery()) { + oprot.writeString(struct.query); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.query = iprot.readString(); + struct.setQueryIsSet(true); + } + } + } + } public static class execute_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -1099,6 +1202,12 @@ private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new execute_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new execute_resultTupleSchemeFactory()); + } + private HiveServerException ex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -1160,7 +1269,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -1319,43 +1427,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -1375,6 +1452,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1393,13 +1471,103 @@ } } + private static class execute_resultStandardSchemeFactory implements SchemeFactory { + public execute_resultStandardScheme getScheme() { + return new execute_resultStandardScheme(); + } + } + + private static class execute_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, execute_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, execute_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class execute_resultTupleSchemeFactory implements SchemeFactory { + public execute_resultTupleScheme getScheme() { + return new execute_resultTupleScheme(); + } + } + + private static class execute_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetEx()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class fetchOne_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchOne_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchOne_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchOne_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -1540,30 +1708,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1577,6 +1726,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1595,6 +1745,62 @@ } } + private static class fetchOne_argsStandardSchemeFactory implements SchemeFactory { + public fetchOne_argsStandardScheme getScheme() { + return new fetchOne_argsStandardScheme(); + } + } + + private static class fetchOne_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchOne_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchOne_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchOne_argsTupleSchemeFactory implements SchemeFactory { + public fetchOne_argsTupleScheme getScheme() { + return new fetchOne_argsTupleScheme(); + } + } + + private static class fetchOne_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchOne_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchOne_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class fetchOne_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -1603,6 +1809,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchOne_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchOne_resultTupleSchemeFactory()); + } + private String success; // required private HiveServerException ex; // required @@ -1668,7 +1880,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -1895,54 +2106,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.success = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -1970,6 +2139,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1988,6 +2158,113 @@ } } + private static class fetchOne_resultStandardSchemeFactory implements SchemeFactory { + public fetchOne_resultStandardScheme getScheme() { + return new fetchOne_resultStandardScheme(); + } + } + + private static class fetchOne_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchOne_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchOne_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchOne_resultTupleSchemeFactory implements SchemeFactory { + public fetchOne_resultTupleScheme getScheme() { + return new fetchOne_resultTupleScheme(); + } + } + + private static class fetchOne_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchOne_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchOne_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class fetchN_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -1995,6 +2272,12 @@ private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchN_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchN_argsTupleSchemeFactory()); + } + private int numRows; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -2057,8 +2340,7 @@ // isset id assignments private static final int __NUMROWS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -2083,8 +2365,7 @@ * Performs a deep copy on other. */ public fetchN_args(fetchN_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.numRows = other.numRows; } @@ -2108,16 +2389,16 @@ } public void unsetNumRows() { - __isset_bit_vector.clear(__NUMROWS_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); } /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ public boolean isSetNumRows() { - return __isset_bit_vector.get(__NUMROWS_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); } public void setNumRowsIsSet(boolean value) { - __isset_bit_vector.set(__NUMROWS_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -2218,41 +2499,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NUM_ROWS - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.numRows = iprot.readI32(); - setNumRowsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); - oprot.writeI32(this.numRows); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -2269,6 +2520,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2282,13 +2534,93 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class fetchN_argsStandardSchemeFactory implements SchemeFactory { + public fetchN_argsStandardScheme getScheme() { + return new fetchN_argsStandardScheme(); + } + } + + private static class fetchN_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchN_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NUM_ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchN_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); + oprot.writeI32(struct.numRows); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchN_argsTupleSchemeFactory implements SchemeFactory { + public fetchN_argsTupleScheme getScheme() { + return new fetchN_argsTupleScheme(); + } + } + + private static class fetchN_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchN_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNumRows()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNumRows()) { + oprot.writeI32(struct.numRows); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchN_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } + } + } + } public static class fetchN_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -2297,6 +2629,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchN_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchN_resultTupleSchemeFactory()); + } + private List success; // required private HiveServerException ex; // required @@ -2362,7 +2700,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -2609,71 +2946,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.success = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; // required - _elem2 = iprot.readString(); - this.success.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter3 : this.success) - { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -2701,6 +2979,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2719,13 +2998,158 @@ } } + private static class fetchN_resultStandardSchemeFactory implements SchemeFactory { + public fetchN_resultStandardScheme getScheme() { + return new fetchN_resultStandardScheme(); + } + } + + private static class fetchN_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchN_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.success = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + String _elem2; // required + _elem2 = iprot.readString(); + struct.success.add(_elem2); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchN_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter3 : struct.success) + { + oprot.writeString(_iter3); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchN_resultTupleSchemeFactory implements SchemeFactory { + public fetchN_resultTupleScheme getScheme() { + return new fetchN_resultTupleScheme(); + } + } + + private static class fetchN_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchN_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter4 : struct.success) + { + oprot.writeString(_iter4); + } + } + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchN_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + String _elem7; // required + _elem7 = iprot.readString(); + struct.success.add(_elem7); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class fetchAll_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAll_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchAll_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchAll_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -2866,30 +3290,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -2903,6 +3308,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -2921,6 +3327,62 @@ } } + private static class fetchAll_argsStandardSchemeFactory implements SchemeFactory { + public fetchAll_argsStandardScheme getScheme() { + return new fetchAll_argsStandardScheme(); + } + } + + private static class fetchAll_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAll_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAll_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchAll_argsTupleSchemeFactory implements SchemeFactory { + public fetchAll_argsTupleScheme getScheme() { + return new fetchAll_argsTupleScheme(); + } + } + + private static class fetchAll_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class fetchAll_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -2929,6 +3391,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fetchAll_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fetchAll_resultTupleSchemeFactory()); + } + private List success; // required private HiveServerException ex; // required @@ -2994,7 +3462,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -3241,71 +3708,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - this.success = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; // required - _elem6 = iprot.readString(); - this.success.add(_elem6); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter7 : this.success) - { - oprot.writeString(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -3333,6 +3741,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3351,13 +3760,158 @@ } } + private static class fetchAll_resultStandardSchemeFactory implements SchemeFactory { + public fetchAll_resultStandardScheme getScheme() { + return new fetchAll_resultStandardScheme(); + } + } + + private static class fetchAll_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAll_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.success = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + String _elem10; // required + _elem10 = iprot.readString(); + struct.success.add(_elem10); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, fetchAll_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (String _iter11 : struct.success) + { + oprot.writeString(_iter11); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fetchAll_resultTupleSchemeFactory implements SchemeFactory { + public fetchAll_resultTupleScheme getScheme() { + return new fetchAll_resultTupleScheme(); + } + } + + private static class fetchAll_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fetchAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter12 : struct.success) + { + oprot.writeString(_iter12); + } + } + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fetchAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list13.size); + for (int _i14 = 0; _i14 < _list13.size; ++_i14) + { + String _elem15; // required + _elem15 = iprot.readString(); + struct.success.add(_elem15); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getSchema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSchema_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getSchema_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getSchema_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -3498,30 +4052,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -3535,6 +4070,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3553,6 +4089,62 @@ } } + private static class getSchema_argsStandardSchemeFactory implements SchemeFactory { + public getSchema_argsStandardScheme getScheme() { + return new getSchema_argsStandardScheme(); + } + } + + private static class getSchema_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getSchema_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getSchema_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getSchema_argsTupleSchemeFactory implements SchemeFactory { + public getSchema_argsTupleScheme getScheme() { + return new getSchema_argsTupleScheme(); + } + } + + private static class getSchema_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getSchema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -3561,6 +4153,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getSchema_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getSchema_resultTupleSchemeFactory()); + } + private org.apache.hadoop.hive.metastore.api.Schema success; // required private HiveServerException ex; // required @@ -3626,7 +4224,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -3853,55 +4450,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -3929,6 +4483,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -3947,13 +4505,128 @@ } } + private static class getSchema_resultStandardSchemeFactory implements SchemeFactory { + public getSchema_resultStandardScheme getScheme() { + return new getSchema_resultStandardScheme(); + } + } + + private static class getSchema_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getSchema_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getSchema_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getSchema_resultTupleSchemeFactory implements SchemeFactory { + public getSchema_resultTupleScheme getScheme() { + return new getSchema_resultTupleScheme(); + } + } + + private static class getSchema_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getThriftSchema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftSchema_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getThriftSchema_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getThriftSchema_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -4094,30 +4767,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -4131,6 +4785,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4149,6 +4804,62 @@ } } + private static class getThriftSchema_argsStandardSchemeFactory implements SchemeFactory { + public getThriftSchema_argsStandardScheme getScheme() { + return new getThriftSchema_argsStandardScheme(); + } + } + + private static class getThriftSchema_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftSchema_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftSchema_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftSchema_argsTupleSchemeFactory implements SchemeFactory { + public getThriftSchema_argsTupleScheme getScheme() { + return new getThriftSchema_argsTupleScheme(); + } + } + + private static class getThriftSchema_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getThriftSchema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -4157,6 +4868,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getThriftSchema_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getThriftSchema_resultTupleSchemeFactory()); + } + private org.apache.hadoop.hive.metastore.api.Schema success; // required private HiveServerException ex; // required @@ -4222,7 +4939,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -4449,55 +5165,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new org.apache.hadoop.hive.metastore.api.Schema(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -4525,6 +5198,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4543,13 +5220,128 @@ } } + private static class getThriftSchema_resultStandardSchemeFactory implements SchemeFactory { + public getThriftSchema_resultStandardScheme getScheme() { + return new getThriftSchema_resultStandardScheme(); + } + } + + private static class getThriftSchema_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftSchema_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftSchema_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftSchema_resultTupleSchemeFactory implements SchemeFactory { + public getThriftSchema_resultTupleScheme getScheme() { + return new getThriftSchema_resultTupleScheme(); + } + } + + private static class getThriftSchema_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new org.apache.hadoop.hive.metastore.api.Schema(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getClusterStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getClusterStatus_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getClusterStatus_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClusterStatus_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -4690,30 +5482,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -4727,6 +5500,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4745,6 +5519,62 @@ } } + private static class getClusterStatus_argsStandardSchemeFactory implements SchemeFactory { + public getClusterStatus_argsStandardScheme getScheme() { + return new getClusterStatus_argsStandardScheme(); + } + } + + private static class getClusterStatus_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getClusterStatus_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getClusterStatus_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getClusterStatus_argsTupleSchemeFactory implements SchemeFactory { + public getClusterStatus_argsTupleScheme getScheme() { + return new getClusterStatus_argsTupleScheme(); + } + } + + private static class getClusterStatus_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getClusterStatus_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -4753,6 +5583,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getClusterStatus_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getClusterStatus_resultTupleSchemeFactory()); + } + private HiveClusterStatus success; // required private HiveServerException ex; // required @@ -4818,7 +5654,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -5045,55 +5880,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new HiveClusterStatus(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -5121,6 +5913,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5139,13 +5935,128 @@ } } + private static class getClusterStatus_resultStandardSchemeFactory implements SchemeFactory { + public getClusterStatus_resultStandardScheme getScheme() { + return new getClusterStatus_resultStandardScheme(); + } + } + + private static class getClusterStatus_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getClusterStatus_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new HiveClusterStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getClusterStatus_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getClusterStatus_resultTupleSchemeFactory implements SchemeFactory { + public getClusterStatus_resultTupleScheme getScheme() { + return new getClusterStatus_resultTupleScheme(); + } + } + + private static class getClusterStatus_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getClusterStatus_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new HiveClusterStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class getQueryPlan_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getQueryPlan_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getQueryPlan_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getQueryPlan_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -5286,30 +6197,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -5323,6 +6215,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5341,6 +6234,62 @@ } } + private static class getQueryPlan_argsStandardSchemeFactory implements SchemeFactory { + public getQueryPlan_argsStandardScheme getScheme() { + return new getQueryPlan_argsStandardScheme(); + } + } + + private static class getQueryPlan_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getQueryPlan_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getQueryPlan_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getQueryPlan_argsTupleSchemeFactory implements SchemeFactory { + public getQueryPlan_argsTupleScheme getScheme() { + return new getQueryPlan_argsTupleScheme(); + } + } + + private static class getQueryPlan_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class getQueryPlan_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { @@ -5349,6 +6298,12 @@ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getQueryPlan_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getQueryPlan_resultTupleSchemeFactory()); + } + private org.apache.hadoop.hive.ql.plan.api.QueryPlan success; // required private HiveServerException ex; // required @@ -5414,7 +6369,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -5641,55 +6595,12 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); - this.success.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // EX - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.ex = new HiveServerException(); - this.ex.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetEx()) { - oprot.writeFieldBegin(EX_FIELD_DESC); - this.ex.write(oprot); - oprot.writeFieldEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } @Override public String toString() { @@ -5717,6 +6628,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5735,13 +6650,128 @@ } } + private static class getQueryPlan_resultStandardSchemeFactory implements SchemeFactory { + public getQueryPlan_resultStandardScheme getScheme() { + return new getQueryPlan_resultStandardScheme(); + } + } + + private static class getQueryPlan_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getQueryPlan_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // EX + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getQueryPlan_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ex != null) { + oprot.writeFieldBegin(EX_FIELD_DESC); + struct.ex.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getQueryPlan_resultTupleSchemeFactory implements SchemeFactory { + public getQueryPlan_resultTupleScheme getScheme() { + return new getQueryPlan_resultTupleScheme(); + } + } + + private static class getQueryPlan_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetEx()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetEx()) { + struct.ex.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getQueryPlan_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex = new HiveServerException(); + struct.ex.read(iprot); + struct.setExIsSet(true); + } + } + } + } public static class clean_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clean_args"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new clean_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new clean_argsTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -5882,30 +6912,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -5919,6 +6930,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5937,13 +6949,75 @@ } } + private static class clean_argsStandardSchemeFactory implements SchemeFactory { + public clean_argsStandardScheme getScheme() { + return new clean_argsStandardScheme(); + } + } + + private static class clean_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, clean_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, clean_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class clean_argsTupleSchemeFactory implements SchemeFactory { + public clean_argsTupleScheme getScheme() { + return new clean_argsTupleScheme(); + } + } + + private static class clean_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, clean_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, clean_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } public static class clean_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clean_result"); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new clean_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new clean_resultTupleSchemeFactory()); + } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; @@ -6084,31 +7158,13 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - oprot.writeStructBegin(STRUCT_DESC); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - @Override public String toString() { StringBuilder sb = new StringBuilder("clean_result("); @@ -6120,6 +7176,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6138,6 +7195,62 @@ } } + private static class clean_resultStandardSchemeFactory implements SchemeFactory { + public clean_resultStandardScheme getScheme() { + return new clean_resultStandardScheme(); + } + } + + private static class clean_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, clean_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, clean_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class clean_resultTupleSchemeFactory implements SchemeFactory { + public clean_resultTupleScheme getScheme() { + return new clean_resultTupleScheme(); + } + } + + private static class clean_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, clean_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, clean_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + } } Index: service/src/gen/thrift/gen-php/ThriftHive.php =================================================================== --- service/src/gen/thrift/gen-php/ThriftHive.php (revision 0) +++ service/src/gen/thrift/gen-php/ThriftHive.php (revision 0) @@ -0,0 +1,1857 @@ +send_execute($query); + $this->recv_execute(); + } + + public function send_execute($query) + { + $args = new \ThriftHive_execute_args(); + $args->query = $query; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'execute', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('execute', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_execute() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_execute_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_execute_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->ex !== null) { + throw $result->ex; + } + return; + } + + public function fetchOne() + { + $this->send_fetchOne(); + return $this->recv_fetchOne(); + } + + public function send_fetchOne() + { + $args = new \ThriftHive_fetchOne_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchOne', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchOne', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchOne() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchOne_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_fetchOne_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("fetchOne failed: unknown result"); + } + + public function fetchN($numRows) + { + $this->send_fetchN($numRows); + return $this->recv_fetchN(); + } + + public function send_fetchN($numRows) + { + $args = new \ThriftHive_fetchN_args(); + $args->numRows = $numRows; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchN', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchN', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchN() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchN_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_fetchN_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("fetchN failed: unknown result"); + } + + public function fetchAll() + { + $this->send_fetchAll(); + return $this->recv_fetchAll(); + } + + public function send_fetchAll() + { + $args = new \ThriftHive_fetchAll_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchAll', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchAll() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchAll_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_fetchAll_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("fetchAll failed: unknown result"); + } + + public function getSchema() + { + $this->send_getSchema(); + return $this->recv_getSchema(); + } + + public function send_getSchema() + { + $args = new \ThriftHive_getSchema_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getSchema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getSchema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getSchema_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_getSchema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getSchema failed: unknown result"); + } + + public function getThriftSchema() + { + $this->send_getThriftSchema(); + return $this->recv_getThriftSchema(); + } + + public function send_getThriftSchema() + { + $args = new \ThriftHive_getThriftSchema_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getThriftSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getThriftSchema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getThriftSchema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getThriftSchema_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_getThriftSchema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getThriftSchema failed: unknown result"); + } + + public function getClusterStatus() + { + $this->send_getClusterStatus(); + return $this->recv_getClusterStatus(); + } + + public function send_getClusterStatus() + { + $args = new \ThriftHive_getClusterStatus_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getClusterStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getClusterStatus', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getClusterStatus() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getClusterStatus_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_getClusterStatus_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getClusterStatus failed: unknown result"); + } + + public function getQueryPlan() + { + $this->send_getQueryPlan(); + return $this->recv_getQueryPlan(); + } + + public function send_getQueryPlan() + { + $args = new \ThriftHive_getQueryPlan_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getQueryPlan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getQueryPlan', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getQueryPlan() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getQueryPlan_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_getQueryPlan_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new \Exception("getQueryPlan failed: unknown result"); + } + + public function clean() + { + $this->send_clean(); + $this->recv_clean(); + } + + public function send_clean() + { + $args = new \ThriftHive_clean_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'clean', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('clean', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_clean() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_clean_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ThriftHive_clean_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHive_execute_args { + static $_TSPEC; + + public $query = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'query', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['query'])) { + $this->query = $vals['query']; + } + } + } + + public function getName() { + return 'ThriftHive_execute_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->query); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_execute_args'); + if ($this->query !== null) { + $xfer += $output->writeFieldBegin('query', TType::STRING, 1); + $xfer += $output->writeString($this->query); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_execute_result { + static $_TSPEC; + + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_execute_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_execute_result'); + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchOne_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_fetchOne_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchOne_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchOne_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchOne_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchOne_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchN_args { + static $_TSPEC; + + public $numRows = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'numRows', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['numRows'])) { + $this->numRows = $vals['numRows']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchN_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->numRows); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchN_args'); + if ($this->numRows !== null) { + $xfer += $output->writeFieldBegin('numRows', TType::I32, 1); + $xfer += $output->writeI32($this->numRows); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchN_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchN_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->success []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchN_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchAll_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_fetchAll_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchAll_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchAll_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchAll_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->success []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_fetchAll_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter13) + { + $xfer += $output->writeString($iter13); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getSchema_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getSchema_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getSchema_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getSchema_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Schema', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getSchema_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Schema(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getSchema_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getThriftSchema_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getThriftSchema_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getThriftSchema_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Schema', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getThriftSchema_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\Schema(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getClusterStatus_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getClusterStatus_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getClusterStatus_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\HiveClusterStatus', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getClusterStatus_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \HiveClusterStatus(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getQueryPlan_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getQueryPlan_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getQueryPlan_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\QueryPlan', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => '\HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getQueryPlan_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \QueryPlan(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new \HiveServerException(); + $xfer += $this->ex->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_clean_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_clean_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_clean_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_clean_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_clean_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHive_clean_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + + Index: service/src/gen/thrift/gen-php/Types.php =================================================================== --- service/src/gen/thrift/gen-php/Types.php (revision 0) +++ service/src/gen/thrift/gen-php/Types.php (revision 0) @@ -0,0 +1,312 @@ + 'INITIALIZING', + 2 => 'RUNNING', + ); +} + +class HiveClusterStatus { + static $_TSPEC; + + public $taskTrackers = null; + public $mapTasks = null; + public $reduceTasks = null; + public $maxMapTasks = null; + public $maxReduceTasks = null; + public $state = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskTrackers', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'mapTasks', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'reduceTasks', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'maxMapTasks', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'maxReduceTasks', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskTrackers'])) { + $this->taskTrackers = $vals['taskTrackers']; + } + if (isset($vals['mapTasks'])) { + $this->mapTasks = $vals['mapTasks']; + } + if (isset($vals['reduceTasks'])) { + $this->reduceTasks = $vals['reduceTasks']; + } + if (isset($vals['maxMapTasks'])) { + $this->maxMapTasks = $vals['maxMapTasks']; + } + if (isset($vals['maxReduceTasks'])) { + $this->maxReduceTasks = $vals['maxReduceTasks']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + } + } + + public function getName() { + return 'HiveClusterStatus'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->taskTrackers); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->mapTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->reduceTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxMapTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxReduceTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('HiveClusterStatus'); + if ($this->taskTrackers !== null) { + $xfer += $output->writeFieldBegin('taskTrackers', TType::I32, 1); + $xfer += $output->writeI32($this->taskTrackers); + $xfer += $output->writeFieldEnd(); + } + if ($this->mapTasks !== null) { + $xfer += $output->writeFieldBegin('mapTasks', TType::I32, 2); + $xfer += $output->writeI32($this->mapTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->reduceTasks !== null) { + $xfer += $output->writeFieldBegin('reduceTasks', TType::I32, 3); + $xfer += $output->writeI32($this->reduceTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxMapTasks !== null) { + $xfer += $output->writeFieldBegin('maxMapTasks', TType::I32, 4); + $xfer += $output->writeI32($this->maxMapTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxReduceTasks !== null) { + $xfer += $output->writeFieldBegin('maxReduceTasks', TType::I32, 5); + $xfer += $output->writeI32($this->maxReduceTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 6); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveServerException extends TException { + static $_TSPEC; + + public $message = null; + public $errorCode = null; + public $SQLState = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'errorCode', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'SQLState', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + if (isset($vals['errorCode'])) { + $this->errorCode = $vals['errorCode']; + } + if (isset($vals['SQLState'])) { + $this->SQLState = $vals['SQLState']; + } + } + } + + public function getName() { + return 'HiveServerException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->errorCode); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->SQLState); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('HiveServerException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + if ($this->errorCode !== null) { + $xfer += $output->writeFieldBegin('errorCode', TType::I32, 2); + $xfer += $output->writeI32($this->errorCode); + $xfer += $output->writeFieldEnd(); + } + if ($this->SQLState !== null) { + $xfer += $output->writeFieldBegin('SQLState', TType::STRING, 3); + $xfer += $output->writeString($this->SQLState); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + + Index: serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py =================================================================== --- serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py (revision 1403799) +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol Index: serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py =================================================================== --- serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py (revision 1403799) +++ serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * SERIALIZATION_LIB = "serialization.lib" Index: serde/src/gen/thrift/gen-py/__init__.py =================================================================== Index: serde/src/gen/thrift/gen-cpp/serde_constants.cpp =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_constants.cpp (revision 1403799) +++ serde/src/gen/thrift/gen-cpp/serde_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "serde_constants.h" Index: serde/src/gen/thrift/gen-cpp/serde_constants.h =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_constants.h (revision 1403799) +++ serde/src/gen/thrift/gen-cpp/serde_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef serde_CONSTANTS_H #define serde_CONSTANTS_H Index: serde/src/gen/thrift/gen-cpp/serde_types.cpp =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_types.cpp (revision 1403799) +++ serde/src/gen/thrift/gen-cpp/serde_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "serde_types.h" +#include + namespace Hive { } // namespace Index: serde/src/gen/thrift/gen-cpp/serde_types.h =================================================================== --- serde/src/gen/thrift/gen-cpp/serde_types.h (revision 1403799) +++ serde/src/gen/thrift/gen-cpp/serde_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef serde_TYPES_H #define serde_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include Index: serde/src/gen/thrift/gen-rb/serde_constants.rb =================================================================== --- serde/src/gen/thrift/gen-rb/serde_constants.rb (revision 1403799) +++ serde/src/gen/thrift/gen-rb/serde_constants.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'serde_types' SERIALIZATION_LIB = %q"serialization.lib" Index: serde/src/gen/thrift/gen-rb/serde_types.rb =================================================================== --- serde/src/gen/thrift/gen-rb/serde_types.rb (revision 1403799) +++ serde/src/gen/thrift/gen-rb/serde_types.rb (working copy) @@ -1,7 +1,8 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java (revision 1403799) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -25,6 +35,12 @@ private static final org.apache.thrift.protocol.TField FIELD0_FIELD_DESC = new org.apache.thrift.protocol.TField("field0", org.apache.thrift.protocol.TType.I32, (short)1); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InnerStructStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InnerStructTupleSchemeFactory()); + } + private int field0; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -87,8 +103,7 @@ // isset id assignments private static final int __FIELD0_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -113,8 +128,7 @@ * Performs a deep copy on other. */ public InnerStruct(InnerStruct other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.field0 = other.field0; } @@ -138,16 +152,16 @@ } public void unsetField0() { - __isset_bit_vector.clear(__FIELD0_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FIELD0_ISSET_ID); } /** Returns true if field field0 is set (has been assigned a value) and false otherwise */ public boolean isSetField0() { - return __isset_bit_vector.get(__FIELD0_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __FIELD0_ISSET_ID); } public void setField0IsSet(boolean value) { - __isset_bit_vector.set(__FIELD0_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FIELD0_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -241,41 +255,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // FIELD0 - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.field0 = iprot.readI32(); - setField0IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD0_FIELD_DESC); - oprot.writeI32(this.field0); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -292,6 +276,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -305,12 +290,92 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class InnerStructStandardSchemeFactory implements SchemeFactory { + public InnerStructStandardScheme getScheme() { + return new InnerStructStandardScheme(); + } + } + + private static class InnerStructStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InnerStruct struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FIELD0 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.field0 = iprot.readI32(); + struct.setField0IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, InnerStruct struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD0_FIELD_DESC); + oprot.writeI32(struct.field0); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InnerStructTupleSchemeFactory implements SchemeFactory { + public InnerStructTupleScheme getScheme() { + return new InnerStructTupleScheme(); + } + } + + private static class InnerStructTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InnerStruct struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetField0()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetField0()) { + oprot.writeI32(struct.field0); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InnerStruct struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.field0 = iprot.readI32(); + struct.setField0IsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java (revision 1403799) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField FIELD2_FIELD_DESC = new org.apache.thrift.protocol.TField("field2", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FIELD3_FIELD_DESC = new org.apache.thrift.protocol.TField("field3", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ThriftTestObjStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ThriftTestObjTupleSchemeFactory()); + } + private int field1; // required private String field2; // required private List field3; // required @@ -97,8 +113,7 @@ // isset id assignments private static final int __FIELD1_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -132,8 +147,7 @@ * Performs a deep copy on other. */ public ThriftTestObj(ThriftTestObj other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.field1 = other.field1; if (other.isSetField2()) { this.field2 = other.field2; @@ -169,16 +183,16 @@ } public void unsetField1() { - __isset_bit_vector.clear(__FIELD1_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FIELD1_ISSET_ID); } /** Returns true if field field1 is set (has been assigned a value) and false otherwise */ public boolean isSetField1() { - return __isset_bit_vector.get(__FIELD1_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __FIELD1_ISSET_ID); } public void setField1IsSet(boolean value) { - __isset_bit_vector.set(__FIELD1_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FIELD1_ISSET_ID, value); } public String getField2() { @@ -397,83 +411,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // FIELD1 - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.field1 = iprot.readI32(); - setField1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // FIELD2 - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.field2 = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // FIELD3 - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.field3 = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - InnerStruct _elem2; // required - _elem2 = new InnerStruct(); - _elem2.read(iprot); - this.field3.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD1_FIELD_DESC); - oprot.writeI32(this.field1); - oprot.writeFieldEnd(); - if (this.field2 != null) { - oprot.writeFieldBegin(FIELD2_FIELD_DESC); - oprot.writeString(this.field2); - oprot.writeFieldEnd(); - } - if (this.field3 != null) { - oprot.writeFieldBegin(FIELD3_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.field3.size())); - for (InnerStruct _iter3 : this.field3) - { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -506,6 +448,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -519,12 +462,172 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class ThriftTestObjStandardSchemeFactory implements SchemeFactory { + public ThriftTestObjStandardScheme getScheme() { + return new ThriftTestObjStandardScheme(); + } + } + + private static class ThriftTestObjStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftTestObj struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // FIELD1 + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.field1 = iprot.readI32(); + struct.setField1IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FIELD2 + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.field2 = iprot.readString(); + struct.setField2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FIELD3 + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.field3 = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + InnerStruct _elem2; // required + _elem2 = new InnerStruct(); + _elem2.read(iprot); + struct.field3.add(_elem2); + } + iprot.readListEnd(); + } + struct.setField3IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ThriftTestObj struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD1_FIELD_DESC); + oprot.writeI32(struct.field1); + oprot.writeFieldEnd(); + if (struct.field2 != null) { + oprot.writeFieldBegin(FIELD2_FIELD_DESC); + oprot.writeString(struct.field2); + oprot.writeFieldEnd(); + } + if (struct.field3 != null) { + oprot.writeFieldBegin(FIELD3_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.field3.size())); + for (InnerStruct _iter3 : struct.field3) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ThriftTestObjTupleSchemeFactory implements SchemeFactory { + public ThriftTestObjTupleScheme getScheme() { + return new ThriftTestObjTupleScheme(); + } + } + + private static class ThriftTestObjTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ThriftTestObj struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetField1()) { + optionals.set(0); + } + if (struct.isSetField2()) { + optionals.set(1); + } + if (struct.isSetField3()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetField1()) { + oprot.writeI32(struct.field1); + } + if (struct.isSetField2()) { + oprot.writeString(struct.field2); + } + if (struct.isSetField3()) { + { + oprot.writeI32(struct.field3.size()); + for (InnerStruct _iter4 : struct.field3) + { + _iter4.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ThriftTestObj struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.field1 = iprot.readI32(); + struct.setField1IsSet(true); + } + if (incoming.get(1)) { + struct.field2 = iprot.readString(); + struct.setField2IsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.field3 = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + InnerStruct _elem7; // required + _elem7 = new InnerStruct(); + _elem7.read(iprot); + struct.field3.add(_elem7); + } + } + struct.setField3IsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java (revision 0) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/serdeConstants.java (revision 0) @@ -0,0 +1,125 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.serde; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class serdeConstants { + + public static final String SERIALIZATION_LIB = "serialization.lib"; + + public static final String SERIALIZATION_CLASS = "serialization.class"; + + public static final String SERIALIZATION_FORMAT = "serialization.format"; + + public static final String SERIALIZATION_DDL = "serialization.ddl"; + + public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; + + public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; + + public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; + + public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; + + public static final String FIELD_DELIM = "field.delim"; + + public static final String COLLECTION_DELIM = "colelction.delim"; + + public static final String LINE_DELIM = "line.delim"; + + public static final String MAPKEY_DELIM = "mapkey.delim"; + + public static final String QUOTE_CHAR = "quote.delim"; + + public static final String ESCAPE_CHAR = "escape.delim"; + + public static final String VOID_TYPE_NAME = "void"; + + public static final String BOOLEAN_TYPE_NAME = "boolean"; + + public static final String TINYINT_TYPE_NAME = "tinyint"; + + public static final String SMALLINT_TYPE_NAME = "smallint"; + + public static final String INT_TYPE_NAME = "int"; + + public static final String BIGINT_TYPE_NAME = "bigint"; + + public static final String FLOAT_TYPE_NAME = "float"; + + public static final String DOUBLE_TYPE_NAME = "double"; + + public static final String STRING_TYPE_NAME = "string"; + + public static final String DATE_TYPE_NAME = "date"; + + public static final String DATETIME_TYPE_NAME = "datetime"; + + public static final String TIMESTAMP_TYPE_NAME = "timestamp"; + + public static final String BINARY_TYPE_NAME = "binary"; + + public static final String LIST_TYPE_NAME = "array"; + + public static final String MAP_TYPE_NAME = "map"; + + public static final String STRUCT_TYPE_NAME = "struct"; + + public static final String UNION_TYPE_NAME = "uniontype"; + + public static final String LIST_COLUMNS = "columns"; + + public static final String LIST_COLUMN_TYPES = "columns.types"; + + public static final Set PrimitiveTypes = new HashSet(); + static { + PrimitiveTypes.add("void"); + PrimitiveTypes.add("boolean"); + PrimitiveTypes.add("tinyint"); + PrimitiveTypes.add("smallint"); + PrimitiveTypes.add("int"); + PrimitiveTypes.add("bigint"); + PrimitiveTypes.add("float"); + PrimitiveTypes.add("double"); + PrimitiveTypes.add("string"); + PrimitiveTypes.add("date"); + PrimitiveTypes.add("datetime"); + PrimitiveTypes.add("timestamp"); + PrimitiveTypes.add("binary"); + } + + public static final Set CollectionTypes = new HashSet(); + static { + CollectionTypes.add("array"); + CollectionTypes.add("map"); + } + +} Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java (revision 1403799) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -27,6 +37,12 @@ private static final org.apache.thrift.protocol.TField MY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("myString", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField UNDERSCORE_INT_FIELD_DESC = new org.apache.thrift.protocol.TField("underscore_int", org.apache.thrift.protocol.TType.I32, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IntStringStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IntStringTupleSchemeFactory()); + } + private int myint; // required private String myString; // required private int underscore_int; // required @@ -98,8 +114,7 @@ // isset id assignments private static final int __MYINT_ISSET_ID = 0; private static final int __UNDERSCORE_INT_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -133,8 +148,7 @@ * Performs a deep copy on other. */ public IntString(IntString other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.myint = other.myint; if (other.isSetMyString()) { this.myString = other.myString; @@ -165,16 +179,16 @@ } public void unsetMyint() { - __isset_bit_vector.clear(__MYINT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MYINT_ISSET_ID); } /** Returns true if field myint is set (has been assigned a value) and false otherwise */ public boolean isSetMyint() { - return __isset_bit_vector.get(__MYINT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __MYINT_ISSET_ID); } public void setMyintIsSet(boolean value) { - __isset_bit_vector.set(__MYINT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MYINT_ISSET_ID, value); } public String getMyString() { @@ -210,16 +224,16 @@ } public void unsetUnderscore_int() { - __isset_bit_vector.clear(__UNDERSCORE_INT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UNDERSCORE_INT_ISSET_ID); } /** Returns true if field underscore_int is set (has been assigned a value) and false otherwise */ public boolean isSetUnderscore_int() { - return __isset_bit_vector.get(__UNDERSCORE_INT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __UNDERSCORE_INT_ISSET_ID); } public void setUnderscore_intIsSet(boolean value) { - __isset_bit_vector.set(__UNDERSCORE_INT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UNDERSCORE_INT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -377,64 +391,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // MYINT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.myint = iprot.readI32(); - setMyintIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // MY_STRING - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.myString = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // UNDERSCORE_INT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.underscore_int = iprot.readI32(); - setUnderscore_intIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MYINT_FIELD_DESC); - oprot.writeI32(this.myint); - oprot.writeFieldEnd(); - if (this.myString != null) { - oprot.writeFieldBegin(MY_STRING_FIELD_DESC); - oprot.writeString(this.myString); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); - oprot.writeI32(this.underscore_int); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -463,6 +424,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -476,12 +438,136 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class IntStringStandardSchemeFactory implements SchemeFactory { + public IntStringStandardScheme getScheme() { + return new IntStringStandardScheme(); + } + } + + private static class IntStringStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, IntString struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MYINT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.myint = iprot.readI32(); + struct.setMyintIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MY_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.myString = iprot.readString(); + struct.setMyStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // UNDERSCORE_INT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.underscore_int = iprot.readI32(); + struct.setUnderscore_intIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, IntString struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MYINT_FIELD_DESC); + oprot.writeI32(struct.myint); + oprot.writeFieldEnd(); + if (struct.myString != null) { + oprot.writeFieldBegin(MY_STRING_FIELD_DESC); + oprot.writeString(struct.myString); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); + oprot.writeI32(struct.underscore_int); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IntStringTupleSchemeFactory implements SchemeFactory { + public IntStringTupleScheme getScheme() { + return new IntStringTupleScheme(); + } + } + + private static class IntStringTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, IntString struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMyint()) { + optionals.set(0); + } + if (struct.isSetMyString()) { + optionals.set(1); + } + if (struct.isSetUnderscore_int()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetMyint()) { + oprot.writeI32(struct.myint); + } + if (struct.isSetMyString()) { + oprot.writeString(struct.myString); + } + if (struct.isSetUnderscore_int()) { + oprot.writeI32(struct.underscore_int); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, IntString struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.myint = iprot.readI32(); + struct.setMyintIsSet(true); + } + if (incoming.get(1)) { + struct.myString = iprot.readString(); + struct.setMyStringIsSet(true); + } + if (incoming.get(2)) { + struct.underscore_int = iprot.readI32(); + struct.setUnderscore_intIsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java =================================================================== --- serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java (revision 1403799) +++ serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java (working copy) @@ -1,10 +1,20 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.serde2.thrift.test; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -30,6 +40,12 @@ private static final org.apache.thrift.protocol.TField LINT_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("lintString", org.apache.thrift.protocol.TType.LIST, (short)5); private static final org.apache.thrift.protocol.TField M_STRING_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("mStringString", org.apache.thrift.protocol.TType.MAP, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ComplexStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ComplexTupleSchemeFactory()); + } + private int aint; // required private String aString; // required private List lint; // required @@ -112,8 +128,7 @@ // isset id assignments private static final int __AINT_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -163,8 +178,7 @@ * Performs a deep copy on other. */ public Complex(Complex other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; this.aint = other.aint; if (other.isSetAString()) { this.aString = other.aString; @@ -232,16 +246,16 @@ } public void unsetAint() { - __isset_bit_vector.clear(__AINT_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AINT_ISSET_ID); } /** Returns true if field aint is set (has been assigned a value) and false otherwise */ public boolean isSetAint() { - return __isset_bit_vector.get(__AINT_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __AINT_ISSET_ID); } public void setAintIsSet(boolean value) { - __isset_bit_vector.set(__AINT_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AINT_ISSET_ID, value); } public String getAString() { @@ -666,173 +680,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // AINT - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.aint = iprot.readI32(); - setAintIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // A_STRING - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.aString = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // LINT - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.lint = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - int _elem2; // required - _elem2 = iprot.readI32(); - this.lint.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // L_STRING - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); - this.lString = new ArrayList(_list3.size); - for (int _i4 = 0; _i4 < _list3.size; ++_i4) - { - String _elem5; // required - _elem5 = iprot.readString(); - this.lString.add(_elem5); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // LINT_STRING - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); - this.lintString = new ArrayList(_list6.size); - for (int _i7 = 0; _i7 < _list6.size; ++_i7) - { - IntString _elem8; // required - _elem8 = new IntString(); - _elem8.read(iprot); - this.lintString.add(_elem8); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // M_STRING_STRING - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin(); - this.mStringString = new HashMap(2*_map9.size); - for (int _i10 = 0; _i10 < _map9.size; ++_i10) - { - String _key11; // required - String _val12; // required - _key11 = iprot.readString(); - _val12 = iprot.readString(); - this.mStringString.put(_key11, _val12); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(AINT_FIELD_DESC); - oprot.writeI32(this.aint); - oprot.writeFieldEnd(); - if (this.aString != null) { - oprot.writeFieldBegin(A_STRING_FIELD_DESC); - oprot.writeString(this.aString); - oprot.writeFieldEnd(); - } - if (this.lint != null) { - oprot.writeFieldBegin(LINT_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.lint.size())); - for (int _iter13 : this.lint) - { - oprot.writeI32(_iter13); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lString != null) { - oprot.writeFieldBegin(L_STRING_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.lString.size())); - for (String _iter14 : this.lString) - { - oprot.writeString(_iter14); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lintString != null) { - oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lintString.size())); - for (IntString _iter15 : this.lintString) - { - _iter15.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.mStringString != null) { - oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.mStringString.size())); - for (Map.Entry _iter16 : this.mStringString.entrySet()) - { - oprot.writeString(_iter16.getKey()); - oprot.writeString(_iter16.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -889,6 +741,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -902,12 +755,343 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class ComplexStandardSchemeFactory implements SchemeFactory { + public ComplexStandardScheme getScheme() { + return new ComplexStandardScheme(); + } + } + + private static class ComplexStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Complex struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // AINT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.aint = iprot.readI32(); + struct.setAintIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // A_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.aString = iprot.readString(); + struct.setAStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LINT + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.lint = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + int _elem2; // required + _elem2 = iprot.readI32(); + struct.lint.add(_elem2); + } + iprot.readListEnd(); + } + struct.setLintIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // L_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); + struct.lString = new ArrayList(_list3.size); + for (int _i4 = 0; _i4 < _list3.size; ++_i4) + { + String _elem5; // required + _elem5 = iprot.readString(); + struct.lString.add(_elem5); + } + iprot.readListEnd(); + } + struct.setLStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LINT_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); + struct.lintString = new ArrayList(_list6.size); + for (int _i7 = 0; _i7 < _list6.size; ++_i7) + { + IntString _elem8; // required + _elem8 = new IntString(); + _elem8.read(iprot); + struct.lintString.add(_elem8); + } + iprot.readListEnd(); + } + struct.setLintStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // M_STRING_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin(); + struct.mStringString = new HashMap(2*_map9.size); + for (int _i10 = 0; _i10 < _map9.size; ++_i10) + { + String _key11; // required + String _val12; // required + _key11 = iprot.readString(); + _val12 = iprot.readString(); + struct.mStringString.put(_key11, _val12); + } + iprot.readMapEnd(); + } + struct.setMStringStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Complex struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(AINT_FIELD_DESC); + oprot.writeI32(struct.aint); + oprot.writeFieldEnd(); + if (struct.aString != null) { + oprot.writeFieldBegin(A_STRING_FIELD_DESC); + oprot.writeString(struct.aString); + oprot.writeFieldEnd(); + } + if (struct.lint != null) { + oprot.writeFieldBegin(LINT_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.lint.size())); + for (int _iter13 : struct.lint) + { + oprot.writeI32(_iter13); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.lString != null) { + oprot.writeFieldBegin(L_STRING_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.lString.size())); + for (String _iter14 : struct.lString) + { + oprot.writeString(_iter14); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.lintString != null) { + oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.lintString.size())); + for (IntString _iter15 : struct.lintString) + { + _iter15.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.mStringString != null) { + oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.mStringString.size())); + for (Map.Entry _iter16 : struct.mStringString.entrySet()) + { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ComplexTupleSchemeFactory implements SchemeFactory { + public ComplexTupleScheme getScheme() { + return new ComplexTupleScheme(); + } + } + + private static class ComplexTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Complex struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetAint()) { + optionals.set(0); + } + if (struct.isSetAString()) { + optionals.set(1); + } + if (struct.isSetLint()) { + optionals.set(2); + } + if (struct.isSetLString()) { + optionals.set(3); + } + if (struct.isSetLintString()) { + optionals.set(4); + } + if (struct.isSetMStringString()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetAint()) { + oprot.writeI32(struct.aint); + } + if (struct.isSetAString()) { + oprot.writeString(struct.aString); + } + if (struct.isSetLint()) { + { + oprot.writeI32(struct.lint.size()); + for (int _iter17 : struct.lint) + { + oprot.writeI32(_iter17); + } + } + } + if (struct.isSetLString()) { + { + oprot.writeI32(struct.lString.size()); + for (String _iter18 : struct.lString) + { + oprot.writeString(_iter18); + } + } + } + if (struct.isSetLintString()) { + { + oprot.writeI32(struct.lintString.size()); + for (IntString _iter19 : struct.lintString) + { + _iter19.write(oprot); + } + } + } + if (struct.isSetMStringString()) { + { + oprot.writeI32(struct.mStringString.size()); + for (Map.Entry _iter20 : struct.mStringString.entrySet()) + { + oprot.writeString(_iter20.getKey()); + oprot.writeString(_iter20.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Complex struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.aint = iprot.readI32(); + struct.setAintIsSet(true); + } + if (incoming.get(1)) { + struct.aString = iprot.readString(); + struct.setAStringIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.lint = new ArrayList(_list21.size); + for (int _i22 = 0; _i22 < _list21.size; ++_i22) + { + int _elem23; // required + _elem23 = iprot.readI32(); + struct.lint.add(_elem23); + } + } + struct.setLintIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list24 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.lString = new ArrayList(_list24.size); + for (int _i25 = 0; _i25 < _list24.size; ++_i25) + { + String _elem26; // required + _elem26 = iprot.readString(); + struct.lString.add(_elem26); + } + } + struct.setLStringIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list27 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.lintString = new ArrayList(_list27.size); + for (int _i28 = 0; _i28 < _list27.size; ++_i28) + { + IntString _elem29; // required + _elem29 = new IntString(); + _elem29.read(iprot); + struct.lintString.add(_elem29); + } + } + struct.setLintStringIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TMap _map30 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.mStringString = new HashMap(2*_map30.size); + for (int _i31 = 0; _i31 < _map30.size; ++_i31) + { + String _key32; // required + String _val33; // required + _key32 = iprot.readString(); + _val33 = iprot.readString(); + struct.mStringString.put(_key32, _val33); + } + } + struct.setMStringStringIsSet(true); + } + } + } + } Index: serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php =================================================================== --- serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php (revision 0) +++ serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php (revision 0) @@ -0,0 +1,106 @@ + true, + "boolean" => true, + "tinyint" => true, + "smallint" => true, + "int" => true, + "bigint" => true, + "float" => true, + "double" => true, + "string" => true, + "date" => true, + "datetime" => true, + "timestamp" => true, + "binary" => true, +); + +$GLOBALS['serde_CONSTANTS']['CollectionTypes'] = array( + "array" => true, + "map" => true, +); + + Index: ql/src/gen/thrift/gen-py/queryplan/ttypes.py =================================================================== --- ql/src/gen/thrift/gen-py/queryplan/ttypes.py (revision 1403799) +++ ql/src/gen/thrift/gen-py/queryplan/ttypes.py (working copy) @@ -1,10 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol Index: ql/src/gen/thrift/gen-py/queryplan/constants.py =================================================================== --- ql/src/gen/thrift/gen-py/queryplan/constants.py (revision 1403799) +++ ql/src/gen/thrift/gen-py/queryplan/constants.py (working copy) @@ -1,9 +1,11 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +# options string: py +# -from thrift.Thrift import * +from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * Index: ql/src/gen/thrift/gen-py/__init__.py =================================================================== Index: ql/src/gen/thrift/gen-cpp/queryplan_constants.h =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_constants.h (revision 1403799) +++ ql/src/gen/thrift/gen-cpp/queryplan_constants.h (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef queryplan_CONSTANTS_H #define queryplan_CONSTANTS_H Index: ql/src/gen/thrift/gen-cpp/queryplan_types.cpp =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_types.cpp (revision 1403799) +++ ql/src/gen/thrift/gen-cpp/queryplan_types.cpp (working copy) @@ -1,10 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "queryplan_types.h" +#include + namespace Apache { namespace Hadoop { namespace Hive { int _kAdjacencyTypeValues[] = { @@ -146,14 +149,14 @@ this->children.clear(); uint32_t _size0; ::apache::thrift::protocol::TType _etype3; - iprot->readListBegin(_etype3, _size0); + xfer += iprot->readListBegin(_etype3, _size0); this->children.resize(_size0); uint32_t _i4; for (_i4 = 0; _i4 < _size0; ++_i4) { xfer += iprot->readString(this->children[_i4]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.children = true; } else { @@ -185,9 +188,11 @@ uint32_t Adjacency::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Adjacency"); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->node); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("children", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->children.size())); @@ -199,14 +204,24 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyType", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->adjacencyType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Adjacency &a, Adjacency &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.children, b.children); + swap(a.adjacencyType, b.adjacencyType); + swap(a.__isset, b.__isset); +} + const char* Graph::ascii_fingerprint = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; const uint8_t Graph::binary_fingerprint[16] = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; @@ -246,14 +261,14 @@ this->roots.clear(); uint32_t _size8; ::apache::thrift::protocol::TType _etype11; - iprot->readListBegin(_etype11, _size8); + xfer += iprot->readListBegin(_etype11, _size8); this->roots.resize(_size8); uint32_t _i12; for (_i12 = 0; _i12 < _size8; ++_i12) { xfer += iprot->readString(this->roots[_i12]); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.roots = true; } else { @@ -266,14 +281,14 @@ this->adjacencyList.clear(); uint32_t _size13; ::apache::thrift::protocol::TType _etype16; - iprot->readListBegin(_etype16, _size13); + xfer += iprot->readListBegin(_etype16, _size13); this->adjacencyList.resize(_size13); uint32_t _i17; for (_i17 = 0; _i17 < _size13; ++_i17) { xfer += this->adjacencyList[_i17].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.adjacencyList = true; } else { @@ -295,9 +310,11 @@ uint32_t Graph::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Graph"); + xfer += oprot->writeFieldBegin("nodeType", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->nodeType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("roots", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->roots.size())); @@ -309,6 +326,7 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyList", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->adjacencyList.size())); @@ -320,11 +338,20 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Graph &a, Graph &b) { + using ::std::swap; + swap(a.nodeType, b.nodeType); + swap(a.roots, b.roots); + swap(a.adjacencyList, b.adjacencyList); + swap(a.__isset, b.__isset); +} + const char* Operator::ascii_fingerprint = "30917C758A752485AF223B697479DE6C"; const uint8_t Operator::binary_fingerprint[16] = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; @@ -373,7 +400,7 @@ uint32_t _size21; ::apache::thrift::protocol::TType _ktype22; ::apache::thrift::protocol::TType _vtype23; - iprot->readMapBegin(_ktype22, _vtype23, _size21); + xfer += iprot->readMapBegin(_ktype22, _vtype23, _size21); uint32_t _i25; for (_i25 = 0; _i25 < _size21; ++_i25) { @@ -382,7 +409,7 @@ std::string& _val27 = this->operatorAttributes[_key26]; xfer += iprot->readString(_val27); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.operatorAttributes = true; } else { @@ -396,7 +423,7 @@ uint32_t _size28; ::apache::thrift::protocol::TType _ktype29; ::apache::thrift::protocol::TType _vtype30; - iprot->readMapBegin(_ktype29, _vtype30, _size28); + xfer += iprot->readMapBegin(_ktype29, _vtype30, _size28); uint32_t _i32; for (_i32 = 0; _i32 < _size28; ++_i32) { @@ -405,7 +432,7 @@ int64_t& _val34 = this->operatorCounters[_key33]; xfer += iprot->readI64(_val34); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.operatorCounters = true; } else { @@ -443,12 +470,15 @@ uint32_t Operator::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Operator"); + xfer += oprot->writeFieldBegin("operatorId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->operatorId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorType", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->operatorType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->operatorAttributes.size())); @@ -461,6 +491,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->operatorCounters.size())); @@ -473,17 +504,31 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Operator &a, Operator &b) { + using ::std::swap; + swap(a.operatorId, b.operatorId); + swap(a.operatorType, b.operatorType); + swap(a.operatorAttributes, b.operatorAttributes); + swap(a.operatorCounters, b.operatorCounters); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* Task::ascii_fingerprint = "AC741A136EFA51843AFC3A12F6A793D1"; const uint8_t Task::binary_fingerprint[16] = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; @@ -532,7 +577,7 @@ uint32_t _size38; ::apache::thrift::protocol::TType _ktype39; ::apache::thrift::protocol::TType _vtype40; - iprot->readMapBegin(_ktype39, _vtype40, _size38); + xfer += iprot->readMapBegin(_ktype39, _vtype40, _size38); uint32_t _i42; for (_i42 = 0; _i42 < _size38; ++_i42) { @@ -541,7 +586,7 @@ std::string& _val44 = this->taskAttributes[_key43]; xfer += iprot->readString(_val44); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.taskAttributes = true; } else { @@ -555,7 +600,7 @@ uint32_t _size45; ::apache::thrift::protocol::TType _ktype46; ::apache::thrift::protocol::TType _vtype47; - iprot->readMapBegin(_ktype46, _vtype47, _size45); + xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45); uint32_t _i49; for (_i49 = 0; _i49 < _size45; ++_i49) { @@ -564,7 +609,7 @@ int64_t& _val51 = this->taskCounters[_key50]; xfer += iprot->readI64(_val51); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.taskCounters = true; } else { @@ -585,14 +630,14 @@ this->operatorList.clear(); uint32_t _size52; ::apache::thrift::protocol::TType _etype55; - iprot->readListBegin(_etype55, _size52); + xfer += iprot->readListBegin(_etype55, _size52); this->operatorList.resize(_size52); uint32_t _i56; for (_i56 = 0; _i56 < _size52; ++_i56) { xfer += this->operatorList[_i56].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.operatorList = true; } else { @@ -630,12 +675,15 @@ uint32_t Task::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Task"); + xfer += oprot->writeFieldBegin("taskId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->taskId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskType", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->taskType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->taskAttributes.size())); @@ -648,6 +696,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->taskCounters.size())); @@ -660,6 +709,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.operatorGraph) { xfer += oprot->writeFieldBegin("operatorGraph", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->operatorGraph.write(oprot); @@ -681,14 +731,29 @@ xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Task &a, Task &b) { + using ::std::swap; + swap(a.taskId, b.taskId); + swap(a.taskType, b.taskType); + swap(a.taskAttributes, b.taskAttributes); + swap(a.taskCounters, b.taskCounters); + swap(a.operatorGraph, b.operatorGraph); + swap(a.operatorList, b.operatorList); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* Stage::ascii_fingerprint = "86EA3C7B0690AFED21A3D479E2B32378"; const uint8_t Stage::binary_fingerprint[16] = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; @@ -737,7 +802,7 @@ uint32_t _size61; ::apache::thrift::protocol::TType _ktype62; ::apache::thrift::protocol::TType _vtype63; - iprot->readMapBegin(_ktype62, _vtype63, _size61); + xfer += iprot->readMapBegin(_ktype62, _vtype63, _size61); uint32_t _i65; for (_i65 = 0; _i65 < _size61; ++_i65) { @@ -746,7 +811,7 @@ std::string& _val67 = this->stageAttributes[_key66]; xfer += iprot->readString(_val67); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.stageAttributes = true; } else { @@ -760,7 +825,7 @@ uint32_t _size68; ::apache::thrift::protocol::TType _ktype69; ::apache::thrift::protocol::TType _vtype70; - iprot->readMapBegin(_ktype69, _vtype70, _size68); + xfer += iprot->readMapBegin(_ktype69, _vtype70, _size68); uint32_t _i72; for (_i72 = 0; _i72 < _size68; ++_i72) { @@ -769,7 +834,7 @@ int64_t& _val74 = this->stageCounters[_key73]; xfer += iprot->readI64(_val74); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.stageCounters = true; } else { @@ -782,14 +847,14 @@ this->taskList.clear(); uint32_t _size75; ::apache::thrift::protocol::TType _etype78; - iprot->readListBegin(_etype78, _size75); + xfer += iprot->readListBegin(_etype78, _size75); this->taskList.resize(_size75); uint32_t _i79; for (_i79 = 0; _i79 < _size75; ++_i79) { xfer += this->taskList[_i79].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.taskList = true; } else { @@ -827,12 +892,15 @@ uint32_t Stage::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Stage"); + xfer += oprot->writeFieldBegin("stageId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->stageId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageType", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->stageType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->stageAttributes.size())); @@ -845,6 +913,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->stageCounters.size())); @@ -857,6 +926,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskList", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->taskList.size())); @@ -868,17 +938,32 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 6); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Stage &a, Stage &b) { + using ::std::swap; + swap(a.stageId, b.stageId); + swap(a.stageType, b.stageType); + swap(a.stageAttributes, b.stageAttributes); + swap(a.stageCounters, b.stageCounters); + swap(a.taskList, b.taskList); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* Query::ascii_fingerprint = "68300D63A5D40F2D17B9A9440FF626C1"; const uint8_t Query::binary_fingerprint[16] = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; @@ -925,7 +1010,7 @@ uint32_t _size83; ::apache::thrift::protocol::TType _ktype84; ::apache::thrift::protocol::TType _vtype85; - iprot->readMapBegin(_ktype84, _vtype85, _size83); + xfer += iprot->readMapBegin(_ktype84, _vtype85, _size83); uint32_t _i87; for (_i87 = 0; _i87 < _size83; ++_i87) { @@ -934,7 +1019,7 @@ std::string& _val89 = this->queryAttributes[_key88]; xfer += iprot->readString(_val89); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.queryAttributes = true; } else { @@ -948,7 +1033,7 @@ uint32_t _size90; ::apache::thrift::protocol::TType _ktype91; ::apache::thrift::protocol::TType _vtype92; - iprot->readMapBegin(_ktype91, _vtype92, _size90); + xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); uint32_t _i94; for (_i94 = 0; _i94 < _size90; ++_i94) { @@ -957,7 +1042,7 @@ int64_t& _val96 = this->queryCounters[_key95]; xfer += iprot->readI64(_val96); } - iprot->readMapEnd(); + xfer += iprot->readMapEnd(); } this->__isset.queryCounters = true; } else { @@ -978,14 +1063,14 @@ this->stageList.clear(); uint32_t _size97; ::apache::thrift::protocol::TType _etype100; - iprot->readListBegin(_etype100, _size97); + xfer += iprot->readListBegin(_etype100, _size97); this->stageList.resize(_size97); uint32_t _i101; for (_i101 = 0; _i101 < _size97; ++_i101) { xfer += this->stageList[_i101].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.stageList = true; } else { @@ -1023,12 +1108,15 @@ uint32_t Query::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Query"); + xfer += oprot->writeFieldBegin("queryId", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->queryId); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryType", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->queryType); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryAttributes", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->queryAttributes.size())); @@ -1041,6 +1129,7 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryCounters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, static_cast(this->queryCounters.size())); @@ -1053,9 +1142,11 @@ xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageGraph", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->stageGraph.write(oprot); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageList", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->stageList.size())); @@ -1067,17 +1158,33 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(Query &a, Query &b) { + using ::std::swap; + swap(a.queryId, b.queryId); + swap(a.queryType, b.queryType); + swap(a.queryAttributes, b.queryAttributes); + swap(a.queryCounters, b.queryCounters); + swap(a.stageGraph, b.stageGraph); + swap(a.stageList, b.stageList); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + const char* QueryPlan::ascii_fingerprint = "3418D1B0C20C288C8406186700B772E3"; const uint8_t QueryPlan::binary_fingerprint[16] = {0x34,0x18,0xD1,0xB0,0xC2,0x0C,0x28,0x8C,0x84,0x06,0x18,0x67,0x00,0xB7,0x72,0xE3}; @@ -1107,14 +1214,14 @@ this->queries.clear(); uint32_t _size105; ::apache::thrift::protocol::TType _etype108; - iprot->readListBegin(_etype108, _size105); + xfer += iprot->readListBegin(_etype108, _size105); this->queries.resize(_size105); uint32_t _i109; for (_i109 = 0; _i109 < _size105; ++_i109) { xfer += this->queries[_i109].read(iprot); } - iprot->readListEnd(); + xfer += iprot->readListEnd(); } this->__isset.queries = true; } else { @@ -1152,6 +1259,7 @@ uint32_t QueryPlan::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("QueryPlan"); + xfer += oprot->writeFieldBegin("queries", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->queries.size())); @@ -1163,15 +1271,26 @@ xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool(this->done); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->started); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } +void swap(QueryPlan &a, QueryPlan &b) { + using ::std::swap; + swap(a.queries, b.queries); + swap(a.done, b.done); + swap(a.started, b.started); + swap(a.__isset, b.__isset); +} + }}} // namespace Index: ql/src/gen/thrift/gen-cpp/queryplan_types.h =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_types.h (revision 1403799) +++ ql/src/gen/thrift/gen-cpp/queryplan_types.h (working copy) @@ -1,15 +1,16 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #ifndef queryplan_TYPES_H #define queryplan_TYPES_H -#include -#include -#include -#include +#include +#include +#include +#include @@ -99,7 +100,7 @@ static const char* ascii_fingerprint; // = "BC4F8C394677A1003AA9F56ED26D8204"; static const uint8_t binary_fingerprint[16]; // = {0xBC,0x4F,0x8C,0x39,0x46,0x77,0xA1,0x00,0x3A,0xA9,0xF5,0x6E,0xD2,0x6D,0x82,0x04}; - Adjacency() : node("") { + Adjacency() : node(), adjacencyType((AdjacencyType::type)0) { } virtual ~Adjacency() throw() {} @@ -143,6 +144,8 @@ }; +void swap(Adjacency &a, Adjacency &b); + typedef struct _Graph__isset { _Graph__isset() : nodeType(false), roots(false), adjacencyList(false) {} bool nodeType; @@ -156,7 +159,7 @@ static const char* ascii_fingerprint; // = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; static const uint8_t binary_fingerprint[16]; // = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; - Graph() { + Graph() : nodeType((NodeType::type)0) { } virtual ~Graph() throw() {} @@ -200,6 +203,8 @@ }; +void swap(Graph &a, Graph &b); + typedef struct _Operator__isset { _Operator__isset() : operatorId(false), operatorType(false), operatorAttributes(false), operatorCounters(false), done(false), started(false) {} bool operatorId; @@ -216,7 +221,7 @@ static const char* ascii_fingerprint; // = "30917C758A752485AF223B697479DE6C"; static const uint8_t binary_fingerprint[16]; // = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; - Operator() : operatorId(""), done(0), started(0) { + Operator() : operatorId(), operatorType((OperatorType::type)0), done(0), started(0) { } virtual ~Operator() throw() {} @@ -281,6 +286,8 @@ }; +void swap(Operator &a, Operator &b); + typedef struct _Task__isset { _Task__isset() : taskId(false), taskType(false), taskAttributes(false), taskCounters(false), operatorGraph(false), operatorList(false), done(false), started(false) {} bool taskId; @@ -299,7 +306,7 @@ static const char* ascii_fingerprint; // = "AC741A136EFA51843AFC3A12F6A793D1"; static const uint8_t binary_fingerprint[16]; // = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; - Task() : taskId(""), done(0), started(0) { + Task() : taskId(), taskType((TaskType::type)0), done(0), started(0) { } virtual ~Task() throw() {} @@ -384,6 +391,8 @@ }; +void swap(Task &a, Task &b); + typedef struct _Stage__isset { _Stage__isset() : stageId(false), stageType(false), stageAttributes(false), stageCounters(false), taskList(false), done(false), started(false) {} bool stageId; @@ -401,7 +410,7 @@ static const char* ascii_fingerprint; // = "86EA3C7B0690AFED21A3D479E2B32378"; static const uint8_t binary_fingerprint[16]; // = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; - Stage() : stageId(""), done(0), started(0) { + Stage() : stageId(), stageType((StageType::type)0), done(0), started(0) { } virtual ~Stage() throw() {} @@ -473,6 +482,8 @@ }; +void swap(Stage &a, Stage &b); + typedef struct _Query__isset { _Query__isset() : queryId(false), queryType(false), queryAttributes(false), queryCounters(false), stageGraph(false), stageList(false), done(false), started(false) {} bool queryId; @@ -491,7 +502,7 @@ static const char* ascii_fingerprint; // = "68300D63A5D40F2D17B9A9440FF626C1"; static const uint8_t binary_fingerprint[16]; // = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; - Query() : queryId(""), queryType(""), done(0), started(0) { + Query() : queryId(), queryType(), done(0), started(0) { } virtual ~Query() throw() {} @@ -570,6 +581,8 @@ }; +void swap(Query &a, Query &b); + typedef struct _QueryPlan__isset { _QueryPlan__isset() : queries(false), done(false), started(false) {} bool queries; @@ -627,6 +640,8 @@ }; +void swap(QueryPlan &a, QueryPlan &b); + }}} // namespace #endif Index: ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp =================================================================== --- ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp (revision 1403799) +++ ql/src/gen/thrift/gen-cpp/queryplan_constants.cpp (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ #include "queryplan_constants.h" Index: ql/src/gen/thrift/gen-rb/queryplan_types.rb =================================================================== --- ql/src/gen/thrift/gen-rb/queryplan_types.rb (revision 1403799) +++ ql/src/gen/thrift/gen-rb/queryplan_types.rb (working copy) @@ -1,9 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' module AdjacencyType CONJUNCTIVE = 0 @@ -75,13 +76,13 @@ FIELDS = { NODE => {:type => ::Thrift::Types::STRING, :name => 'node'}, CHILDREN => {:type => ::Thrift::Types::LIST, :name => 'children', :element => {:type => ::Thrift::Types::STRING}}, - ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => AdjacencyType} + ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => ::AdjacencyType} } def struct_fields; FIELDS; end def validate - unless @adjacencyType.nil? || AdjacencyType::VALID_VALUES.include?(@adjacencyType) + unless @adjacencyType.nil? || ::AdjacencyType::VALID_VALUES.include?(@adjacencyType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field adjacencyType!') end end @@ -96,15 +97,15 @@ ADJACENCYLIST = 3 FIELDS = { - NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType}, + NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => ::NodeType}, ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}}, - ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}} + ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Adjacency}} } def struct_fields; FIELDS; end def validate - unless @nodeType.nil? || NodeType::VALID_VALUES.include?(@nodeType) + unless @nodeType.nil? || ::NodeType::VALID_VALUES.include?(@nodeType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field nodeType!') end end @@ -123,7 +124,7 @@ FIELDS = { OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'}, - OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => OperatorType}, + OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => ::OperatorType}, OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, @@ -133,7 +134,7 @@ def struct_fields; FIELDS; end def validate - unless @operatorType.nil? || OperatorType::VALID_VALUES.include?(@operatorType) + unless @operatorType.nil? || ::OperatorType::VALID_VALUES.include?(@operatorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!') end end @@ -154,11 +155,11 @@ FIELDS = { TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'}, - TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType}, + TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => ::TaskType}, TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, - OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true}, - OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true}, + OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => ::Graph, :optional => true}, + OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Operator}, :optional => true}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } @@ -166,7 +167,7 @@ def struct_fields; FIELDS; end def validate - unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType) + unless @taskType.nil? || ::TaskType::VALID_VALUES.include?(@taskType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!') end end @@ -186,10 +187,10 @@ FIELDS = { STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'}, - STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => StageType}, + STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => ::StageType}, STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, - TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => Task}}, + TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Task}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } @@ -197,7 +198,7 @@ def struct_fields; FIELDS; end def validate - unless @stageType.nil? || StageType::VALID_VALUES.include?(@stageType) + unless @stageType.nil? || ::StageType::VALID_VALUES.include?(@stageType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stageType!') end end @@ -221,8 +222,8 @@ QUERYTYPE => {:type => ::Thrift::Types::STRING, :name => 'queryType'}, QUERYATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'queryAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, QUERYCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'queryCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, - STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => Graph}, - STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => Stage}}, + STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => ::Graph}, + STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Stage}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } @@ -242,7 +243,7 @@ STARTED = 3 FIELDS = { - QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Query}}, + QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Query}}, DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} } Index: ql/src/gen/thrift/gen-rb/queryplan_constants.rb =================================================================== --- ql/src/gen/thrift/gen-rb/queryplan_constants.rb (revision 1403799) +++ ql/src/gen/thrift/gen-rb/queryplan_constants.rb (working copy) @@ -1,8 +1,9 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' require 'queryplan_types' Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new QueryPlanStandardSchemeFactory()); + schemes.put(TupleScheme.class, new QueryPlanTupleSchemeFactory()); + } + private List queries; // required private boolean done; // required private boolean started; // required @@ -99,8 +115,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -135,8 +150,7 @@ * Performs a deep copy on other. */ public QueryPlan(QueryPlan other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetQueries()) { List __this__queries = new ArrayList(); for (Query other_element : other.queries) { @@ -209,16 +223,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -231,16 +245,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -415,82 +429,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // QUERIES - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - this.queries = new ArrayList(_list64.size); - for (int _i65 = 0; _i65 < _list64.size; ++_i65) - { - Query _elem66; // required - _elem66 = new Query(); - _elem66.read(iprot); - this.queries.add(_elem66); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.queries != null) { - oprot.writeFieldBegin(QUERIES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.queries.size())); - for (Query _iter67 : this.queries) - { - _iter67.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -519,6 +462,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -532,12 +476,170 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class QueryPlanStandardSchemeFactory implements SchemeFactory { + public QueryPlanStandardScheme getScheme() { + return new QueryPlanStandardScheme(); + } + } + + private static class QueryPlanStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, QueryPlan struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // QUERIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); + struct.queries = new ArrayList(_list128.size); + for (int _i129 = 0; _i129 < _list128.size; ++_i129) + { + Query _elem130; // required + _elem130 = new Query(); + _elem130.read(iprot); + struct.queries.add(_elem130); + } + iprot.readListEnd(); + } + struct.setQueriesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, QueryPlan struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.queries != null) { + oprot.writeFieldBegin(QUERIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.queries.size())); + for (Query _iter131 : struct.queries) + { + _iter131.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class QueryPlanTupleSchemeFactory implements SchemeFactory { + public QueryPlanTupleScheme getScheme() { + return new QueryPlanTupleScheme(); + } + } + + private static class QueryPlanTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, QueryPlan struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetQueries()) { + optionals.set(0); + } + if (struct.isSetDone()) { + optionals.set(1); + } + if (struct.isSetStarted()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetQueries()) { + { + oprot.writeI32(struct.queries.size()); + for (Query _iter132 : struct.queries) + { + _iter132.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, QueryPlan struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list133 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.queries = new ArrayList(_list133.size); + for (int _i134 = 0; _i134 < _list133.size; ++_i134) + { + Query _elem135; // required + _elem135 = new Query(); + _elem135.read(iprot); + struct.queries.add(_elem135); + } + } + struct.setQueriesIsSet(true); + } + if (incoming.get(1)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(2)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField ADJACENCY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("adjacencyType", org.apache.thrift.protocol.TType.I32, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AdjacencyStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AdjacencyTupleSchemeFactory()); + } + private String node; // required private List children; // required private AdjacencyType adjacencyType; // required @@ -101,7 +117,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -424,83 +439,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NODE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.node = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // CHILDREN - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - this.children = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; // required - _elem2 = iprot.readString(); - this.children.add(_elem2); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // ADJACENCY_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.node != null) { - oprot.writeFieldBegin(NODE_FIELD_DESC); - oprot.writeString(this.node); - oprot.writeFieldEnd(); - } - if (this.children != null) { - oprot.writeFieldBegin(CHILDREN_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.children.size())); - for (String _iter3 : this.children) - { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.adjacencyType != null) { - oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); - oprot.writeI32(this.adjacencyType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -537,6 +480,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -555,5 +499,165 @@ } } + private static class AdjacencyStandardSchemeFactory implements SchemeFactory { + public AdjacencyStandardScheme getScheme() { + return new AdjacencyStandardScheme(); + } + } + + private static class AdjacencyStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Adjacency struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NODE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.node = iprot.readString(); + struct.setNodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CHILDREN + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.children = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + String _elem2; // required + _elem2 = iprot.readString(); + struct.children.add(_elem2); + } + iprot.readListEnd(); + } + struct.setChildrenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ADJACENCY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); + struct.setAdjacencyTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Adjacency struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.node != null) { + oprot.writeFieldBegin(NODE_FIELD_DESC); + oprot.writeString(struct.node); + oprot.writeFieldEnd(); + } + if (struct.children != null) { + oprot.writeFieldBegin(CHILDREN_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.children.size())); + for (String _iter3 : struct.children) + { + oprot.writeString(_iter3); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.adjacencyType != null) { + oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); + oprot.writeI32(struct.adjacencyType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AdjacencyTupleSchemeFactory implements SchemeFactory { + public AdjacencyTupleScheme getScheme() { + return new AdjacencyTupleScheme(); + } + } + + private static class AdjacencyTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Adjacency struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNode()) { + optionals.set(0); + } + if (struct.isSetChildren()) { + optionals.set(1); + } + if (struct.isSetAdjacencyType()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetNode()) { + oprot.writeString(struct.node); + } + if (struct.isSetChildren()) { + { + oprot.writeI32(struct.children.size()); + for (String _iter4 : struct.children) + { + oprot.writeString(_iter4); + } + } + } + if (struct.isSetAdjacencyType()) { + oprot.writeI32(struct.adjacencyType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Adjacency struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.node = iprot.readString(); + struct.setNodeIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.children = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + String _elem7; // required + _elem7 = iprot.readString(); + struct.children.add(_elem7); + } + } + struct.setChildrenIsSet(true); + } + if (incoming.get(2)) { + struct.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); + struct.setAdjacencyTypeIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,6 +38,12 @@ private static final org.apache.thrift.protocol.TField ROOTS_FIELD_DESC = new org.apache.thrift.protocol.TField("roots", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField ADJACENCY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("adjacencyList", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GraphStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GraphTupleSchemeFactory()); + } + private NodeType nodeType; // required private List roots; // required private List adjacencyList; // required @@ -101,7 +117,6 @@ } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -444,101 +459,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // NODE_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.nodeType = NodeType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // ROOTS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); - this.roots = new ArrayList(_list4.size); - for (int _i5 = 0; _i5 < _list4.size; ++_i5) - { - String _elem6; // required - _elem6 = iprot.readString(); - this.roots.add(_elem6); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // ADJACENCY_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list7 = iprot.readListBegin(); - this.adjacencyList = new ArrayList(_list7.size); - for (int _i8 = 0; _i8 < _list7.size; ++_i8) - { - Adjacency _elem9; // required - _elem9 = new Adjacency(); - _elem9.read(iprot); - this.adjacencyList.add(_elem9); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.nodeType != null) { - oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); - oprot.writeI32(this.nodeType.getValue()); - oprot.writeFieldEnd(); - } - if (this.roots != null) { - oprot.writeFieldBegin(ROOTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.roots.size())); - for (String _iter10 : this.roots) - { - oprot.writeString(_iter10); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.adjacencyList != null) { - oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.adjacencyList.size())); - for (Adjacency _iter11 : this.adjacencyList) - { - _iter11.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -575,6 +500,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -593,5 +519,199 @@ } } + private static class GraphStandardSchemeFactory implements SchemeFactory { + public GraphStandardScheme getScheme() { + return new GraphStandardScheme(); + } + } + + private static class GraphStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Graph struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NODE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.nodeType = NodeType.findByValue(iprot.readI32()); + struct.setNodeTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROOTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); + struct.roots = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + String _elem10; // required + _elem10 = iprot.readString(); + struct.roots.add(_elem10); + } + iprot.readListEnd(); + } + struct.setRootsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ADJACENCY_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); + struct.adjacencyList = new ArrayList(_list11.size); + for (int _i12 = 0; _i12 < _list11.size; ++_i12) + { + Adjacency _elem13; // required + _elem13 = new Adjacency(); + _elem13.read(iprot); + struct.adjacencyList.add(_elem13); + } + iprot.readListEnd(); + } + struct.setAdjacencyListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Graph struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.nodeType != null) { + oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); + oprot.writeI32(struct.nodeType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.roots != null) { + oprot.writeFieldBegin(ROOTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.roots.size())); + for (String _iter14 : struct.roots) + { + oprot.writeString(_iter14); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.adjacencyList != null) { + oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.adjacencyList.size())); + for (Adjacency _iter15 : struct.adjacencyList) + { + _iter15.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GraphTupleSchemeFactory implements SchemeFactory { + public GraphTupleScheme getScheme() { + return new GraphTupleScheme(); + } + } + + private static class GraphTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Graph struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNodeType()) { + optionals.set(0); + } + if (struct.isSetRoots()) { + optionals.set(1); + } + if (struct.isSetAdjacencyList()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetNodeType()) { + oprot.writeI32(struct.nodeType.getValue()); + } + if (struct.isSetRoots()) { + { + oprot.writeI32(struct.roots.size()); + for (String _iter16 : struct.roots) + { + oprot.writeString(_iter16); + } + } + } + if (struct.isSetAdjacencyList()) { + { + oprot.writeI32(struct.adjacencyList.size()); + for (Adjacency _iter17 : struct.adjacencyList) + { + _iter17.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Graph struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.nodeType = NodeType.findByValue(iprot.readI32()); + struct.setNodeTypeIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.roots = new ArrayList(_list18.size); + for (int _i19 = 0; _i19 < _list18.size; ++_i19) + { + String _elem20; // required + _elem20 = iprot.readString(); + struct.roots.add(_elem20); + } + } + struct.setRootsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.adjacencyList = new ArrayList(_list21.size); + for (int _i22 = 0; _i22 < _list21.size; ++_i22) + { + Adjacency _elem23; // required + _elem23 = new Adjacency(); + _elem23.read(iprot); + struct.adjacencyList.add(_elem23); + } + } + struct.setAdjacencyListIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -33,12 +43,18 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TaskStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TaskTupleSchemeFactory()); + } + private String taskId; // required private TaskType taskType; // required private Map taskAttributes; // required private Map taskCounters; // required - private Graph operatorGraph; // required - private List operatorList; // required + private Graph operatorGraph; // optional + private List operatorList; // optional private boolean done; // required private boolean started; // required @@ -128,8 +144,8 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.OPERATOR_GRAPH,_Fields.OPERATOR_LIST}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -184,8 +200,7 @@ * Performs a deep copy on other. */ public Task(Task other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetTaskId()) { this.taskId = other.taskId; } @@ -447,16 +462,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -469,16 +484,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -838,187 +853,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // TASK_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.taskId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TASK_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.taskType = TaskType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // TASK_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map22 = iprot.readMapBegin(); - this.taskAttributes = new HashMap(2*_map22.size); - for (int _i23 = 0; _i23 < _map22.size; ++_i23) - { - String _key24; // required - String _val25; // required - _key24 = iprot.readString(); - _val25 = iprot.readString(); - this.taskAttributes.put(_key24, _val25); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // TASK_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin(); - this.taskCounters = new HashMap(2*_map26.size); - for (int _i27 = 0; _i27 < _map26.size; ++_i27) - { - String _key28; // required - long _val29; // required - _key28 = iprot.readString(); - _val29 = iprot.readI64(); - this.taskCounters.put(_key28, _val29); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // OPERATOR_GRAPH - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.operatorGraph = new Graph(); - this.operatorGraph.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // OPERATOR_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); - this.operatorList = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) - { - Operator _elem32; // required - _elem32 = new Operator(); - _elem32.read(iprot); - this.operatorList.add(_elem32); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.taskId != null) { - oprot.writeFieldBegin(TASK_ID_FIELD_DESC); - oprot.writeString(this.taskId); - oprot.writeFieldEnd(); - } - if (this.taskType != null) { - oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); - oprot.writeI32(this.taskType.getValue()); - oprot.writeFieldEnd(); - } - if (this.taskAttributes != null) { - oprot.writeFieldBegin(TASK_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.taskAttributes.size())); - for (Map.Entry _iter33 : this.taskAttributes.entrySet()) - { - oprot.writeString(_iter33.getKey()); - oprot.writeString(_iter33.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.taskCounters != null) { - oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.taskCounters.size())); - for (Map.Entry _iter34 : this.taskCounters.entrySet()) - { - oprot.writeString(_iter34.getKey()); - oprot.writeI64(_iter34.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.operatorGraph != null) { - if (isSetOperatorGraph()) { - oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC); - this.operatorGraph.write(oprot); - oprot.writeFieldEnd(); - } - } - if (this.operatorList != null) { - if (isSetOperatorList()) { - oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.operatorList.size())); - for (Operator _iter35 : this.operatorList) - { - _iter35.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1091,6 +930,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (operatorGraph != null) { + operatorGraph.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1104,12 +947,367 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class TaskStandardSchemeFactory implements SchemeFactory { + public TaskStandardScheme getScheme() { + return new TaskStandardScheme(); + } + } + + private static class TaskStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Task struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TASK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.taskId = iprot.readString(); + struct.setTaskIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TASK_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.taskType = TaskType.findByValue(iprot.readI32()); + struct.setTaskTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TASK_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin(); + struct.taskAttributes = new HashMap(2*_map44.size); + for (int _i45 = 0; _i45 < _map44.size; ++_i45) + { + String _key46; // required + String _val47; // required + _key46 = iprot.readString(); + _val47 = iprot.readString(); + struct.taskAttributes.put(_key46, _val47); + } + iprot.readMapEnd(); + } + struct.setTaskAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TASK_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map48 = iprot.readMapBegin(); + struct.taskCounters = new HashMap(2*_map48.size); + for (int _i49 = 0; _i49 < _map48.size; ++_i49) + { + String _key50; // required + long _val51; // required + _key50 = iprot.readString(); + _val51 = iprot.readI64(); + struct.taskCounters.put(_key50, _val51); + } + iprot.readMapEnd(); + } + struct.setTaskCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // OPERATOR_GRAPH + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.operatorGraph = new Graph(); + struct.operatorGraph.read(iprot); + struct.setOperatorGraphIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // OPERATOR_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(); + struct.operatorList = new ArrayList(_list52.size); + for (int _i53 = 0; _i53 < _list52.size; ++_i53) + { + Operator _elem54; // required + _elem54 = new Operator(); + _elem54.read(iprot); + struct.operatorList.add(_elem54); + } + iprot.readListEnd(); + } + struct.setOperatorListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Task struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.taskId != null) { + oprot.writeFieldBegin(TASK_ID_FIELD_DESC); + oprot.writeString(struct.taskId); + oprot.writeFieldEnd(); + } + if (struct.taskType != null) { + oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); + oprot.writeI32(struct.taskType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.taskAttributes != null) { + oprot.writeFieldBegin(TASK_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.taskAttributes.size())); + for (Map.Entry _iter55 : struct.taskAttributes.entrySet()) + { + oprot.writeString(_iter55.getKey()); + oprot.writeString(_iter55.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.taskCounters != null) { + oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.taskCounters.size())); + for (Map.Entry _iter56 : struct.taskCounters.entrySet()) + { + oprot.writeString(_iter56.getKey()); + oprot.writeI64(_iter56.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.operatorGraph != null) { + if (struct.isSetOperatorGraph()) { + oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC); + struct.operatorGraph.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.operatorList != null) { + if (struct.isSetOperatorList()) { + oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.operatorList.size())); + for (Operator _iter57 : struct.operatorList) + { + _iter57.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TaskTupleSchemeFactory implements SchemeFactory { + public TaskTupleScheme getScheme() { + return new TaskTupleScheme(); + } + } + + private static class TaskTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Task struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTaskId()) { + optionals.set(0); + } + if (struct.isSetTaskType()) { + optionals.set(1); + } + if (struct.isSetTaskAttributes()) { + optionals.set(2); + } + if (struct.isSetTaskCounters()) { + optionals.set(3); + } + if (struct.isSetOperatorGraph()) { + optionals.set(4); + } + if (struct.isSetOperatorList()) { + optionals.set(5); + } + if (struct.isSetDone()) { + optionals.set(6); + } + if (struct.isSetStarted()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetTaskId()) { + oprot.writeString(struct.taskId); + } + if (struct.isSetTaskType()) { + oprot.writeI32(struct.taskType.getValue()); + } + if (struct.isSetTaskAttributes()) { + { + oprot.writeI32(struct.taskAttributes.size()); + for (Map.Entry _iter58 : struct.taskAttributes.entrySet()) + { + oprot.writeString(_iter58.getKey()); + oprot.writeString(_iter58.getValue()); + } + } + } + if (struct.isSetTaskCounters()) { + { + oprot.writeI32(struct.taskCounters.size()); + for (Map.Entry _iter59 : struct.taskCounters.entrySet()) + { + oprot.writeString(_iter59.getKey()); + oprot.writeI64(_iter59.getValue()); + } + } + } + if (struct.isSetOperatorGraph()) { + struct.operatorGraph.write(oprot); + } + if (struct.isSetOperatorList()) { + { + oprot.writeI32(struct.operatorList.size()); + for (Operator _iter60 : struct.operatorList) + { + _iter60.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Task struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.taskId = iprot.readString(); + struct.setTaskIdIsSet(true); + } + if (incoming.get(1)) { + struct.taskType = TaskType.findByValue(iprot.readI32()); + struct.setTaskTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map61 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.taskAttributes = new HashMap(2*_map61.size); + for (int _i62 = 0; _i62 < _map61.size; ++_i62) + { + String _key63; // required + String _val64; // required + _key63 = iprot.readString(); + _val64 = iprot.readString(); + struct.taskAttributes.put(_key63, _val64); + } + } + struct.setTaskAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map65 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.taskCounters = new HashMap(2*_map65.size); + for (int _i66 = 0; _i66 < _map65.size; ++_i66) + { + String _key67; // required + long _val68; // required + _key67 = iprot.readString(); + _val68 = iprot.readI64(); + struct.taskCounters.put(_key67, _val68); + } + } + struct.setTaskCountersIsSet(true); + } + if (incoming.get(4)) { + struct.operatorGraph = new Graph(); + struct.operatorGraph.read(iprot); + struct.setOperatorGraphIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.operatorList = new ArrayList(_list69.size); + for (int _i70 = 0; _i70 < _list69.size; ++_i70) + { + Operator _elem71; // required + _elem71 = new Operator(); + _elem71.read(iprot); + struct.operatorList.add(_elem71); + } + } + struct.setOperatorListIsSet(true); + } + if (incoming.get(6)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(7)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,6 +42,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)6); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new StageStandardSchemeFactory()); + schemes.put(TupleScheme.class, new StageTupleSchemeFactory()); + } + private String stageId; // required private StageType stageType; // required private Map stageAttributes; // required @@ -123,8 +139,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -179,8 +194,7 @@ * Performs a deep copy on other. */ public Stage(Stage other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetStageId()) { this.stageId = other.stageId; } @@ -415,16 +429,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -437,16 +451,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -769,170 +783,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // STAGE_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.stageId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // STAGE_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.stageType = StageType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // STAGE_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map36 = iprot.readMapBegin(); - this.stageAttributes = new HashMap(2*_map36.size); - for (int _i37 = 0; _i37 < _map36.size; ++_i37) - { - String _key38; // required - String _val39; // required - _key38 = iprot.readString(); - _val39 = iprot.readString(); - this.stageAttributes.put(_key38, _val39); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // STAGE_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map40 = iprot.readMapBegin(); - this.stageCounters = new HashMap(2*_map40.size); - for (int _i41 = 0; _i41 < _map40.size; ++_i41) - { - String _key42; // required - long _val43; // required - _key42 = iprot.readString(); - _val43 = iprot.readI64(); - this.stageCounters.put(_key42, _val43); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // TASK_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(); - this.taskList = new ArrayList(_list44.size); - for (int _i45 = 0; _i45 < _list44.size; ++_i45) - { - Task _elem46; // required - _elem46 = new Task(); - _elem46.read(iprot); - this.taskList.add(_elem46); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.stageId != null) { - oprot.writeFieldBegin(STAGE_ID_FIELD_DESC); - oprot.writeString(this.stageId); - oprot.writeFieldEnd(); - } - if (this.stageType != null) { - oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); - oprot.writeI32(this.stageType.getValue()); - oprot.writeFieldEnd(); - } - if (this.stageAttributes != null) { - oprot.writeFieldBegin(STAGE_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.stageAttributes.size())); - for (Map.Entry _iter47 : this.stageAttributes.entrySet()) - { - oprot.writeString(_iter47.getKey()); - oprot.writeString(_iter47.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.stageCounters != null) { - oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.stageCounters.size())); - for (Map.Entry _iter48 : this.stageCounters.entrySet()) - { - oprot.writeString(_iter48.getKey()); - oprot.writeI64(_iter48.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.taskList != null) { - oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.taskList.size())); - for (Task _iter49 : this.taskList) - { - _iter49.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -993,6 +848,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1006,12 +862,338 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class StageStandardSchemeFactory implements SchemeFactory { + public StageStandardScheme getScheme() { + return new StageStandardScheme(); + } + } + + private static class StageStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Stage struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STAGE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stageId = iprot.readString(); + struct.setStageIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STAGE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.stageType = StageType.findByValue(iprot.readI32()); + struct.setStageTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STAGE_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map72 = iprot.readMapBegin(); + struct.stageAttributes = new HashMap(2*_map72.size); + for (int _i73 = 0; _i73 < _map72.size; ++_i73) + { + String _key74; // required + String _val75; // required + _key74 = iprot.readString(); + _val75 = iprot.readString(); + struct.stageAttributes.put(_key74, _val75); + } + iprot.readMapEnd(); + } + struct.setStageAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // STAGE_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map76 = iprot.readMapBegin(); + struct.stageCounters = new HashMap(2*_map76.size); + for (int _i77 = 0; _i77 < _map76.size; ++_i77) + { + String _key78; // required + long _val79; // required + _key78 = iprot.readString(); + _val79 = iprot.readI64(); + struct.stageCounters.put(_key78, _val79); + } + iprot.readMapEnd(); + } + struct.setStageCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TASK_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list80 = iprot.readListBegin(); + struct.taskList = new ArrayList(_list80.size); + for (int _i81 = 0; _i81 < _list80.size; ++_i81) + { + Task _elem82; // required + _elem82 = new Task(); + _elem82.read(iprot); + struct.taskList.add(_elem82); + } + iprot.readListEnd(); + } + struct.setTaskListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Stage struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.stageId != null) { + oprot.writeFieldBegin(STAGE_ID_FIELD_DESC); + oprot.writeString(struct.stageId); + oprot.writeFieldEnd(); + } + if (struct.stageType != null) { + oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); + oprot.writeI32(struct.stageType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.stageAttributes != null) { + oprot.writeFieldBegin(STAGE_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.stageAttributes.size())); + for (Map.Entry _iter83 : struct.stageAttributes.entrySet()) + { + oprot.writeString(_iter83.getKey()); + oprot.writeString(_iter83.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.stageCounters != null) { + oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.stageCounters.size())); + for (Map.Entry _iter84 : struct.stageCounters.entrySet()) + { + oprot.writeString(_iter84.getKey()); + oprot.writeI64(_iter84.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.taskList != null) { + oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.taskList.size())); + for (Task _iter85 : struct.taskList) + { + _iter85.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class StageTupleSchemeFactory implements SchemeFactory { + public StageTupleScheme getScheme() { + return new StageTupleScheme(); + } + } + + private static class StageTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Stage struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStageId()) { + optionals.set(0); + } + if (struct.isSetStageType()) { + optionals.set(1); + } + if (struct.isSetStageAttributes()) { + optionals.set(2); + } + if (struct.isSetStageCounters()) { + optionals.set(3); + } + if (struct.isSetTaskList()) { + optionals.set(4); + } + if (struct.isSetDone()) { + optionals.set(5); + } + if (struct.isSetStarted()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetStageId()) { + oprot.writeString(struct.stageId); + } + if (struct.isSetStageType()) { + oprot.writeI32(struct.stageType.getValue()); + } + if (struct.isSetStageAttributes()) { + { + oprot.writeI32(struct.stageAttributes.size()); + for (Map.Entry _iter86 : struct.stageAttributes.entrySet()) + { + oprot.writeString(_iter86.getKey()); + oprot.writeString(_iter86.getValue()); + } + } + } + if (struct.isSetStageCounters()) { + { + oprot.writeI32(struct.stageCounters.size()); + for (Map.Entry _iter87 : struct.stageCounters.entrySet()) + { + oprot.writeString(_iter87.getKey()); + oprot.writeI64(_iter87.getValue()); + } + } + } + if (struct.isSetTaskList()) { + { + oprot.writeI32(struct.taskList.size()); + for (Task _iter88 : struct.taskList) + { + _iter88.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Stage struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.stageId = iprot.readString(); + struct.setStageIdIsSet(true); + } + if (incoming.get(1)) { + struct.stageType = StageType.findByValue(iprot.readI32()); + struct.setStageTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map89 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.stageAttributes = new HashMap(2*_map89.size); + for (int _i90 = 0; _i90 < _map89.size; ++_i90) + { + String _key91; // required + String _val92; // required + _key91 = iprot.readString(); + _val92 = iprot.readString(); + struct.stageAttributes.put(_key91, _val92); + } + } + struct.setStageAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map93 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.stageCounters = new HashMap(2*_map93.size); + for (int _i94 = 0; _i94 < _map93.size; ++_i94) + { + String _key95; // required + long _val96; // required + _key95 = iprot.readString(); + _val96 = iprot.readI64(); + struct.stageCounters.put(_key95, _val96); + } + } + struct.setStageCountersIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.taskList = new ArrayList(_list97.size); + for (int _i98 = 0; _i98 < _list97.size; ++_i98) + { + Task _elem99; // required + _elem99 = new Task(); + _elem99.read(iprot); + struct.taskList.add(_elem99); + } + } + struct.setTaskListIsSet(true); + } + if (incoming.get(5)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(6)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -33,6 +43,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new QueryStandardSchemeFactory()); + schemes.put(TupleScheme.class, new QueryTupleSchemeFactory()); + } + private String queryId; // required private String queryType; // required private Map queryAttributes; // required @@ -124,8 +140,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -184,8 +199,7 @@ * Performs a deep copy on other. */ public Query(Query other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetQueryId()) { this.queryId = other.queryId; } @@ -439,16 +453,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -461,16 +475,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -830,183 +844,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // QUERY_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.queryId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // QUERY_TYPE - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.queryType = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // QUERY_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin(); - this.queryAttributes = new HashMap(2*_map50.size); - for (int _i51 = 0; _i51 < _map50.size; ++_i51) - { - String _key52; // required - String _val53; // required - _key52 = iprot.readString(); - _val53 = iprot.readString(); - this.queryAttributes.put(_key52, _val53); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // QUERY_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map54 = iprot.readMapBegin(); - this.queryCounters = new HashMap(2*_map54.size); - for (int _i55 = 0; _i55 < _map54.size; ++_i55) - { - String _key56; // required - long _val57; // required - _key56 = iprot.readString(); - _val57 = iprot.readI64(); - this.queryCounters.put(_key56, _val57); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // STAGE_GRAPH - if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.stageGraph = new Graph(); - this.stageGraph.read(iprot); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // STAGE_LIST - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); - this.stageList = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) - { - Stage _elem60; // required - _elem60 = new Stage(); - _elem60.read(iprot); - this.stageList.add(_elem60); - } - iprot.readListEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 7: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 8: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.queryId != null) { - oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); - oprot.writeString(this.queryId); - oprot.writeFieldEnd(); - } - if (this.queryType != null) { - oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); - oprot.writeString(this.queryType); - oprot.writeFieldEnd(); - } - if (this.queryAttributes != null) { - oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.queryAttributes.size())); - for (Map.Entry _iter61 : this.queryAttributes.entrySet()) - { - oprot.writeString(_iter61.getKey()); - oprot.writeString(_iter61.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.queryCounters != null) { - oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.queryCounters.size())); - for (Map.Entry _iter62 : this.queryCounters.entrySet()) - { - oprot.writeString(_iter62.getKey()); - oprot.writeI64(_iter62.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.stageGraph != null) { - oprot.writeFieldBegin(STAGE_GRAPH_FIELD_DESC); - this.stageGraph.write(oprot); - oprot.writeFieldEnd(); - } - if (this.stageList != null) { - oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.stageList.size())); - for (Stage _iter63 : this.stageList) - { - _iter63.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -1075,6 +917,10 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity + if (stageGraph != null) { + stageGraph.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -1088,12 +934,363 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class QueryStandardSchemeFactory implements SchemeFactory { + public QueryStandardScheme getScheme() { + return new QueryStandardScheme(); + } + } + + private static class QueryStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Query struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.queryId = iprot.readString(); + struct.setQueryIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUERY_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.queryType = iprot.readString(); + struct.setQueryTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // QUERY_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map100 = iprot.readMapBegin(); + struct.queryAttributes = new HashMap(2*_map100.size); + for (int _i101 = 0; _i101 < _map100.size; ++_i101) + { + String _key102; // required + String _val103; // required + _key102 = iprot.readString(); + _val103 = iprot.readString(); + struct.queryAttributes.put(_key102, _val103); + } + iprot.readMapEnd(); + } + struct.setQueryAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUERY_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map104 = iprot.readMapBegin(); + struct.queryCounters = new HashMap(2*_map104.size); + for (int _i105 = 0; _i105 < _map104.size; ++_i105) + { + String _key106; // required + long _val107; // required + _key106 = iprot.readString(); + _val107 = iprot.readI64(); + struct.queryCounters.put(_key106, _val107); + } + iprot.readMapEnd(); + } + struct.setQueryCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // STAGE_GRAPH + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.stageGraph = new Graph(); + struct.stageGraph.read(iprot); + struct.setStageGraphIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STAGE_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list108 = iprot.readListBegin(); + struct.stageList = new ArrayList(_list108.size); + for (int _i109 = 0; _i109 < _list108.size; ++_i109) + { + Stage _elem110; // required + _elem110 = new Stage(); + _elem110.read(iprot); + struct.stageList.add(_elem110); + } + iprot.readListEnd(); + } + struct.setStageListIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Query struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.queryId != null) { + oprot.writeFieldBegin(QUERY_ID_FIELD_DESC); + oprot.writeString(struct.queryId); + oprot.writeFieldEnd(); + } + if (struct.queryType != null) { + oprot.writeFieldBegin(QUERY_TYPE_FIELD_DESC); + oprot.writeString(struct.queryType); + oprot.writeFieldEnd(); + } + if (struct.queryAttributes != null) { + oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.queryAttributes.size())); + for (Map.Entry _iter111 : struct.queryAttributes.entrySet()) + { + oprot.writeString(_iter111.getKey()); + oprot.writeString(_iter111.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.queryCounters != null) { + oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.queryCounters.size())); + for (Map.Entry _iter112 : struct.queryCounters.entrySet()) + { + oprot.writeString(_iter112.getKey()); + oprot.writeI64(_iter112.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.stageGraph != null) { + oprot.writeFieldBegin(STAGE_GRAPH_FIELD_DESC); + struct.stageGraph.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.stageList != null) { + oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.stageList.size())); + for (Stage _iter113 : struct.stageList) + { + _iter113.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class QueryTupleSchemeFactory implements SchemeFactory { + public QueryTupleScheme getScheme() { + return new QueryTupleScheme(); + } + } + + private static class QueryTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Query struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetQueryId()) { + optionals.set(0); + } + if (struct.isSetQueryType()) { + optionals.set(1); + } + if (struct.isSetQueryAttributes()) { + optionals.set(2); + } + if (struct.isSetQueryCounters()) { + optionals.set(3); + } + if (struct.isSetStageGraph()) { + optionals.set(4); + } + if (struct.isSetStageList()) { + optionals.set(5); + } + if (struct.isSetDone()) { + optionals.set(6); + } + if (struct.isSetStarted()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetQueryId()) { + oprot.writeString(struct.queryId); + } + if (struct.isSetQueryType()) { + oprot.writeString(struct.queryType); + } + if (struct.isSetQueryAttributes()) { + { + oprot.writeI32(struct.queryAttributes.size()); + for (Map.Entry _iter114 : struct.queryAttributes.entrySet()) + { + oprot.writeString(_iter114.getKey()); + oprot.writeString(_iter114.getValue()); + } + } + } + if (struct.isSetQueryCounters()) { + { + oprot.writeI32(struct.queryCounters.size()); + for (Map.Entry _iter115 : struct.queryCounters.entrySet()) + { + oprot.writeString(_iter115.getKey()); + oprot.writeI64(_iter115.getValue()); + } + } + } + if (struct.isSetStageGraph()) { + struct.stageGraph.write(oprot); + } + if (struct.isSetStageList()) { + { + oprot.writeI32(struct.stageList.size()); + for (Stage _iter116 : struct.stageList) + { + _iter116.write(oprot); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Query struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.queryId = iprot.readString(); + struct.setQueryIdIsSet(true); + } + if (incoming.get(1)) { + struct.queryType = iprot.readString(); + struct.setQueryTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map117 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.queryAttributes = new HashMap(2*_map117.size); + for (int _i118 = 0; _i118 < _map117.size; ++_i118) + { + String _key119; // required + String _val120; // required + _key119 = iprot.readString(); + _val120 = iprot.readString(); + struct.queryAttributes.put(_key119, _val120); + } + } + struct.setQueryAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map121 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.queryCounters = new HashMap(2*_map121.size); + for (int _i122 = 0; _i122 < _map121.size; ++_i122) + { + String _key123; // required + long _val124; // required + _key123 = iprot.readString(); + _val124 = iprot.readI64(); + struct.queryCounters.put(_key123, _val124); + } + } + struct.setQueryCountersIsSet(true); + } + if (incoming.get(4)) { + struct.stageGraph = new Graph(); + struct.stageGraph.read(iprot); + struct.setStageGraphIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.stageList = new ArrayList(_list125.size); + for (int _i126 = 0; _i126 < _list125.size; ++_i126) + { + Stage _elem127; // required + _elem127 = new Stage(); + _elem127.read(iprot); + struct.stageList.add(_elem127); + } + } + struct.setStageListIsSet(true); + } + if (incoming.get(6)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(7)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java (working copy) @@ -1,11 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -31,6 +41,12 @@ private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)5); private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OperatorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OperatorTupleSchemeFactory()); + } + private String operatorId; // required private OperatorType operatorType; // required private Map operatorAttributes; // required @@ -118,8 +134,7 @@ // isset id assignments private static final int __DONE_ISSET_ID = 0; private static final int __STARTED_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -169,8 +184,7 @@ * Performs a deep copy on other. */ public Operator(Operator other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + __isset_bitfield = other.__isset_bitfield; if (other.isSetOperatorId()) { this.operatorId = other.operatorId; } @@ -359,16 +373,16 @@ } public void unsetDone() { - __isset_bit_vector.clear(__DONE_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DONE_ISSET_ID); } /** Returns true if field done is set (has been assigned a value) and false otherwise */ public boolean isSetDone() { - return __isset_bit_vector.get(__DONE_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __DONE_ISSET_ID); } public void setDoneIsSet(boolean value) { - __isset_bit_vector.set(__DONE_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DONE_ISSET_ID, value); } public boolean isStarted() { @@ -381,16 +395,16 @@ } public void unsetStarted() { - __isset_bit_vector.clear(__STARTED_ISSET_ID); + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID); } /** Returns true if field started is set (has been assigned a value) and false otherwise */ public boolean isSetStarted() { - return __isset_bit_vector.get(__STARTED_ISSET_ID); + return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID); } public void setStartedIsSet(boolean value) { - __isset_bit_vector.set(__STARTED_ISSET_ID, value); + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -676,140 +690,11 @@ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (field.id) { - case 1: // OPERATOR_ID - if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.operatorId = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // OPERATOR_TYPE - if (field.type == org.apache.thrift.protocol.TType.I32) { - this.operatorType = OperatorType.findByValue(iprot.readI32()); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // OPERATOR_ATTRIBUTES - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); - this.operatorAttributes = new HashMap(2*_map12.size); - for (int _i13 = 0; _i13 < _map12.size; ++_i13) - { - String _key14; // required - String _val15; // required - _key14 = iprot.readString(); - _val15 = iprot.readString(); - this.operatorAttributes.put(_key14, _val15); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // OPERATOR_COUNTERS - if (field.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(); - this.operatorCounters = new HashMap(2*_map16.size); - for (int _i17 = 0; _i17 < _map16.size; ++_i17) - { - String _key18; // required - long _val19; // required - _key18 = iprot.readString(); - _val19 = iprot.readI64(); - this.operatorCounters.put(_key18, _val19); - } - iprot.readMapEnd(); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 5: // DONE - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.done = iprot.readBool(); - setDoneIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 6: // STARTED - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.started = iprot.readBool(); - setStartedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.operatorId != null) { - oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC); - oprot.writeString(this.operatorId); - oprot.writeFieldEnd(); - } - if (this.operatorType != null) { - oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); - oprot.writeI32(this.operatorType.getValue()); - oprot.writeFieldEnd(); - } - if (this.operatorAttributes != null) { - oprot.writeFieldBegin(OPERATOR_ATTRIBUTES_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.operatorAttributes.size())); - for (Map.Entry _iter20 : this.operatorAttributes.entrySet()) - { - oprot.writeString(_iter20.getKey()); - oprot.writeString(_iter20.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.operatorCounters != null) { - oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.operatorCounters.size())); - for (Map.Entry _iter21 : this.operatorCounters.entrySet()) - { - oprot.writeString(_iter21.getKey()); - oprot.writeI64(_iter21.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DONE_FIELD_DESC); - oprot.writeBool(this.done); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(STARTED_FIELD_DESC); - oprot.writeBool(this.started); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override @@ -862,6 +747,7 @@ public void validate() throws org.apache.thrift.TException { // check for required fields + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -875,12 +761,281 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } + private static class OperatorStandardSchemeFactory implements SchemeFactory { + public OperatorStandardScheme getScheme() { + return new OperatorStandardScheme(); + } + } + + private static class OperatorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Operator struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // OPERATOR_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.operatorId = iprot.readString(); + struct.setOperatorIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OPERATOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.operatorType = OperatorType.findByValue(iprot.readI32()); + struct.setOperatorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OPERATOR_ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); + struct.operatorAttributes = new HashMap(2*_map24.size); + for (int _i25 = 0; _i25 < _map24.size; ++_i25) + { + String _key26; // required + String _val27; // required + _key26 = iprot.readString(); + _val27 = iprot.readString(); + struct.operatorAttributes.put(_key26, _val27); + } + iprot.readMapEnd(); + } + struct.setOperatorAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // OPERATOR_COUNTERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map28 = iprot.readMapBegin(); + struct.operatorCounters = new HashMap(2*_map28.size); + for (int _i29 = 0; _i29 < _map28.size; ++_i29) + { + String _key30; // required + long _val31; // required + _key30 = iprot.readString(); + _val31 = iprot.readI64(); + struct.operatorCounters.put(_key30, _val31); + } + iprot.readMapEnd(); + } + struct.setOperatorCountersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DONE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Operator struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.operatorId != null) { + oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC); + oprot.writeString(struct.operatorId); + oprot.writeFieldEnd(); + } + if (struct.operatorType != null) { + oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.operatorType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.operatorAttributes != null) { + oprot.writeFieldBegin(OPERATOR_ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.operatorAttributes.size())); + for (Map.Entry _iter32 : struct.operatorAttributes.entrySet()) + { + oprot.writeString(_iter32.getKey()); + oprot.writeString(_iter32.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.operatorCounters != null) { + oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, struct.operatorCounters.size())); + for (Map.Entry _iter33 : struct.operatorCounters.entrySet()) + { + oprot.writeString(_iter33.getKey()); + oprot.writeI64(_iter33.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DONE_FIELD_DESC); + oprot.writeBool(struct.done); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(STARTED_FIELD_DESC); + oprot.writeBool(struct.started); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OperatorTupleSchemeFactory implements SchemeFactory { + public OperatorTupleScheme getScheme() { + return new OperatorTupleScheme(); + } + } + + private static class OperatorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Operator struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetOperatorId()) { + optionals.set(0); + } + if (struct.isSetOperatorType()) { + optionals.set(1); + } + if (struct.isSetOperatorAttributes()) { + optionals.set(2); + } + if (struct.isSetOperatorCounters()) { + optionals.set(3); + } + if (struct.isSetDone()) { + optionals.set(4); + } + if (struct.isSetStarted()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetOperatorId()) { + oprot.writeString(struct.operatorId); + } + if (struct.isSetOperatorType()) { + oprot.writeI32(struct.operatorType.getValue()); + } + if (struct.isSetOperatorAttributes()) { + { + oprot.writeI32(struct.operatorAttributes.size()); + for (Map.Entry _iter34 : struct.operatorAttributes.entrySet()) + { + oprot.writeString(_iter34.getKey()); + oprot.writeString(_iter34.getValue()); + } + } + } + if (struct.isSetOperatorCounters()) { + { + oprot.writeI32(struct.operatorCounters.size()); + for (Map.Entry _iter35 : struct.operatorCounters.entrySet()) + { + oprot.writeString(_iter35.getKey()); + oprot.writeI64(_iter35.getValue()); + } + } + } + if (struct.isSetDone()) { + oprot.writeBool(struct.done); + } + if (struct.isSetStarted()) { + oprot.writeBool(struct.started); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Operator struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.operatorId = iprot.readString(); + struct.setOperatorIdIsSet(true); + } + if (incoming.get(1)) { + struct.operatorType = OperatorType.findByValue(iprot.readI32()); + struct.setOperatorTypeIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map36 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.operatorAttributes = new HashMap(2*_map36.size); + for (int _i37 = 0; _i37 < _map36.size; ++_i37) + { + String _key38; // required + String _val39; // required + _key38 = iprot.readString(); + _val39 = iprot.readString(); + struct.operatorAttributes.put(_key38, _val39); + } + } + struct.setOperatorAttributesIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.operatorCounters = new HashMap(2*_map40.size); + for (int _i41 = 0; _i41 < _map40.size; ++_i41) + { + String _key42; // required + long _val43; // required + _key42 = iprot.readString(); + _val43 = iprot.readI64(); + struct.operatorCounters.put(_key42, _val43); + } + } + struct.setOperatorCountersIsSet(true); + } + if (incoming.get(4)) { + struct.done = iprot.readBool(); + struct.setDoneIsSet(true); + } + if (incoming.get(5)) { + struct.started = iprot.readBool(); + struct.setStartedIsSet(true); + } + } + } + } Index: ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java =================================================================== --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java (revision 1403799) +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java (working copy) @@ -1,7 +1,8 @@ /** - * Autogenerated by Thrift Compiler (0.7.0) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated */ package org.apache.hadoop.hive.ql.plan.api; Index: ql/src/gen/thrift/gen-php/Types.php =================================================================== --- ql/src/gen/thrift/gen-php/Types.php (revision 0) +++ ql/src/gen/thrift/gen-php/Types.php (revision 0) @@ -0,0 +1,1714 @@ + 'CONJUNCTIVE', + 1 => 'DISJUNCTIVE', + ); +} + +final class NodeType { + const OPERATOR = 0; + const STAGE = 1; + static public $__names = array( + 0 => 'OPERATOR', + 1 => 'STAGE', + ); +} + +final class OperatorType { + const JOIN = 0; + const MAPJOIN = 1; + const EXTRACT = 2; + const FILTER = 3; + const FORWARD = 4; + const GROUPBY = 5; + const LIMIT = 6; + const SCRIPT = 7; + const SELECT = 8; + const TABLESCAN = 9; + const FILESINK = 10; + const REDUCESINK = 11; + const UNION = 12; + const UDTF = 13; + const LATERALVIEWJOIN = 14; + const LATERALVIEWFORWARD = 15; + const HASHTABLESINK = 16; + const HASHTABLEDUMMY = 17; + static public $__names = array( + 0 => 'JOIN', + 1 => 'MAPJOIN', + 2 => 'EXTRACT', + 3 => 'FILTER', + 4 => 'FORWARD', + 5 => 'GROUPBY', + 6 => 'LIMIT', + 7 => 'SCRIPT', + 8 => 'SELECT', + 9 => 'TABLESCAN', + 10 => 'FILESINK', + 11 => 'REDUCESINK', + 12 => 'UNION', + 13 => 'UDTF', + 14 => 'LATERALVIEWJOIN', + 15 => 'LATERALVIEWFORWARD', + 16 => 'HASHTABLESINK', + 17 => 'HASHTABLEDUMMY', + ); +} + +final class TaskType { + const MAP = 0; + const REDUCE = 1; + const OTHER = 2; + static public $__names = array( + 0 => 'MAP', + 1 => 'REDUCE', + 2 => 'OTHER', + ); +} + +final class StageType { + const CONDITIONAL = 0; + const COPY = 1; + const DDL = 2; + const MAPRED = 3; + const EXPLAIN = 4; + const FETCH = 5; + const FUNC = 6; + const MAPREDLOCAL = 7; + const MOVE = 8; + const STATS = 9; + const DEPENDENCY_COLLECTION = 10; + static public $__names = array( + 0 => 'CONDITIONAL', + 1 => 'COPY', + 2 => 'DDL', + 3 => 'MAPRED', + 4 => 'EXPLAIN', + 5 => 'FETCH', + 6 => 'FUNC', + 7 => 'MAPREDLOCAL', + 8 => 'MOVE', + 9 => 'STATS', + 10 => 'DEPENDENCY_COLLECTION', + ); +} + +class Adjacency { + static $_TSPEC; + + public $node = null; + public $children = null; + public $adjacencyType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'node', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'children', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['node'])) { + $this->node = $vals['node']; + } + if (isset($vals['children'])) { + $this->children = $vals['children']; + } + if (isset($vals['adjacencyType'])) { + $this->adjacencyType = $vals['adjacencyType']; + } + } + } + + public function getName() { + return 'Adjacency'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->node); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->children = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->children []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->adjacencyType); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Adjacency'); + if ($this->node !== null) { + $xfer += $output->writeFieldBegin('node', TType::STRING, 1); + $xfer += $output->writeString($this->node); + $xfer += $output->writeFieldEnd(); + } + if ($this->children !== null) { + if (!is_array($this->children)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('children', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->children)); + { + foreach ($this->children as $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyType !== null) { + $xfer += $output->writeFieldBegin('adjacencyType', TType::I32, 3); + $xfer += $output->writeI32($this->adjacencyType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Graph { + static $_TSPEC; + + public $nodeType = null; + public $roots = null; + public $adjacencyList = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'nodeType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'roots', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Adjacency', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['nodeType'])) { + $this->nodeType = $vals['nodeType']; + } + if (isset($vals['roots'])) { + $this->roots = $vals['roots']; + } + if (isset($vals['adjacencyList'])) { + $this->adjacencyList = $vals['adjacencyList']; + } + } + } + + public function getName() { + return 'Graph'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->nodeType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->roots = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->roots []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->adjacencyList = array(); + $_size13 = 0; + $_etype16 = 0; + $xfer += $input->readListBegin($_etype16, $_size13); + for ($_i17 = 0; $_i17 < $_size13; ++$_i17) + { + $elem18 = null; + $elem18 = new \Adjacency(); + $xfer += $elem18->read($input); + $this->adjacencyList []= $elem18; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Graph'); + if ($this->nodeType !== null) { + $xfer += $output->writeFieldBegin('nodeType', TType::I32, 1); + $xfer += $output->writeI32($this->nodeType); + $xfer += $output->writeFieldEnd(); + } + if ($this->roots !== null) { + if (!is_array($this->roots)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('roots', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->roots)); + { + foreach ($this->roots as $iter19) + { + $xfer += $output->writeString($iter19); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyList !== null) { + if (!is_array($this->adjacencyList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('adjacencyList', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->adjacencyList)); + { + foreach ($this->adjacencyList as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Operator { + static $_TSPEC; + + public $operatorId = null; + public $operatorType = null; + public $operatorAttributes = null; + public $operatorCounters = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'operatorId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'operatorType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'operatorAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'operatorCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['operatorId'])) { + $this->operatorId = $vals['operatorId']; + } + if (isset($vals['operatorType'])) { + $this->operatorType = $vals['operatorType']; + } + if (isset($vals['operatorAttributes'])) { + $this->operatorAttributes = $vals['operatorAttributes']; + } + if (isset($vals['operatorCounters'])) { + $this->operatorCounters = $vals['operatorCounters']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Operator'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->operatorId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->operatorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->operatorAttributes = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = ''; + $xfer += $input->readString($key26); + $xfer += $input->readString($val27); + $this->operatorAttributes[$key26] = $val27; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->operatorCounters = array(); + $_size28 = 0; + $_ktype29 = 0; + $_vtype30 = 0; + $xfer += $input->readMapBegin($_ktype29, $_vtype30, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $key33 = ''; + $val34 = 0; + $xfer += $input->readString($key33); + $xfer += $input->readI64($val34); + $this->operatorCounters[$key33] = $val34; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Operator'); + if ($this->operatorId !== null) { + $xfer += $output->writeFieldBegin('operatorId', TType::STRING, 1); + $xfer += $output->writeString($this->operatorId); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorType !== null) { + $xfer += $output->writeFieldBegin('operatorType', TType::I32, 2); + $xfer += $output->writeI32($this->operatorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorAttributes !== null) { + if (!is_array($this->operatorAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->operatorAttributes)); + { + foreach ($this->operatorAttributes as $kiter35 => $viter36) + { + $xfer += $output->writeString($kiter35); + $xfer += $output->writeString($viter36); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorCounters !== null) { + if (!is_array($this->operatorCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->operatorCounters)); + { + foreach ($this->operatorCounters as $kiter37 => $viter38) + { + $xfer += $output->writeString($kiter37); + $xfer += $output->writeI64($viter38); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 5); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 6); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Task { + static $_TSPEC; + + public $taskId = null; + public $taskType = null; + public $taskAttributes = null; + public $taskCounters = null; + public $operatorGraph = null; + public $operatorList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'taskType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'taskAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'taskCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'operatorGraph', + 'type' => TType::STRUCT, + 'class' => '\Graph', + ), + 6 => array( + 'var' => 'operatorList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Operator', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskId'])) { + $this->taskId = $vals['taskId']; + } + if (isset($vals['taskType'])) { + $this->taskType = $vals['taskType']; + } + if (isset($vals['taskAttributes'])) { + $this->taskAttributes = $vals['taskAttributes']; + } + if (isset($vals['taskCounters'])) { + $this->taskCounters = $vals['taskCounters']; + } + if (isset($vals['operatorGraph'])) { + $this->operatorGraph = $vals['operatorGraph']; + } + if (isset($vals['operatorList'])) { + $this->operatorList = $vals['operatorList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Task'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->taskId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->taskType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->taskAttributes = array(); + $_size39 = 0; + $_ktype40 = 0; + $_vtype41 = 0; + $xfer += $input->readMapBegin($_ktype40, $_vtype41, $_size39); + for ($_i43 = 0; $_i43 < $_size39; ++$_i43) + { + $key44 = ''; + $val45 = ''; + $xfer += $input->readString($key44); + $xfer += $input->readString($val45); + $this->taskAttributes[$key44] = $val45; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->taskCounters = array(); + $_size46 = 0; + $_ktype47 = 0; + $_vtype48 = 0; + $xfer += $input->readMapBegin($_ktype47, $_vtype48, $_size46); + for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + { + $key51 = ''; + $val52 = 0; + $xfer += $input->readString($key51); + $xfer += $input->readI64($val52); + $this->taskCounters[$key51] = $val52; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->operatorGraph = new \Graph(); + $xfer += $this->operatorGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->operatorList = array(); + $_size53 = 0; + $_etype56 = 0; + $xfer += $input->readListBegin($_etype56, $_size53); + for ($_i57 = 0; $_i57 < $_size53; ++$_i57) + { + $elem58 = null; + $elem58 = new \Operator(); + $xfer += $elem58->read($input); + $this->operatorList []= $elem58; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Task'); + if ($this->taskId !== null) { + $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1); + $xfer += $output->writeString($this->taskId); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskType !== null) { + $xfer += $output->writeFieldBegin('taskType', TType::I32, 2); + $xfer += $output->writeI32($this->taskType); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskAttributes !== null) { + if (!is_array($this->taskAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->taskAttributes)); + { + foreach ($this->taskAttributes as $kiter59 => $viter60) + { + $xfer += $output->writeString($kiter59); + $xfer += $output->writeString($viter60); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskCounters !== null) { + if (!is_array($this->taskCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->taskCounters)); + { + foreach ($this->taskCounters as $kiter61 => $viter62) + { + $xfer += $output->writeString($kiter61); + $xfer += $output->writeI64($viter62); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorGraph !== null) { + if (!is_object($this->operatorGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorGraph', TType::STRUCT, 5); + $xfer += $this->operatorGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorList !== null) { + if (!is_array($this->operatorList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->operatorList)); + { + foreach ($this->operatorList as $iter63) + { + $xfer += $iter63->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Stage { + static $_TSPEC; + + public $stageId = null; + public $stageType = null; + public $stageAttributes = null; + public $stageCounters = null; + public $taskList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stageId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'stageType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'stageAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'stageCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'taskList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Task', + ), + ), + 6 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stageId'])) { + $this->stageId = $vals['stageId']; + } + if (isset($vals['stageType'])) { + $this->stageType = $vals['stageType']; + } + if (isset($vals['stageAttributes'])) { + $this->stageAttributes = $vals['stageAttributes']; + } + if (isset($vals['stageCounters'])) { + $this->stageCounters = $vals['stageCounters']; + } + if (isset($vals['taskList'])) { + $this->taskList = $vals['taskList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Stage'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->stageId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->stageType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->stageAttributes = array(); + $_size64 = 0; + $_ktype65 = 0; + $_vtype66 = 0; + $xfer += $input->readMapBegin($_ktype65, $_vtype66, $_size64); + for ($_i68 = 0; $_i68 < $_size64; ++$_i68) + { + $key69 = ''; + $val70 = ''; + $xfer += $input->readString($key69); + $xfer += $input->readString($val70); + $this->stageAttributes[$key69] = $val70; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->stageCounters = array(); + $_size71 = 0; + $_ktype72 = 0; + $_vtype73 = 0; + $xfer += $input->readMapBegin($_ktype72, $_vtype73, $_size71); + for ($_i75 = 0; $_i75 < $_size71; ++$_i75) + { + $key76 = ''; + $val77 = 0; + $xfer += $input->readString($key76); + $xfer += $input->readI64($val77); + $this->stageCounters[$key76] = $val77; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->taskList = array(); + $_size78 = 0; + $_etype81 = 0; + $xfer += $input->readListBegin($_etype81, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $elem83 = null; + $elem83 = new \Task(); + $xfer += $elem83->read($input); + $this->taskList []= $elem83; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Stage'); + if ($this->stageId !== null) { + $xfer += $output->writeFieldBegin('stageId', TType::STRING, 1); + $xfer += $output->writeString($this->stageId); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageType !== null) { + $xfer += $output->writeFieldBegin('stageType', TType::I32, 2); + $xfer += $output->writeI32($this->stageType); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageAttributes !== null) { + if (!is_array($this->stageAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->stageAttributes)); + { + foreach ($this->stageAttributes as $kiter84 => $viter85) + { + $xfer += $output->writeString($kiter84); + $xfer += $output->writeString($viter85); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageCounters !== null) { + if (!is_array($this->stageCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->stageCounters)); + { + foreach ($this->stageCounters as $kiter86 => $viter87) + { + $xfer += $output->writeString($kiter86); + $xfer += $output->writeI64($viter87); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskList !== null) { + if (!is_array($this->taskList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskList', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->taskList)); + { + foreach ($this->taskList as $iter88) + { + $xfer += $iter88->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 6); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 7); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Query { + static $_TSPEC; + + public $queryId = null; + public $queryType = null; + public $queryAttributes = null; + public $queryCounters = null; + public $stageGraph = null; + public $stageList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queryId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'queryType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'queryAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'queryCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'stageGraph', + 'type' => TType::STRUCT, + 'class' => '\Graph', + ), + 6 => array( + 'var' => 'stageList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Stage', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queryId'])) { + $this->queryId = $vals['queryId']; + } + if (isset($vals['queryType'])) { + $this->queryType = $vals['queryType']; + } + if (isset($vals['queryAttributes'])) { + $this->queryAttributes = $vals['queryAttributes']; + } + if (isset($vals['queryCounters'])) { + $this->queryCounters = $vals['queryCounters']; + } + if (isset($vals['stageGraph'])) { + $this->stageGraph = $vals['stageGraph']; + } + if (isset($vals['stageList'])) { + $this->stageList = $vals['stageList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Query'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queryId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queryType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->queryAttributes = array(); + $_size89 = 0; + $_ktype90 = 0; + $_vtype91 = 0; + $xfer += $input->readMapBegin($_ktype90, $_vtype91, $_size89); + for ($_i93 = 0; $_i93 < $_size89; ++$_i93) + { + $key94 = ''; + $val95 = ''; + $xfer += $input->readString($key94); + $xfer += $input->readString($val95); + $this->queryAttributes[$key94] = $val95; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->queryCounters = array(); + $_size96 = 0; + $_ktype97 = 0; + $_vtype98 = 0; + $xfer += $input->readMapBegin($_ktype97, $_vtype98, $_size96); + for ($_i100 = 0; $_i100 < $_size96; ++$_i100) + { + $key101 = ''; + $val102 = 0; + $xfer += $input->readString($key101); + $xfer += $input->readI64($val102); + $this->queryCounters[$key101] = $val102; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->stageGraph = new \Graph(); + $xfer += $this->stageGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->stageList = array(); + $_size103 = 0; + $_etype106 = 0; + $xfer += $input->readListBegin($_etype106, $_size103); + for ($_i107 = 0; $_i107 < $_size103; ++$_i107) + { + $elem108 = null; + $elem108 = new \Stage(); + $xfer += $elem108->read($input); + $this->stageList []= $elem108; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Query'); + if ($this->queryId !== null) { + $xfer += $output->writeFieldBegin('queryId', TType::STRING, 1); + $xfer += $output->writeString($this->queryId); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryType !== null) { + $xfer += $output->writeFieldBegin('queryType', TType::STRING, 2); + $xfer += $output->writeString($this->queryType); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryAttributes !== null) { + if (!is_array($this->queryAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->queryAttributes)); + { + foreach ($this->queryAttributes as $kiter109 => $viter110) + { + $xfer += $output->writeString($kiter109); + $xfer += $output->writeString($viter110); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->queryCounters !== null) { + if (!is_array($this->queryCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->queryCounters)); + { + foreach ($this->queryCounters as $kiter111 => $viter112) + { + $xfer += $output->writeString($kiter111); + $xfer += $output->writeI64($viter112); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageGraph !== null) { + if (!is_object($this->stageGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageGraph', TType::STRUCT, 5); + $xfer += $this->stageGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageList !== null) { + if (!is_array($this->stageList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->stageList)); + { + foreach ($this->stageList as $iter113) + { + $xfer += $iter113->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class QueryPlan { + static $_TSPEC; + + public $queries = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queries', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Query', + ), + ), + 2 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queries'])) { + $this->queries = $vals['queries']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'QueryPlan'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->queries = array(); + $_size114 = 0; + $_etype117 = 0; + $xfer += $input->readListBegin($_etype117, $_size114); + for ($_i118 = 0; $_i118 < $_size114; ++$_i118) + { + $elem119 = null; + $elem119 = new \Query(); + $xfer += $elem119->read($input); + $this->queries []= $elem119; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('QueryPlan'); + if ($this->queries !== null) { + if (!is_array($this->queries)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queries', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->queries)); + { + foreach ($this->queries as $iter120) + { + $xfer += $iter120->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 2); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 3); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +